blob: 7e77ab973e62eb98f0a787d0ed57003ad92935b6 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Barry Warsaw278266f2010-10-14 17:38:46 +00002# From configure.in Revision: 85481 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Barry Warsaw278266f2010-10-14 17:38:46 +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 Warsaw278266f2010-10-14 17:38:46 +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 Warsaw278266f2010-10-14 17:38:46 +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 Warsaw278266f2010-10-14 17:38:46 +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 Warsaw278266f2010-10-14 17:38:46 +0000367# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000368as_fn_error ()
369{
Barry Warsaw278266f2010-10-14 17:38:46 +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 Warsaw278266f2010-10-14 17:38:46 +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 Warsaw278266f2010-10-14 17:38:46 +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
Matthias Kloseb9621712010-04-24 17:59:49 +0000750with_fpectl
751with_libm
752with_libc
753enable_big_digits
754with_wide_unicode
755with_computed_gotos
756'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000757 ac_precious_vars='build_alias
758host_alias
759target_alias
760CC
761CFLAGS
762LDFLAGS
763LIBS
764CPPFLAGS
765CPP'
766
Guido van Rossum627b2d71993-12-24 10:39:16 +0000767
Guido van Rossum7f43da71994-08-01 12:15:30 +0000768# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000769ac_init_help=
770ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000771ac_unrecognized_opts=
772ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000773# The variables have the same names as the options, with
774# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000775cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000776exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000777no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000778no_recursion=
779prefix=NONE
780program_prefix=NONE
781program_suffix=NONE
782program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000783silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000784site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000785srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000786verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000787x_includes=NONE
788x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000789
790# Installation directory options.
791# These are left unexpanded so users can "make install exec_prefix=/foo"
792# and all the variables that are supposed to be based on exec_prefix
793# by default will actually change.
794# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000795# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000796bindir='${exec_prefix}/bin'
797sbindir='${exec_prefix}/sbin'
798libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000799datarootdir='${prefix}/share'
800datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000801sysconfdir='${prefix}/etc'
802sharedstatedir='${prefix}/com'
803localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000804includedir='${prefix}/include'
805oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000806docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
807infodir='${datarootdir}/info'
808htmldir='${docdir}'
809dvidir='${docdir}'
810pdfdir='${docdir}'
811psdir='${docdir}'
812libdir='${exec_prefix}/lib'
813localedir='${datarootdir}/locale'
814mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000815
Guido van Rossum7f43da71994-08-01 12:15:30 +0000816ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000817ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000818for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000819do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000820 # If the previous option needs an argument, assign it.
821 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000822 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000823 ac_prev=
824 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000825 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000826
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000827 case $ac_option in
Barry Warsaw278266f2010-10-14 17:38:46 +0000828 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
829 *=) ac_optarg= ;;
830 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000831 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000832
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000833 # Accept the important Cygnus configure options, so we can diagnose typos.
834
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000835 case $ac_dashdash$ac_option in
836 --)
837 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000838
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000839 -bindir | --bindir | --bindi | --bind | --bin | --bi)
840 ac_prev=bindir ;;
841 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000842 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000843
844 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000845 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000846 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000847 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849 -cache-file | --cache-file | --cache-fil | --cache-fi \
850 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
851 ac_prev=cache_file ;;
852 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
853 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000854 cache_file=$ac_optarg ;;
855
856 --config-cache | -C)
857 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000858
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000859 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000860 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000861 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000862 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000863
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000864 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
865 | --dataroo | --dataro | --datar)
866 ac_prev=datarootdir ;;
867 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
868 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
869 datarootdir=$ac_optarg ;;
870
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000872 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000874 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Barry Warsaw278266f2010-10-14 17:38:46 +0000875 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000876 ac_useropt_orig=$ac_useropt
877 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
878 case $ac_user_opts in
879 *"
880"enable_$ac_useropt"
881"*) ;;
882 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
883 ac_unrecognized_sep=', ';;
884 esac
885 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000886
887 -docdir | --docdir | --docdi | --doc | --do)
888 ac_prev=docdir ;;
889 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
890 docdir=$ac_optarg ;;
891
892 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
893 ac_prev=dvidir ;;
894 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
895 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000896
897 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000898 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000899 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000900 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Barry Warsaw278266f2010-10-14 17:38:46 +0000901 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000902 ac_useropt_orig=$ac_useropt
903 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
904 case $ac_user_opts in
905 *"
906"enable_$ac_useropt"
907"*) ;;
908 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
909 ac_unrecognized_sep=', ';;
910 esac
911 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
914 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
915 | --exec | --exe | --ex)
916 ac_prev=exec_prefix ;;
917 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
918 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
919 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000920 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921
922 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000923 # Obsolete; use --with-gas.
924 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000925
Martin v. Löwis11437992002-04-12 09:54:03 +0000926 -help | --help | --hel | --he | -h)
927 ac_init_help=long ;;
928 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
929 ac_init_help=recursive ;;
930 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
931 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932
933 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000934 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000935 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000938 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
939 ac_prev=htmldir ;;
940 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
941 | --ht=*)
942 htmldir=$ac_optarg ;;
943
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000944 -includedir | --includedir | --includedi | --included | --include \
945 | --includ | --inclu | --incl | --inc)
946 ac_prev=includedir ;;
947 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
948 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000949 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000950
951 -infodir | --infodir | --infodi | --infod | --info | --inf)
952 ac_prev=infodir ;;
953 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000954 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000955
956 -libdir | --libdir | --libdi | --libd)
957 ac_prev=libdir ;;
958 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000959 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000960
961 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
962 | --libexe | --libex | --libe)
963 ac_prev=libexecdir ;;
964 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
965 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000966 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000967
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000968 -localedir | --localedir | --localedi | --localed | --locale)
969 ac_prev=localedir ;;
970 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
971 localedir=$ac_optarg ;;
972
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000973 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000974 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000975 ac_prev=localstatedir ;;
976 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000977 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000978 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000979
980 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
981 ac_prev=mandir ;;
982 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000983 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000984
Guido van Rossum7f43da71994-08-01 12:15:30 +0000985 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000986 # Obsolete; use --without-fp.
987 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988
989 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991 no_create=yes ;;
992
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000993 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
994 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
995 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000997 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
998 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
999 | --oldin | --oldi | --old | --ol | --o)
1000 ac_prev=oldincludedir ;;
1001 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1002 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1003 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001005
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1007 ac_prev=prefix ;;
1008 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001009 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010
1011 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1012 | --program-pre | --program-pr | --program-p)
1013 ac_prev=program_prefix ;;
1014 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1015 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017
1018 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1019 | --program-suf | --program-su | --program-s)
1020 ac_prev=program_suffix ;;
1021 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1022 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024
1025 -program-transform-name | --program-transform-name \
1026 | --program-transform-nam | --program-transform-na \
1027 | --program-transform-n | --program-transform- \
1028 | --program-transform | --program-transfor \
1029 | --program-transfo | --program-transf \
1030 | --program-trans | --program-tran \
1031 | --progr-tra | --program-tr | --program-t)
1032 ac_prev=program_transform_name ;;
1033 -program-transform-name=* | --program-transform-name=* \
1034 | --program-transform-nam=* | --program-transform-na=* \
1035 | --program-transform-n=* | --program-transform-=* \
1036 | --program-transform=* | --program-transfor=* \
1037 | --program-transfo=* | --program-transf=* \
1038 | --program-trans=* | --program-tran=* \
1039 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001041
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001042 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1043 ac_prev=pdfdir ;;
1044 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1045 pdfdir=$ac_optarg ;;
1046
1047 -psdir | --psdir | --psdi | --psd | --ps)
1048 ac_prev=psdir ;;
1049 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1050 psdir=$ac_optarg ;;
1051
Guido van Rossum7f43da71994-08-01 12:15:30 +00001052 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1053 | -silent | --silent | --silen | --sile | --sil)
1054 silent=yes ;;
1055
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1057 ac_prev=sbindir ;;
1058 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1059 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061
1062 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1063 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1064 | --sharedst | --shareds | --shared | --share | --shar \
1065 | --sha | --sh)
1066 ac_prev=sharedstatedir ;;
1067 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1068 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1069 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1070 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001073 -site | --site | --sit)
1074 ac_prev=site ;;
1075 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001077
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1079 ac_prev=srcdir ;;
1080 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001081 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001083 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1084 | --syscon | --sysco | --sysc | --sys | --sy)
1085 ac_prev=sysconfdir ;;
1086 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1087 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001088 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001089
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094
1095 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1096 verbose=yes ;;
1097
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 -version | --version | --versio | --versi | --vers | -V)
1099 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
1101 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001102 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001103 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001104 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Barry Warsaw278266f2010-10-14 17:38:46 +00001105 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001106 ac_useropt_orig=$ac_useropt
1107 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1108 case $ac_user_opts in
1109 *"
1110"with_$ac_useropt"
1111"*) ;;
1112 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1113 ac_unrecognized_sep=', ';;
1114 esac
1115 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001116
1117 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001118 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001119 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001120 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Barry Warsaw278266f2010-10-14 17:38:46 +00001121 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001122 ac_useropt_orig=$ac_useropt
1123 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1124 case $ac_user_opts in
1125 *"
1126"with_$ac_useropt"
1127"*) ;;
1128 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1129 ac_unrecognized_sep=', ';;
1130 esac
1131 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001133 --x)
1134 # Obsolete; use --with-x.
1135 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001136
1137 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1138 | --x-incl | --x-inc | --x-in | --x-i)
1139 ac_prev=x_includes ;;
1140 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1141 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143
1144 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1145 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1146 ac_prev=x_libraries ;;
1147 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1148 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001149 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001150
Barry Warsaw278266f2010-10-14 17:38:46 +00001151 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1152Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001153 ;;
1154
Martin v. Löwis11437992002-04-12 09:54:03 +00001155 *=*)
1156 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1157 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001158 case $ac_envvar in #(
1159 '' | [0-9]* | *[!_$as_cr_alnum]* )
Barry Warsaw278266f2010-10-14 17:38:46 +00001160 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001161 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001162 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 export $ac_envvar ;;
1164
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001165 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001167 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001168 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001169 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001171 ;;
1172
1173 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001174done
1175
Guido van Rossum7f43da71994-08-01 12:15:30 +00001176if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001177 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Barry Warsaw278266f2010-10-14 17:38:46 +00001178 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179fi
1180
Matthias Kloseb9621712010-04-24 17:59:49 +00001181if test -n "$ac_unrecognized_opts"; then
1182 case $enable_option_checking in
1183 no) ;;
Barry Warsaw278266f2010-10-14 17:38:46 +00001184 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001185 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1186 esac
1187fi
1188
1189# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001190for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1191 datadir sysconfdir sharedstatedir localstatedir includedir \
1192 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1193 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001194do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001195 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001196 # Remove trailing slashes.
1197 case $ac_val in
1198 */ )
1199 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1200 eval $ac_var=\$ac_val;;
1201 esac
1202 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001203 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001204 [\\/$]* | ?:[\\/]* ) continue;;
1205 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001206 esac
Barry Warsaw278266f2010-10-14 17:38:46 +00001207 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001208done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001209
Martin v. Löwis11437992002-04-12 09:54:03 +00001210# There might be people who depend on the old broken behavior: `$host'
1211# used to hold the argument of --host etc.
1212# FIXME: To remove some day.
1213build=$build_alias
1214host=$host_alias
1215target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001216
Martin v. Löwis11437992002-04-12 09:54:03 +00001217# FIXME: To remove some day.
1218if test "x$host_alias" != x; then
1219 if test "x$build_alias" = x; then
1220 cross_compiling=maybe
Barry Warsaw278266f2010-10-14 17:38:46 +00001221 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1222 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001223 elif test "x$build_alias" != "x$host_alias"; then
1224 cross_compiling=yes
1225 fi
1226fi
1227
1228ac_tool_prefix=
1229test -n "$host_alias" && ac_tool_prefix=$host_alias-
1230
1231test "$silent" = yes && exec 6>/dev/null
1232
Guido van Rossum627b2d71993-12-24 10:39:16 +00001233
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001234ac_pwd=`pwd` && test -n "$ac_pwd" &&
1235ac_ls_di=`ls -di .` &&
1236ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Barry Warsaw278266f2010-10-14 17:38:46 +00001237 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001238test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Barry Warsaw278266f2010-10-14 17:38:46 +00001239 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001240
1241
Guido van Rossum627b2d71993-12-24 10:39:16 +00001242# Find the source files, if location was not specified.
1243if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001244 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001245 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001246 ac_confdir=`$as_dirname -- "$as_myself" ||
1247$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1248 X"$as_myself" : 'X\(//\)[^/]' \| \
1249 X"$as_myself" : 'X\(//\)$' \| \
1250 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1251$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001252 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1253 s//\1/
1254 q
1255 }
1256 /^X\(\/\/\)[^/].*/{
1257 s//\1/
1258 q
1259 }
1260 /^X\(\/\/\)$/{
1261 s//\1/
1262 q
1263 }
1264 /^X\(\/\).*/{
1265 s//\1/
1266 q
1267 }
1268 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001269 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001270 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001271 srcdir=..
1272 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001273else
1274 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001276if test ! -r "$srcdir/$ac_unique_file"; then
1277 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Barry Warsaw278266f2010-10-14 17:38:46 +00001278 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001279fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001280ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1281ac_abs_confdir=`(
Barry Warsaw278266f2010-10-14 17:38:46 +00001282 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001283 pwd)`
1284# When building in place, set srcdir=.
1285if test "$ac_abs_confdir" = "$ac_pwd"; then
1286 srcdir=.
1287fi
1288# Remove unnecessary trailing slashes from srcdir.
1289# Double slashes in file names in object file debugging info
1290# mess up M-x gdb in Emacs.
1291case $srcdir in
1292*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1293esac
1294for ac_var in $ac_precious_vars; do
1295 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1296 eval ac_env_${ac_var}_value=\$${ac_var}
1297 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1298 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1299done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001300
Martin v. Löwis11437992002-04-12 09:54:03 +00001301#
1302# Report the --help message.
1303#
1304if test "$ac_init_help" = "long"; then
1305 # Omit some internal or obsolete options to make the list less imposing.
1306 # This message is too long to be a string in the A/UX 3.1 sh.
1307 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001308\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001309
1310Usage: $0 [OPTION]... [VAR=VALUE]...
1311
1312To assign environment variables (e.g., CC, CFLAGS...), specify them as
1313VAR=VALUE. See below for descriptions of some of the useful variables.
1314
1315Defaults for the options are specified in brackets.
1316
1317Configuration:
1318 -h, --help display this help and exit
1319 --help=short display options specific to this package
1320 --help=recursive display the short help of all the included packages
1321 -V, --version display version information and exit
Barry Warsaw278266f2010-10-14 17:38:46 +00001322 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001323 --cache-file=FILE cache test results in FILE [disabled]
1324 -C, --config-cache alias for \`--cache-file=config.cache'
1325 -n, --no-create do not create output files
1326 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1327
Martin v. Löwis11437992002-04-12 09:54:03 +00001328Installation directories:
1329 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001330 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001331 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001332 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001333
1334By default, \`make install' will install all the files in
1335\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1336an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1337for instance \`--prefix=\$HOME'.
1338
1339For better control, use the options below.
1340
1341Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001342 --bindir=DIR user executables [EPREFIX/bin]
1343 --sbindir=DIR system admin executables [EPREFIX/sbin]
1344 --libexecdir=DIR program executables [EPREFIX/libexec]
1345 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1346 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1347 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1348 --libdir=DIR object code libraries [EPREFIX/lib]
1349 --includedir=DIR C header files [PREFIX/include]
1350 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1351 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1352 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1353 --infodir=DIR info documentation [DATAROOTDIR/info]
1354 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1355 --mandir=DIR man documentation [DATAROOTDIR/man]
1356 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1357 --htmldir=DIR html documentation [DOCDIR]
1358 --dvidir=DIR dvi documentation [DOCDIR]
1359 --pdfdir=DIR pdf documentation [DOCDIR]
1360 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001361_ACEOF
1362
1363 cat <<\_ACEOF
1364_ACEOF
1365fi
1366
1367if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001368 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001369 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001370 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001371 cat <<\_ACEOF
1372
1373Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001374 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001375 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1376 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001377 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001378 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001379 --enable-framework[=INSTALLDIR]
1380 Build (MacOSX|Darwin) framework
1381 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001382 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001383 --enable-ipv6 Enable ipv6 (with ipv4) support
1384 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001385 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001386 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001387
1388Optional Packages:
1389 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1390 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001391 --with-universal-archs=ARCH
1392 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001393 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001394 --with-framework-name=FRAMEWORK
1395 specify an alternate name of the framework built
1396 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001397 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001398 --with-cxx-main=<compiler>
1399 compile main() and link python executable with C++
1400 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001401 --with-suffix=.exe set executable suffix
1402 --with-pydebug build with Py_DEBUG defined
1403 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001404 --with-system-expat build pyexpat module using an installed expat
1405 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001406 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001407 --with-dbmliborder=db1:db2:...
1408 order to check db backends for dbm. Valid value is a
1409 colon separated string with the backend names
1410 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001411 --with-signal-module disable/enable signal module
1412 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1413 --with(out)-threads[=DIRECTORY]
1414 disable/enable thread support
1415 --with(out)-thread[=DIRECTORY]
1416 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001417 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001418 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001419 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001420 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001421 --with-fpectl enable SIGFPE catching
1422 --with-libm=STRING math library
1423 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001424 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001425 --with(out)-computed-gotos
1426 Use computed gotos in evaluation loop (enabled by
1427 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001428
1429Some influential environment variables:
1430 CC C compiler command
1431 CFLAGS C compiler flags
1432 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1433 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001434 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001435 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001436 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001437 CPP C preprocessor
1438
1439Use these variables to override the choices made by `configure' or to help
1440it to find libraries and programs with nonstandard names/locations.
1441
Georg Brandle2e15612009-05-20 18:25:10 +00001442Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001443_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001444ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001445fi
1446
1447if test "$ac_init_help" = "recursive"; then
1448 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001449 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001450 test -d "$ac_dir" ||
1451 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1452 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001453 ac_builddir=.
1454
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001455case "$ac_dir" in
1456.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1457*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001458 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001459 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001460 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001461 case $ac_top_builddir_sub in
1462 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1463 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1464 esac ;;
1465esac
1466ac_abs_top_builddir=$ac_pwd
1467ac_abs_builddir=$ac_pwd$ac_dir_suffix
1468# for backward compatibility:
1469ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001470
1471case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001472 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001473 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001474 ac_top_srcdir=$ac_top_builddir_sub
1475 ac_abs_top_srcdir=$ac_pwd ;;
1476 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001477 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001478 ac_top_srcdir=$srcdir
1479 ac_abs_top_srcdir=$srcdir ;;
1480 *) # Relative name.
1481 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1482 ac_top_srcdir=$ac_top_build_prefix$srcdir
1483 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001484esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001485ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001486
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001487 cd "$ac_dir" || { ac_status=$?; continue; }
1488 # Check for guested configure.
1489 if test -f "$ac_srcdir/configure.gnu"; then
1490 echo &&
1491 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1492 elif test -f "$ac_srcdir/configure"; then
1493 echo &&
1494 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001495 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001496 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001497 fi || ac_status=$?
1498 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001499 done
1500fi
1501
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001502test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001503if $ac_init_version; then
1504 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001505python configure 3.2
Barry Warsaw278266f2010-10-14 17:38:46 +00001506generated by GNU Autoconf 2.67
Martin v. Löwis11437992002-04-12 09:54:03 +00001507
Barry Warsaw278266f2010-10-14 17:38:46 +00001508Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001509This configure script is free software; the Free Software Foundation
1510gives unlimited permission to copy, distribute and modify it.
1511_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001512 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001513fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001514
1515## ------------------------ ##
1516## Autoconf initialization. ##
1517## ------------------------ ##
1518
1519# ac_fn_c_try_compile LINENO
1520# --------------------------
1521# Try to compile conftest.$ac_ext, and return whether this succeeded.
1522ac_fn_c_try_compile ()
1523{
1524 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1525 rm -f conftest.$ac_objext
1526 if { { ac_try="$ac_compile"
1527case "(($ac_try" in
1528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1529 *) ac_try_echo=$ac_try;;
1530esac
1531eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1532$as_echo "$ac_try_echo"; } >&5
1533 (eval "$ac_compile") 2>conftest.err
1534 ac_status=$?
1535 if test -s conftest.err; then
1536 grep -v '^ *+' conftest.err >conftest.er1
1537 cat conftest.er1 >&5
1538 mv -f conftest.er1 conftest.err
1539 fi
1540 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1541 test $ac_status = 0; } && {
1542 test -z "$ac_c_werror_flag" ||
1543 test ! -s conftest.err
1544 } && test -s conftest.$ac_objext; then :
1545 ac_retval=0
1546else
1547 $as_echo "$as_me: failed program was:" >&5
1548sed 's/^/| /' conftest.$ac_ext >&5
1549
1550 ac_retval=1
1551fi
1552 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1553 as_fn_set_status $ac_retval
1554
1555} # ac_fn_c_try_compile
1556
1557# ac_fn_c_try_cpp LINENO
1558# ----------------------
1559# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1560ac_fn_c_try_cpp ()
1561{
1562 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1563 if { { ac_try="$ac_cpp conftest.$ac_ext"
1564case "(($ac_try" in
1565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1566 *) ac_try_echo=$ac_try;;
1567esac
1568eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1569$as_echo "$ac_try_echo"; } >&5
1570 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1571 ac_status=$?
1572 if test -s conftest.err; then
1573 grep -v '^ *+' conftest.err >conftest.er1
1574 cat conftest.er1 >&5
1575 mv -f conftest.er1 conftest.err
1576 fi
1577 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Barry Warsaw278266f2010-10-14 17:38:46 +00001578 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001579 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1580 test ! -s conftest.err
1581 }; then :
1582 ac_retval=0
1583else
1584 $as_echo "$as_me: failed program was:" >&5
1585sed 's/^/| /' conftest.$ac_ext >&5
1586
1587 ac_retval=1
1588fi
1589 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1590 as_fn_set_status $ac_retval
1591
1592} # ac_fn_c_try_cpp
1593
1594# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1595# -------------------------------------------------------
1596# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1597# the include files in INCLUDES and setting the cache variable VAR
1598# accordingly.
1599ac_fn_c_check_header_mongrel ()
1600{
1601 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Barry Warsaw278266f2010-10-14 17:38:46 +00001602 if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1604$as_echo_n "checking for $2... " >&6; }
Barry Warsaw278266f2010-10-14 17:38:46 +00001605if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001606 $as_echo_n "(cached) " >&6
1607fi
1608eval ac_res=\$$3
1609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1610$as_echo "$ac_res" >&6; }
1611else
1612 # Is the header compilable?
1613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1614$as_echo_n "checking $2 usability... " >&6; }
1615cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1616/* end confdefs.h. */
1617$4
1618#include <$2>
1619_ACEOF
1620if ac_fn_c_try_compile "$LINENO"; then :
1621 ac_header_compiler=yes
1622else
1623 ac_header_compiler=no
1624fi
1625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1627$as_echo "$ac_header_compiler" >&6; }
1628
1629# Is the header present?
1630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1631$as_echo_n "checking $2 presence... " >&6; }
1632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1633/* end confdefs.h. */
1634#include <$2>
1635_ACEOF
1636if ac_fn_c_try_cpp "$LINENO"; then :
1637 ac_header_preproc=yes
1638else
1639 ac_header_preproc=no
1640fi
Barry Warsaw278266f2010-10-14 17:38:46 +00001641rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1643$as_echo "$ac_header_preproc" >&6; }
1644
1645# So? What about this header?
1646case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1647 yes:no: )
1648 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1649$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1650 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1651$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1652 ;;
1653 no:yes:* )
1654 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1655$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1656 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1657$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1658 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1659$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1660 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1661$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1662 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1663$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Barry Warsaw278266f2010-10-14 17:38:46 +00001664( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001665## Report this to http://bugs.python.org/ ##
Barry Warsaw278266f2010-10-14 17:38:46 +00001666## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001667 ) | sed "s/^/$as_me: WARNING: /" >&2
1668 ;;
1669esac
1670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1671$as_echo_n "checking for $2... " >&6; }
Barry Warsaw278266f2010-10-14 17:38:46 +00001672if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001673 $as_echo_n "(cached) " >&6
1674else
1675 eval "$3=\$ac_header_compiler"
1676fi
1677eval ac_res=\$$3
1678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1679$as_echo "$ac_res" >&6; }
1680fi
1681 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1682
1683} # ac_fn_c_check_header_mongrel
1684
1685# ac_fn_c_try_run LINENO
1686# ----------------------
1687# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1688# that executables *can* be run.
1689ac_fn_c_try_run ()
1690{
1691 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1692 if { { ac_try="$ac_link"
1693case "(($ac_try" in
1694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1695 *) ac_try_echo=$ac_try;;
1696esac
1697eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1698$as_echo "$ac_try_echo"; } >&5
1699 (eval "$ac_link") 2>&5
1700 ac_status=$?
1701 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1702 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1703 { { case "(($ac_try" in
1704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1705 *) ac_try_echo=$ac_try;;
1706esac
1707eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1708$as_echo "$ac_try_echo"; } >&5
1709 (eval "$ac_try") 2>&5
1710 ac_status=$?
1711 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1712 test $ac_status = 0; }; }; then :
1713 ac_retval=0
1714else
1715 $as_echo "$as_me: program exited with status $ac_status" >&5
1716 $as_echo "$as_me: failed program was:" >&5
1717sed 's/^/| /' conftest.$ac_ext >&5
1718
1719 ac_retval=$ac_status
1720fi
1721 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1722 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1723 as_fn_set_status $ac_retval
1724
1725} # ac_fn_c_try_run
1726
1727# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1728# -------------------------------------------------------
1729# Tests whether HEADER exists and can be compiled using the include files in
1730# INCLUDES, setting the cache variable VAR accordingly.
1731ac_fn_c_check_header_compile ()
1732{
1733 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1735$as_echo_n "checking for $2... " >&6; }
Barry Warsaw278266f2010-10-14 17:38:46 +00001736if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001737 $as_echo_n "(cached) " >&6
1738else
1739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1740/* end confdefs.h. */
1741$4
1742#include <$2>
1743_ACEOF
1744if ac_fn_c_try_compile "$LINENO"; then :
1745 eval "$3=yes"
1746else
1747 eval "$3=no"
1748fi
1749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1750fi
1751eval ac_res=\$$3
1752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1753$as_echo "$ac_res" >&6; }
1754 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1755
1756} # ac_fn_c_check_header_compile
1757
1758# ac_fn_c_try_link LINENO
1759# -----------------------
1760# Try to link conftest.$ac_ext, and return whether this succeeded.
1761ac_fn_c_try_link ()
1762{
1763 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1764 rm -f conftest.$ac_objext conftest$ac_exeext
1765 if { { ac_try="$ac_link"
1766case "(($ac_try" in
1767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1768 *) ac_try_echo=$ac_try;;
1769esac
1770eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1771$as_echo "$ac_try_echo"; } >&5
1772 (eval "$ac_link") 2>conftest.err
1773 ac_status=$?
1774 if test -s conftest.err; then
1775 grep -v '^ *+' conftest.err >conftest.er1
1776 cat conftest.er1 >&5
1777 mv -f conftest.er1 conftest.err
1778 fi
1779 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1780 test $ac_status = 0; } && {
1781 test -z "$ac_c_werror_flag" ||
1782 test ! -s conftest.err
1783 } && test -s conftest$ac_exeext && {
1784 test "$cross_compiling" = yes ||
1785 $as_test_x conftest$ac_exeext
1786 }; then :
1787 ac_retval=0
1788else
1789 $as_echo "$as_me: failed program was:" >&5
1790sed 's/^/| /' conftest.$ac_ext >&5
1791
1792 ac_retval=1
1793fi
1794 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1795 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1796 # interfere with the next link command; also delete a directory that is
1797 # left behind by Apple's compiler. We do this before executing the actions.
1798 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1799 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1800 as_fn_set_status $ac_retval
1801
1802} # ac_fn_c_try_link
1803
1804# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1805# -------------------------------------------
1806# Tests whether TYPE exists after having included INCLUDES, setting cache
1807# variable VAR accordingly.
1808ac_fn_c_check_type ()
1809{
1810 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1812$as_echo_n "checking for $2... " >&6; }
Barry Warsaw278266f2010-10-14 17:38:46 +00001813if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001814 $as_echo_n "(cached) " >&6
1815else
1816 eval "$3=no"
1817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1818/* end confdefs.h. */
1819$4
1820int
1821main ()
1822{
1823if (sizeof ($2))
1824 return 0;
1825 ;
1826 return 0;
1827}
1828_ACEOF
1829if ac_fn_c_try_compile "$LINENO"; then :
1830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1831/* end confdefs.h. */
1832$4
1833int
1834main ()
1835{
1836if (sizeof (($2)))
1837 return 0;
1838 ;
1839 return 0;
1840}
1841_ACEOF
1842if ac_fn_c_try_compile "$LINENO"; then :
1843
1844else
1845 eval "$3=yes"
1846fi
1847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1848fi
1849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1850fi
1851eval ac_res=\$$3
1852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1853$as_echo "$ac_res" >&6; }
1854 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1855
1856} # ac_fn_c_check_type
1857
1858# ac_fn_c_find_uintX_t LINENO BITS VAR
1859# ------------------------------------
1860# Finds an unsigned integer type with width BITS, setting cache variable VAR
1861# accordingly.
1862ac_fn_c_find_uintX_t ()
1863{
1864 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1866$as_echo_n "checking for uint$2_t... " >&6; }
Barry Warsaw278266f2010-10-14 17:38:46 +00001867if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001868 $as_echo_n "(cached) " >&6
1869else
1870 eval "$3=no"
1871 # Order is important - never check a type that is potentially smaller
1872 # than half of the expected target width.
1873 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1874 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1876/* end confdefs.h. */
1877$ac_includes_default
1878int
1879main ()
1880{
1881static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1882test_array [0] = 0
1883
1884 ;
1885 return 0;
1886}
1887_ACEOF
1888if ac_fn_c_try_compile "$LINENO"; then :
1889 case $ac_type in #(
1890 uint$2_t) :
1891 eval "$3=yes" ;; #(
1892 *) :
1893 eval "$3=\$ac_type" ;;
1894esac
1895fi
1896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Barry Warsaw278266f2010-10-14 17:38:46 +00001897 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001898
1899else
1900 break
1901fi
1902 done
1903fi
1904eval ac_res=\$$3
1905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1906$as_echo "$ac_res" >&6; }
1907 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1908
1909} # ac_fn_c_find_uintX_t
1910
1911# ac_fn_c_find_intX_t LINENO BITS VAR
1912# -----------------------------------
1913# Finds a signed integer type with width BITS, setting cache variable VAR
1914# accordingly.
1915ac_fn_c_find_intX_t ()
1916{
1917 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1919$as_echo_n "checking for int$2_t... " >&6; }
Barry Warsaw278266f2010-10-14 17:38:46 +00001920if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001921 $as_echo_n "(cached) " >&6
1922else
1923 eval "$3=no"
1924 # Order is important - never check a type that is potentially smaller
1925 # than half of the expected target width.
1926 for ac_type in int$2_t 'int' 'long int' \
1927 'long long int' 'short int' 'signed char'; do
1928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1929/* end confdefs.h. */
1930$ac_includes_default
Barry Warsaw278266f2010-10-14 17:38:46 +00001931 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001932int
1933main ()
1934{
Barry Warsaw278266f2010-10-14 17:38:46 +00001935static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001936test_array [0] = 0
1937
1938 ;
1939 return 0;
1940}
1941_ACEOF
1942if ac_fn_c_try_compile "$LINENO"; then :
1943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1944/* end confdefs.h. */
1945$ac_includes_default
Barry Warsaw278266f2010-10-14 17:38:46 +00001946 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001947int
1948main ()
1949{
Barry Warsaw278266f2010-10-14 17:38:46 +00001950static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001951 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1952test_array [0] = 0
1953
1954 ;
1955 return 0;
1956}
1957_ACEOF
1958if ac_fn_c_try_compile "$LINENO"; then :
1959
1960else
1961 case $ac_type in #(
1962 int$2_t) :
1963 eval "$3=yes" ;; #(
1964 *) :
1965 eval "$3=\$ac_type" ;;
1966esac
1967fi
1968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1969fi
1970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Barry Warsaw278266f2010-10-14 17:38:46 +00001971 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001972
1973else
1974 break
1975fi
1976 done
1977fi
1978eval ac_res=\$$3
1979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1980$as_echo "$ac_res" >&6; }
1981 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1982
1983} # ac_fn_c_find_intX_t
1984
1985# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1986# --------------------------------------------
1987# Tries to find the compile-time value of EXPR in a program that includes
1988# INCLUDES, setting VAR accordingly. Returns whether the value could be
1989# computed
1990ac_fn_c_compute_int ()
1991{
1992 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1993 if test "$cross_compiling" = yes; then
1994 # Depending upon the size, compute the lo and hi bounds.
1995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1996/* end confdefs.h. */
1997$4
1998int
1999main ()
2000{
2001static int test_array [1 - 2 * !(($2) >= 0)];
2002test_array [0] = 0
2003
2004 ;
2005 return 0;
2006}
2007_ACEOF
2008if ac_fn_c_try_compile "$LINENO"; then :
2009 ac_lo=0 ac_mid=0
2010 while :; do
2011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2012/* end confdefs.h. */
2013$4
2014int
2015main ()
2016{
2017static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2018test_array [0] = 0
2019
2020 ;
2021 return 0;
2022}
2023_ACEOF
2024if ac_fn_c_try_compile "$LINENO"; then :
2025 ac_hi=$ac_mid; break
2026else
2027 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2028 if test $ac_lo -le $ac_mid; then
2029 ac_lo= ac_hi=
2030 break
2031 fi
2032 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2033fi
2034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2035 done
2036else
2037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2038/* end confdefs.h. */
2039$4
2040int
2041main ()
2042{
2043static int test_array [1 - 2 * !(($2) < 0)];
2044test_array [0] = 0
2045
2046 ;
2047 return 0;
2048}
2049_ACEOF
2050if ac_fn_c_try_compile "$LINENO"; then :
2051 ac_hi=-1 ac_mid=-1
2052 while :; do
2053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2054/* end confdefs.h. */
2055$4
2056int
2057main ()
2058{
2059static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2060test_array [0] = 0
2061
2062 ;
2063 return 0;
2064}
2065_ACEOF
2066if ac_fn_c_try_compile "$LINENO"; then :
2067 ac_lo=$ac_mid; break
2068else
2069 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2070 if test $ac_mid -le $ac_hi; then
2071 ac_lo= ac_hi=
2072 break
2073 fi
2074 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2075fi
2076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2077 done
2078else
2079 ac_lo= ac_hi=
2080fi
2081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2082fi
2083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2084# Binary search between lo and hi bounds.
2085while test "x$ac_lo" != "x$ac_hi"; do
2086 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2088/* end confdefs.h. */
2089$4
2090int
2091main ()
2092{
2093static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2094test_array [0] = 0
2095
2096 ;
2097 return 0;
2098}
2099_ACEOF
2100if ac_fn_c_try_compile "$LINENO"; then :
2101 ac_hi=$ac_mid
2102else
2103 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2104fi
2105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2106done
2107case $ac_lo in #((
2108?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2109'') ac_retval=1 ;;
2110esac
2111 else
2112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2113/* end confdefs.h. */
2114$4
2115static long int longval () { return $2; }
2116static unsigned long int ulongval () { return $2; }
2117#include <stdio.h>
2118#include <stdlib.h>
2119int
2120main ()
2121{
2122
2123 FILE *f = fopen ("conftest.val", "w");
2124 if (! f)
2125 return 1;
2126 if (($2) < 0)
2127 {
2128 long int i = longval ();
2129 if (i != ($2))
2130 return 1;
2131 fprintf (f, "%ld", i);
2132 }
2133 else
2134 {
2135 unsigned long int i = ulongval ();
2136 if (i != ($2))
2137 return 1;
2138 fprintf (f, "%lu", i);
2139 }
2140 /* Do not output a trailing newline, as this causes \r\n confusion
2141 on some platforms. */
2142 return ferror (f) || fclose (f) != 0;
2143
2144 ;
2145 return 0;
2146}
2147_ACEOF
2148if ac_fn_c_try_run "$LINENO"; then :
2149 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2150else
2151 ac_retval=1
2152fi
2153rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2154 conftest.$ac_objext conftest.beam conftest.$ac_ext
2155rm -f conftest.val
2156
2157 fi
2158 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2159 as_fn_set_status $ac_retval
2160
2161} # ac_fn_c_compute_int
2162
2163# ac_fn_c_check_func LINENO FUNC VAR
2164# ----------------------------------
2165# Tests whether FUNC exists, setting the cache variable VAR accordingly
2166ac_fn_c_check_func ()
2167{
2168 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2170$as_echo_n "checking for $2... " >&6; }
Barry Warsaw278266f2010-10-14 17:38:46 +00002171if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002172 $as_echo_n "(cached) " >&6
2173else
2174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2175/* end confdefs.h. */
2176/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2177 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2178#define $2 innocuous_$2
2179
2180/* System header to define __stub macros and hopefully few prototypes,
2181 which can conflict with char $2 (); below.
2182 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2183 <limits.h> exists even on freestanding compilers. */
2184
2185#ifdef __STDC__
2186# include <limits.h>
2187#else
2188# include <assert.h>
2189#endif
2190
2191#undef $2
2192
2193/* Override any GCC internal prototype to avoid an error.
2194 Use char because int might match the return type of a GCC
2195 builtin and then its argument prototype would still apply. */
2196#ifdef __cplusplus
2197extern "C"
2198#endif
2199char $2 ();
2200/* The GNU C library defines this for functions which it implements
2201 to always fail with ENOSYS. Some functions are actually named
2202 something starting with __ and the normal name is an alias. */
2203#if defined __stub_$2 || defined __stub___$2
2204choke me
2205#endif
2206
2207int
2208main ()
2209{
2210return $2 ();
2211 ;
2212 return 0;
2213}
2214_ACEOF
2215if ac_fn_c_try_link "$LINENO"; then :
2216 eval "$3=yes"
2217else
2218 eval "$3=no"
2219fi
2220rm -f core conftest.err conftest.$ac_objext \
2221 conftest$ac_exeext conftest.$ac_ext
2222fi
2223eval ac_res=\$$3
2224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2225$as_echo "$ac_res" >&6; }
2226 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2227
2228} # ac_fn_c_check_func
2229
2230# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2231# ----------------------------------------------------
2232# Tries to find if the field MEMBER exists in type AGGR, after including
2233# INCLUDES, setting cache variable VAR accordingly.
2234ac_fn_c_check_member ()
2235{
2236 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2238$as_echo_n "checking for $2.$3... " >&6; }
Barry Warsaw278266f2010-10-14 17:38:46 +00002239if eval "test \"\${$4+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002240 $as_echo_n "(cached) " >&6
2241else
2242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2243/* end confdefs.h. */
2244$5
2245int
2246main ()
2247{
2248static $2 ac_aggr;
2249if (ac_aggr.$3)
2250return 0;
2251 ;
2252 return 0;
2253}
2254_ACEOF
2255if ac_fn_c_try_compile "$LINENO"; then :
2256 eval "$4=yes"
2257else
2258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2259/* end confdefs.h. */
2260$5
2261int
2262main ()
2263{
2264static $2 ac_aggr;
2265if (sizeof ac_aggr.$3)
2266return 0;
2267 ;
2268 return 0;
2269}
2270_ACEOF
2271if ac_fn_c_try_compile "$LINENO"; then :
2272 eval "$4=yes"
2273else
2274 eval "$4=no"
2275fi
2276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2277fi
2278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2279fi
2280eval ac_res=\$$4
2281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2282$as_echo "$ac_res" >&6; }
2283 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2284
2285} # ac_fn_c_check_member
2286
Barry Warsaw278266f2010-10-14 17:38:46 +00002287# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2288# ---------------------------------------------
2289# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2290# accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002291ac_fn_c_check_decl ()
2292{
2293 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Barry Warsaw278266f2010-10-14 17:38:46 +00002294 as_decl_name=`echo $2|sed 's/ *(.*//'`
2295 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2297$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2298if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002299 $as_echo_n "(cached) " >&6
2300else
2301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2302/* end confdefs.h. */
2303$4
2304int
2305main ()
2306{
Barry Warsaw278266f2010-10-14 17:38:46 +00002307#ifndef $as_decl_name
2308#ifdef __cplusplus
2309 (void) $as_decl_use;
2310#else
2311 (void) $as_decl_name;
2312#endif
Matthias Kloseb9621712010-04-24 17:59:49 +00002313#endif
2314
2315 ;
2316 return 0;
2317}
2318_ACEOF
2319if ac_fn_c_try_compile "$LINENO"; then :
2320 eval "$3=yes"
2321else
2322 eval "$3=no"
2323fi
2324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2325fi
2326eval ac_res=\$$3
2327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2328$as_echo "$ac_res" >&6; }
2329 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2330
2331} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002332cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002333This file contains any messages produced by compilers while
2334running configure, to aid debugging if configure makes a mistake.
2335
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002336It was created by python $as_me 3.2, which was
Barry Warsaw278266f2010-10-14 17:38:46 +00002337generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002338
2339 $ $0 $@
2340
2341_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002342exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002343{
2344cat <<_ASUNAME
2345## --------- ##
2346## Platform. ##
2347## --------- ##
2348
2349hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2350uname -m = `(uname -m) 2>/dev/null || echo unknown`
2351uname -r = `(uname -r) 2>/dev/null || echo unknown`
2352uname -s = `(uname -s) 2>/dev/null || echo unknown`
2353uname -v = `(uname -v) 2>/dev/null || echo unknown`
2354
2355/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2356/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2357
2358/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2359/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2360/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002361/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002362/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2363/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2364/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2365
2366_ASUNAME
2367
2368as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2369for as_dir in $PATH
2370do
2371 IFS=$as_save_IFS
2372 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002373 $as_echo "PATH: $as_dir"
2374 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002375IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002376
2377} >&5
2378
2379cat >&5 <<_ACEOF
2380
2381
2382## ----------- ##
2383## Core tests. ##
2384## ----------- ##
2385
2386_ACEOF
2387
2388
2389# Keep a trace of the command line.
2390# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002391# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002392# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002393# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002394ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002395ac_configure_args0=
2396ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002397ac_must_keep_next=false
2398for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002399do
Skip Montanaro6dead952003-09-25 14:50:04 +00002400 for ac_arg
2401 do
2402 case $ac_arg in
2403 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2404 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2405 | -silent | --silent | --silen | --sile | --sil)
2406 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002407 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002408 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002409 esac
2410 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002411 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002412 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002413 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002414 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002415 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002417 case $ac_arg in
2418 *=* | --config-cache | -C | -disable-* | --disable-* \
2419 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2420 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2421 | -with-* | --with-* | -without-* | --without-* | --x)
2422 case "$ac_configure_args0 " in
2423 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2424 esac
2425 ;;
2426 -* ) ac_must_keep_next=true ;;
2427 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002428 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002429 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 ;;
2431 esac
2432 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002433done
Matthias Kloseb9621712010-04-24 17:59:49 +00002434{ ac_configure_args0=; unset ac_configure_args0;}
2435{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002436
2437# When interrupted or exit'd, cleanup temporary files, and complete
2438# config.log. We remove comments because anyway the quotes in there
2439# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002440# WARNING: Use '\'' to represent an apostrophe within the trap.
2441# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002442trap 'exit_status=$?
2443 # Save into config.log some information that might help in debugging.
2444 {
2445 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002446
Barry Warsaw278266f2010-10-14 17:38:46 +00002447 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002448## Cache variables. ##
Barry Warsaw278266f2010-10-14 17:38:46 +00002449## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002450 echo
2451 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002452(
2453 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2454 eval ac_val=\$$ac_var
2455 case $ac_val in #(
2456 *${as_nl}*)
2457 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002458 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2459$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002460 esac
2461 case $ac_var in #(
2462 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002463 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2464 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002465 esac ;;
2466 esac
2467 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002468 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2470 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002471 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 "s/'\''/'\''\\\\'\'''\''/g;
2473 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2474 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002475 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002477 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478 esac |
2479 sort
2480)
Martin v. Löwis11437992002-04-12 09:54:03 +00002481 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002482
Barry Warsaw278266f2010-10-14 17:38:46 +00002483 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002484## Output variables. ##
Barry Warsaw278266f2010-10-14 17:38:46 +00002485## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002486 echo
2487 for ac_var in $ac_subst_vars
2488 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489 eval ac_val=\$$ac_var
2490 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002491 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002492 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002493 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 done | sort
2495 echo
2496
2497 if test -n "$ac_subst_files"; then
Barry Warsaw278266f2010-10-14 17:38:46 +00002498 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002499## File substitutions. ##
Barry Warsaw278266f2010-10-14 17:38:46 +00002500## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002501 echo
2502 for ac_var in $ac_subst_files
2503 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504 eval ac_val=\$$ac_var
2505 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002506 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002509 done | sort
2510 echo
2511 fi
2512
Martin v. Löwis11437992002-04-12 09:54:03 +00002513 if test -s confdefs.h; then
Barry Warsaw278266f2010-10-14 17:38:46 +00002514 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002515## confdefs.h. ##
Barry Warsaw278266f2010-10-14 17:38:46 +00002516## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002517 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002518 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 echo
2520 fi
2521 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002522 $as_echo "$as_me: caught signal $ac_signal"
2523 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 rm -f core *.core core.conftest.* &&
2526 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002529for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002530 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002531done
2532ac_signal=0
2533
2534# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002536
Matthias Kloseb9621712010-04-24 17:59:49 +00002537$as_echo "/* confdefs.h */" > confdefs.h
2538
Martin v. Löwis11437992002-04-12 09:54:03 +00002539# Predefined preprocessor variables.
2540
2541cat >>confdefs.h <<_ACEOF
2542#define PACKAGE_NAME "$PACKAGE_NAME"
2543_ACEOF
2544
Martin v. Löwis11437992002-04-12 09:54:03 +00002545cat >>confdefs.h <<_ACEOF
2546#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2547_ACEOF
2548
Martin v. Löwis11437992002-04-12 09:54:03 +00002549cat >>confdefs.h <<_ACEOF
2550#define PACKAGE_VERSION "$PACKAGE_VERSION"
2551_ACEOF
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_STRING "$PACKAGE_STRING"
2555_ACEOF
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2559_ACEOF
2560
Matthias Kloseb9621712010-04-24 17:59:49 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_URL "$PACKAGE_URL"
2563_ACEOF
2564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565
2566# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002567# Prefer an explicitly selected file to automatically selected ones.
2568ac_site_file1=NONE
2569ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002570if test -n "$CONFIG_SITE"; then
Barry Warsaw278266f2010-10-14 17:38:46 +00002571 # We do not want a PATH search for config.site.
2572 case $CONFIG_SITE in #((
2573 -*) ac_site_file1=./$CONFIG_SITE;;
2574 */*) ac_site_file1=$CONFIG_SITE;;
2575 *) ac_site_file1=./$CONFIG_SITE;;
2576 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002578 ac_site_file1=$prefix/share/config.site
2579 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002580else
Matthias Kloseb9621712010-04-24 17:59:49 +00002581 ac_site_file1=$ac_default_prefix/share/config.site
2582 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002584for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585do
Matthias Kloseb9621712010-04-24 17:59:49 +00002586 test "x$ac_site_file" = xNONE && continue
2587 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2588 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2589$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002590 sed 's/^/| /' "$ac_site_file" >&5
Barry Warsaw278266f2010-10-14 17:38:46 +00002591 . "$ac_site_file" \
2592 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2593$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2594as_fn_error $? "failed to load site script $ac_site_file
2595See \`config.log' for more details" "$LINENO" 5 ; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002596 fi
2597done
2598
2599if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002600 # Some versions of bash will fail to source /dev/null (special files
2601 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2602 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2603 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2604$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002605 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002606 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2607 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 esac
2609 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002610else
Matthias Kloseb9621712010-04-24 17:59:49 +00002611 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2612$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 >$cache_file
2614fi
2615
2616# Check that the precious variables saved in the cache have kept the same
2617# value.
2618ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002619for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2621 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2623 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 case $ac_old_set,$ac_new_set in
2625 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002626 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2627$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 +00002628 ac_cache_corrupted=: ;;
2629 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002630 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2631$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002632 ac_cache_corrupted=: ;;
2633 ,);;
2634 *)
2635 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002636 # differences in whitespace do not lead to failure.
2637 ac_old_val_w=`echo x $ac_old_val`
2638 ac_new_val_w=`echo x $ac_new_val`
2639 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2640 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2641$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2642 ac_cache_corrupted=:
2643 else
2644 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2645$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2646 eval $ac_var=\$ac_old_val
2647 fi
2648 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2649$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2650 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2651$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002652 fi;;
2653 esac
2654 # Pass precious variables to config.status.
2655 if test "$ac_new_set" = set; then
2656 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002657 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002658 *) ac_arg=$ac_var=$ac_new_val ;;
2659 esac
2660 case " $ac_configure_args " in
2661 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002662 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002663 esac
2664 fi
2665done
2666if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002667 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2668$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2669 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2670$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Barry Warsaw278266f2010-10-14 17:38:46 +00002671 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002673## -------------------- ##
2674## Main body of script. ##
2675## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002676
Guido van Rossum7f43da71994-08-01 12:15:30 +00002677ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002678ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002679ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2680ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2681ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002682
Guido van Rossum627b2d71993-12-24 10:39:16 +00002683
Michael W. Hudson54241132001-12-07 15:38:26 +00002684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002685ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002686
2687
Martin v. Löwis11437992002-04-12 09:54:03 +00002688
Benjamin Petersond23f8222009-04-05 19:13:16 +00002689if test "$prefix" != "/"; then
2690 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2691fi
2692
2693
Martin v. Löwis11437992002-04-12 09:54:03 +00002694
2695
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002696# We don't use PACKAGE_ variables, and they cause conflicts
2697# with other autoconf-based packages that include Python.h
2698grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2699rm confdefs.h
2700mv confdefs.h.new confdefs.h
2701
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002702
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002703VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002704
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002705# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002706
2707SOVERSION=1.0
2708
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002709# The later defininition of _XOPEN_SOURCE disables certain features
2710# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2711
Matthias Kloseb9621712010-04-24 17:59:49 +00002712$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002713
2714
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002715# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2716# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2717# them.
2718
Matthias Kloseb9621712010-04-24 17:59:49 +00002719$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002720
2721
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002722# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2723# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2724# them.
2725
Matthias Kloseb9621712010-04-24 17:59:49 +00002726$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002727
2728
Martin v. Löwisd6320502004-08-12 13:45:08 +00002729# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2730# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2731
Matthias Kloseb9621712010-04-24 17:59:49 +00002732$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002733
2734
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002735# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2736# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2737# them.
2738
Matthias Kloseb9621712010-04-24 17:59:49 +00002739$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002740
2741
2742
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002743define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002744
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002745# Arguments passed to configure.
2746
2747CONFIG_ARGS="$ac_configure_args"
2748
Matthias Kloseb9621712010-04-24 17:59:49 +00002749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2750$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002751# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002752if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002753 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002754 case $enableval in
2755 yes)
2756 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002757 if test ! -d "${enableval}"
2758 then
2759 enableval=/
2760 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002761 ;;
2762 esac
2763 case $enableval in
2764 no)
2765 UNIVERSALSDK=
2766 enable_universalsdk=
2767 ;;
2768 *)
2769 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002770 if test ! -d "${UNIVERSALSDK}"
2771 then
Barry Warsaw278266f2010-10-14 17:38:46 +00002772 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002773 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002774 ;;
2775 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002776
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002777
Thomas Wouters477c8d52006-05-27 19:21:47 +00002778else
2779
2780 UNIVERSALSDK=
2781 enable_universalsdk=
2782
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002783fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002784
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002785if test -n "${UNIVERSALSDK}"
2786then
Matthias Kloseb9621712010-04-24 17:59:49 +00002787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2788$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002789else
Matthias Kloseb9621712010-04-24 17:59:49 +00002790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2791$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002792fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002793
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002794
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002795
2796
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002797UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002798
Matthias Kloseb9621712010-04-24 17:59:49 +00002799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2800$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002801
2802# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002803if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002804 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2806$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002807 UNIVERSAL_ARCHS="$withval"
2808
2809else
2810
Matthias Kloseb9621712010-04-24 17:59:49 +00002811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2812$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002813
2814fi
2815
2816
2817
2818
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002819
2820# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002821if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002822 withval=$with_framework_name;
2823 PYTHONFRAMEWORK=${withval}
2824 PYTHONFRAMEWORKDIR=${withval}.framework
2825 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2826
2827else
2828
2829 PYTHONFRAMEWORK=Python
2830 PYTHONFRAMEWORKDIR=Python.framework
2831 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2832
2833fi
2834
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002835# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002836if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002837 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002838 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002839 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002840 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002841 esac
2842 case $enableval in
2843 no)
2844 PYTHONFRAMEWORK=
2845 PYTHONFRAMEWORKDIR=no-framework
2846 PYTHONFRAMEWORKPREFIX=
2847 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002848 FRAMEWORKINSTALLFIRST=
2849 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002850 FRAMEWORKALTINSTALLFIRST=
2851 FRAMEWORKALTINSTALLLAST=
2852 if test "x${prefix}" = "xNONE"; then
2853 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2854 else
2855 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2856 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002857 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002858 ;;
2859 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002860 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002861 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002862 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002863 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002864 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2865 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002866 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002867
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002868 if test "x${prefix}" = "xNONE" ; then
2869 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002870
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002871 else
2872 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2873 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002874
2875 case "${enableval}" in
2876 /System*)
2877 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2878 if test "${prefix}" = "NONE" ; then
2879 # See below
2880 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2881 fi
2882 ;;
2883
2884 /Library*)
2885 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2886 ;;
2887
2888 */Library/Frameworks)
2889 MDIR="`dirname "${enableval}"`"
2890 MDIR="`dirname "${MDIR}"`"
2891 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2892
2893 if test "${prefix}" = "NONE"; then
2894 # User hasn't specified the
2895 # --prefix option, but wants to install
2896 # the framework in a non-default location,
2897 # ensure that the compatibility links get
2898 # installed relative to that prefix as well
2899 # instead of in /usr/local.
2900 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2901 fi
2902 ;;
2903
2904 *)
2905 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2906 ;;
2907 esac
2908
Jack Jansen127e56e2001-09-11 14:41:54 +00002909 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002910
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002911 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002912 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002913 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002914
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002915 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002916
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002917 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2918
2919 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2920
Jack Jansene578a632001-08-15 01:27:14 +00002921 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002922
Guido van Rossum563e7081996-09-10 18:20:48 +00002923else
Martin v. Löwis11437992002-04-12 09:54:03 +00002924
Jack Jansene578a632001-08-15 01:27:14 +00002925 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002926 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002927 PYTHONFRAMEWORKPREFIX=
2928 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002929 FRAMEWORKINSTALLFIRST=
2930 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002931 FRAMEWORKALTINSTALLFIRST=
2932 FRAMEWORKALTINSTALLLAST=
2933 if test "x${prefix}" = "xNONE" ; then
2934 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2935 else
2936 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2937 fi
Jack Jansene578a632001-08-15 01:27:14 +00002938 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002939
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002940
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002941fi
2942
Thomas Wouters477c8d52006-05-27 19:21:47 +00002943
2944
Michael W. Hudson54241132001-12-07 15:38:26 +00002945
2946
2947
2948
Jack Jansene578a632001-08-15 01:27:14 +00002949
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002950
2951
2952
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002953
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002954
Jack Jansene578a632001-08-15 01:27:14 +00002955##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002956## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002957## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002958##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002959# Set name for machine-dependent library files
2960
Matthias Kloseb9621712010-04-24 17:59:49 +00002961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2962$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002963if test -z "$MACHDEP"
2964then
Guido van Rossum563e7081996-09-10 18:20:48 +00002965 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002966 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002967 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002968 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002969 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002970 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002971 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002972 ac_md_system=`echo $ac_sys_system |
2973 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2974 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002975 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002976 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002977
Guido van Rossum07397971997-04-29 21:49:50 +00002978 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002979 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002980 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002981 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002982 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002983 esac
2984fi
Guido van Rossum91922671997-10-09 20:24:13 +00002985
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002986# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2987# disable features if it is defined, without any means to access these
2988# features as extensions. For these systems, we skip the definition of
2989# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2990# some feature, make sure there is no alternative way to access this
2991# feature. Also, when using wildcards, make sure you have verified the
2992# need for not defining _XOPEN_SOURCE on all systems matching the
2993# wildcard, and that the wildcard does not include future systems
2994# (which may remove their limitations).
2995case $ac_sys_system/$ac_sys_release in
2996 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2997 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002998 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00002999 # In addition, Stefan Krah confirms that issue #1244610 exists through
3000 # OpenBSD 4.6, but is fixed in 4.7.
3001 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003002 define_xopen_source=no
3003 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3004 # also defined. This can be overridden by defining _BSD_SOURCE
3005 # As this has a different meaning on Linux, only define it on OpenBSD
3006
Matthias Kloseb9621712010-04-24 17:59:49 +00003007$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003008
3009 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003010 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003011 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3012 # also defined. This can be overridden by defining _BSD_SOURCE
3013 # As this has a different meaning on Linux, only define it on OpenBSD
3014
Matthias Kloseb9621712010-04-24 17:59:49 +00003015$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003016
3017 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003018 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3019 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3020 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003021 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 +00003022 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003023 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3024 # request to enable features supported by the standard as a request
3025 # to disable features not supported by the standard. The best way
3026 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3027 # entirely and define __EXTENSIONS__ instead.
3028 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003029 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003030 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3031 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003032 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003033 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003034 define_xopen_source=no;;
3035 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003036 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003037 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003038 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003039 # On FreeBSD 4, the math functions C89 does not cover are never defined
3040 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3041 FreeBSD/4.*)
3042 define_xopen_source=no;;
3043 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3044 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3045 # identifies itself as Darwin/7.*
3046 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3047 # disables platform specific features beyond repair.
3048 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3049 # has no effect, don't bother defining them
3050 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003051 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003052 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003053 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003054 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3055 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3056 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003057 AIX/4)
3058 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003059 AIX/5)
3060 if test `uname -r` -eq 1; then
3061 define_xopen_source=no
3062 fi
3063 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003064 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3065 # defining NI_NUMERICHOST.
3066 QNX/6.3.2)
3067 define_xopen_source=no
3068 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003069
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003070esac
3071
3072if test $define_xopen_source = yes
3073then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003074
Matthias Kloseb9621712010-04-24 17:59:49 +00003075$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003076
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003077
3078 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3079 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3080 # several APIs are not declared. Since this is also needed in some
3081 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003082
Matthias Kloseb9621712010-04-24 17:59:49 +00003083$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003084
3085
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003086
Matthias Kloseb9621712010-04-24 17:59:49 +00003087$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003088
3089
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003090fi
3091
Guido van Rossum91922671997-10-09 20:24:13 +00003092#
3093# SGI compilers allow the specification of the both the ABI and the
3094# ISA on the command line. Depending on the values of these switches,
3095# different and often incompatable code will be generated.
3096#
3097# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3098# thus supply support for various ABI/ISA combinations. The MACHDEP
3099# variable is also adjusted.
3100#
3101
3102if test ! -z "$SGI_ABI"
3103then
3104 CC="cc $SGI_ABI"
3105 LDFLAGS="$SGI_ABI $LDFLAGS"
3106 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3107fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3109$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003110
Jack Jansen6b08a402004-06-03 12:41:45 +00003111# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3112# it may influence the way we can build extensions, so distutils
3113# needs to check it
3114
Thomas Wouters477c8d52006-05-27 19:21:47 +00003115
Jack Jansen6b08a402004-06-03 12:41:45 +00003116CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003117EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003118
Matthias Kloseb9621712010-04-24 17:59:49 +00003119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3120$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003121ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3123$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003124
Guido van Rossum627b2d71993-12-24 10:39:16 +00003125# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003126
3127# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3128# for debug/optimization stuff. BASECFLAGS is for flags that are required
3129# just to get things to compile and link. Users are free to override OPT
3130# when running configure or make. The build should not break if they do.
3131# BASECFLAGS should generally not be messed with, however.
3132
3133# XXX shouldn't some/most/all of this code be merged with the stuff later
3134# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3136$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003137
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003138# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003139if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003140 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003141 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003142 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003143 without_gcc=yes;;
3144 yes) CC=gcc
3145 without_gcc=no;;
3146 *) CC=$withval
3147 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003148 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003149else
Martin v. Löwis11437992002-04-12 09:54:03 +00003150
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003151 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003152 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003153 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003154 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003155 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003156fi
3157
Matthias Kloseb9621712010-04-24 17:59:49 +00003158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3159$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003160
Guido van Rossum8b131c51995-03-09 14:10:13 +00003161# If the user switches compilers, we can't believe the cache
3162if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3163then
Barry Warsaw278266f2010-10-14 17:38:46 +00003164 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003165(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003166fi
3167
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003168# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3169# when the compiler supports them, but we don't always want -O2, and
3170# we set -g later.
3171if test -z "$CFLAGS"; then
3172 CFLAGS=
3173fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003174ac_ext=c
3175ac_cpp='$CPP $CPPFLAGS'
3176ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3177ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3178ac_compiler_gnu=$ac_cv_c_compiler_gnu
3179if test -n "$ac_tool_prefix"; then
3180 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3181set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3183$as_echo_n "checking for $ac_word... " >&6; }
3184if test "${ac_cv_prog_CC+set}" = set; then :
3185 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003186else
3187 if test -n "$CC"; then
3188 ac_cv_prog_CC="$CC" # Let the user override the test.
3189else
Martin v. Löwis11437992002-04-12 09:54:03 +00003190as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3191for as_dir in $PATH
3192do
3193 IFS=$as_save_IFS
3194 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003195 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003196 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 +00003197 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003198 $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 +00003199 break 2
3200 fi
3201done
Matthias Kloseb9621712010-04-24 17:59:49 +00003202 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003203IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003204
Jack Jansendd19cf82001-12-06 22:36:17 +00003205fi
3206fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003207CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003208if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3210$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003211else
Matthias Kloseb9621712010-04-24 17:59:49 +00003212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3213$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003214fi
3215
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003216
Martin v. Löwis11437992002-04-12 09:54:03 +00003217fi
3218if test -z "$ac_cv_prog_CC"; then
3219 ac_ct_CC=$CC
3220 # Extract the first word of "gcc", so it can be a program name with args.
3221set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3223$as_echo_n "checking for $ac_word... " >&6; }
3224if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3225 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003226else
3227 if test -n "$ac_ct_CC"; then
3228 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3229else
3230as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3231for as_dir in $PATH
3232do
3233 IFS=$as_save_IFS
3234 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003235 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003236 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 +00003237 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003238 $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 +00003239 break 2
3240 fi
3241done
Matthias Kloseb9621712010-04-24 17:59:49 +00003242 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003243IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003244
3245fi
3246fi
3247ac_ct_CC=$ac_cv_prog_ac_ct_CC
3248if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3250$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003251else
Matthias Kloseb9621712010-04-24 17:59:49 +00003252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3253$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003254fi
3255
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003256 if test "x$ac_ct_CC" = x; then
3257 CC=""
3258 else
3259 case $cross_compiling:$ac_tool_warned in
3260yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003261{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3262$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003263ac_tool_warned=yes ;;
3264esac
3265 CC=$ac_ct_CC
3266 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003267else
3268 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003269fi
3270
Jack Jansendd19cf82001-12-06 22:36:17 +00003271if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003272 if test -n "$ac_tool_prefix"; then
3273 # 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 +00003274set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3276$as_echo_n "checking for $ac_word... " >&6; }
3277if test "${ac_cv_prog_CC+set}" = set; then :
3278 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003279else
3280 if test -n "$CC"; then
3281 ac_cv_prog_CC="$CC" # Let the user override the test.
3282else
Martin v. Löwis11437992002-04-12 09:54:03 +00003283as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3284for as_dir in $PATH
3285do
3286 IFS=$as_save_IFS
3287 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003288 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003289 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 +00003290 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003291 $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 +00003292 break 2
3293 fi
3294done
Matthias Kloseb9621712010-04-24 17:59:49 +00003295 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003296IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003297
3298fi
3299fi
3300CC=$ac_cv_prog_CC
3301if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3303$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003304else
Matthias Kloseb9621712010-04-24 17:59:49 +00003305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3306$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003307fi
3308
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003309
Martin v. Löwis11437992002-04-12 09:54:03 +00003310 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003311fi
3312if test -z "$CC"; then
3313 # Extract the first word of "cc", so it can be a program name with args.
3314set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3316$as_echo_n "checking for $ac_word... " >&6; }
3317if test "${ac_cv_prog_CC+set}" = set; then :
3318 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003319else
3320 if test -n "$CC"; then
3321 ac_cv_prog_CC="$CC" # Let the user override the test.
3322else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003323 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003324as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3325for as_dir in $PATH
3326do
3327 IFS=$as_save_IFS
3328 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003329 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003330 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 +00003331 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3332 ac_prog_rejected=yes
3333 continue
3334 fi
3335 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003336 $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 +00003337 break 2
3338 fi
3339done
Matthias Kloseb9621712010-04-24 17:59:49 +00003340 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003341IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003342
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003343if test $ac_prog_rejected = yes; then
3344 # We found a bogon in the path, so make sure we never use it.
3345 set dummy $ac_cv_prog_CC
3346 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003347 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003348 # We chose a different compiler from the bogus one.
3349 # However, it has the same basename, so the bogon will be chosen
3350 # first if we set CC to just the basename; use the full file name.
3351 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003352 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003353 fi
3354fi
3355fi
3356fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003357CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003358if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3360$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003361else
Matthias Kloseb9621712010-04-24 17:59:49 +00003362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3363$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003364fi
3365
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003366
Martin v. Löwis11437992002-04-12 09:54:03 +00003367fi
3368if test -z "$CC"; then
3369 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003370 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003371 do
3372 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3373set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3375$as_echo_n "checking for $ac_word... " >&6; }
3376if test "${ac_cv_prog_CC+set}" = set; then :
3377 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003378else
3379 if test -n "$CC"; then
3380 ac_cv_prog_CC="$CC" # Let the user override the test.
3381else
Martin v. Löwis11437992002-04-12 09:54:03 +00003382as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3383for as_dir in $PATH
3384do
3385 IFS=$as_save_IFS
3386 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003387 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003388 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 +00003389 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003390 $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 +00003391 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003392 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003393done
Matthias Kloseb9621712010-04-24 17:59:49 +00003394 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003395IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003396
3397fi
3398fi
3399CC=$ac_cv_prog_CC
3400if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3402$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003403else
Matthias Kloseb9621712010-04-24 17:59:49 +00003404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3405$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003406fi
3407
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003408
Martin v. Löwis11437992002-04-12 09:54:03 +00003409 test -n "$CC" && break
3410 done
3411fi
3412if test -z "$CC"; then
3413 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003414 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003415do
3416 # Extract the first word of "$ac_prog", so it can be a program name with args.
3417set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3419$as_echo_n "checking for $ac_word... " >&6; }
3420if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3421 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003422else
3423 if test -n "$ac_ct_CC"; then
3424 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3425else
3426as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3427for as_dir in $PATH
3428do
3429 IFS=$as_save_IFS
3430 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003431 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003432 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 +00003433 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003434 $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 +00003435 break 2
3436 fi
3437done
Matthias Kloseb9621712010-04-24 17:59:49 +00003438 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003439IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003440
Martin v. Löwis11437992002-04-12 09:54:03 +00003441fi
3442fi
3443ac_ct_CC=$ac_cv_prog_ac_ct_CC
3444if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3446$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003447else
Matthias Kloseb9621712010-04-24 17:59:49 +00003448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3449$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003450fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003451
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003452
Martin v. Löwis11437992002-04-12 09:54:03 +00003453 test -n "$ac_ct_CC" && break
3454done
Michael W. Hudson54241132001-12-07 15:38:26 +00003455
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003456 if test "x$ac_ct_CC" = x; then
3457 CC=""
3458 else
3459 case $cross_compiling:$ac_tool_warned in
3460yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003461{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3462$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003463ac_tool_warned=yes ;;
3464esac
3465 CC=$ac_ct_CC
3466 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003467fi
3468
3469fi
3470
3471
Matthias Kloseb9621712010-04-24 17:59:49 +00003472test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3473$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw278266f2010-10-14 17:38:46 +00003474as_fn_error $? "no acceptable C compiler found in \$PATH
3475See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003476
3477# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003478$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3479set X $ac_compile
3480ac_compiler=$2
3481for ac_option in --version -v -V -qversion; do
3482 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003483case "(($ac_try" in
3484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3485 *) ac_try_echo=$ac_try;;
3486esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003487eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3488$as_echo "$ac_try_echo"; } >&5
3489 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003490 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003491 if test -s conftest.err; then
3492 sed '10a\
3493... rest of stderr output deleted ...
3494 10q' conftest.err >conftest.er1
3495 cat conftest.er1 >&5
3496 fi
3497 rm -f conftest.er1 conftest.err
3498 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3499 test $ac_status = 0; }
3500done
Martin v. Löwis11437992002-04-12 09:54:03 +00003501
Matthias Kloseb9621712010-04-24 17:59:49 +00003502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003503/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003504
Martin v. Löwis11437992002-04-12 09:54:03 +00003505int
3506main ()
3507{
3508
3509 ;
3510 return 0;
3511}
3512_ACEOF
3513ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003514ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003515# Try to create an executable without -o first, disregard a.out.
3516# It will help us diagnose broken compilers, and finding out an intuition
3517# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3519$as_echo_n "checking whether the C compiler works... " >&6; }
3520ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3521
3522# The possible output files:
3523ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3524
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003525ac_rmfiles=
3526for ac_file in $ac_files
3527do
3528 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003529 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003530 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3531 esac
3532done
3533rm -f $ac_rmfiles
3534
Matthias Kloseb9621712010-04-24 17:59:49 +00003535if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003536case "(($ac_try" in
3537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3538 *) ac_try_echo=$ac_try;;
3539esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003540eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3541$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003542 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003543 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003544 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3545 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003546 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3547# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3548# in a Makefile. We should not override ac_cv_exeext if it was cached,
3549# so that the user can short-circuit this test for compilers unknown to
3550# Autoconf.
3551for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003552do
3553 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003554 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003555 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003556 ;;
3557 [ab].out )
3558 # We found the default executable, but exeext='' is most
3559 # certainly right.
3560 break;;
3561 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003562 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003563 then :; else
3564 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3565 fi
3566 # We set ac_cv_exeext here because the later test for it is not
3567 # safe: cross compilers may not add the suffix if given an `-o'
3568 # argument, so we may need to know it at that point already.
3569 # Even if this section looks crufty: it has the advantage of
3570 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003571 break;;
3572 * )
3573 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003574 esac
3575done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003576test "$ac_cv_exeext" = no && ac_cv_exeext=
3577
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003578else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003579 ac_file=''
3580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003581if test -z "$ac_file"; then :
3582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3583$as_echo "no" >&6; }
3584$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003585sed 's/^/| /' conftest.$ac_ext >&5
3586
Matthias Kloseb9621712010-04-24 17:59:49 +00003587{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3588$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw278266f2010-10-14 17:38:46 +00003589as_fn_error 77 "C compiler cannot create executables
3590See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003591else
3592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3593$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003594fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3596$as_echo_n "checking for C compiler default output file name... " >&6; }
3597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3598$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003599ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003600
Matthias Kloseb9621712010-04-24 17:59:49 +00003601rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003602ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3604$as_echo_n "checking for suffix of executables... " >&6; }
3605if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003606case "(($ac_try" in
3607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3608 *) ac_try_echo=$ac_try;;
3609esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003610eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3611$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003612 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003613 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003614 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3615 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003616 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3617# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3618# work properly (i.e., refer to `conftest.exe'), while it won't with
3619# `rm'.
3620for ac_file in conftest.exe conftest conftest.*; do
3621 test -f "$ac_file" || continue
3622 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003623 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003624 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3625 break;;
3626 * ) break;;
3627 esac
3628done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003629else
Matthias Kloseb9621712010-04-24 17:59:49 +00003630 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3631$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw278266f2010-10-14 17:38:46 +00003632as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3633See \`config.log' for more details" "$LINENO" 5 ; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003634fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003635rm -f conftest conftest$ac_cv_exeext
3636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3637$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003638
3639rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003640EXEEXT=$ac_cv_exeext
3641ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3643/* end confdefs.h. */
3644#include <stdio.h>
3645int
3646main ()
3647{
3648FILE *f = fopen ("conftest.out", "w");
3649 return ferror (f) || fclose (f) != 0;
3650
3651 ;
3652 return 0;
3653}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003655ac_clean_files="$ac_clean_files conftest.out"
3656# Check that the compiler produces executables we can run. If not, either
3657# the compiler is broken, or we cross compile.
3658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3659$as_echo_n "checking whether we are cross compiling... " >&6; }
3660if test "$cross_compiling" != yes; then
3661 { { ac_try="$ac_link"
3662case "(($ac_try" in
3663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3664 *) ac_try_echo=$ac_try;;
3665esac
3666eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3667$as_echo "$ac_try_echo"; } >&5
3668 (eval "$ac_link") 2>&5
3669 ac_status=$?
3670 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3671 test $ac_status = 0; }
3672 if { ac_try='./conftest$ac_cv_exeext'
3673 { { case "(($ac_try" in
3674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3675 *) ac_try_echo=$ac_try;;
3676esac
3677eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3678$as_echo "$ac_try_echo"; } >&5
3679 (eval "$ac_try") 2>&5
3680 ac_status=$?
3681 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3682 test $ac_status = 0; }; }; then
3683 cross_compiling=no
3684 else
3685 if test "$cross_compiling" = maybe; then
3686 cross_compiling=yes
3687 else
3688 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3689$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw278266f2010-10-14 17:38:46 +00003690as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003691If you meant to cross compile, use \`--host'.
Barry Warsaw278266f2010-10-14 17:38:46 +00003692See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003693 fi
3694 fi
3695fi
3696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3697$as_echo "$cross_compiling" >&6; }
3698
3699rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3700ac_clean_files=$ac_clean_files_save
3701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3702$as_echo_n "checking for suffix of object files... " >&6; }
3703if test "${ac_cv_objext+set}" = set; then :
3704 $as_echo_n "(cached) " >&6
3705else
3706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003707/* end confdefs.h. */
3708
3709int
3710main ()
3711{
3712
3713 ;
3714 return 0;
3715}
3716_ACEOF
3717rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003718if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003719case "(($ac_try" in
3720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3721 *) ac_try_echo=$ac_try;;
3722esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003723eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3724$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003726 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003727 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3728 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003729 for ac_file in conftest.o conftest.obj conftest.*; do
3730 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003731 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003732 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003733 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3734 break;;
3735 esac
3736done
3737else
Matthias Kloseb9621712010-04-24 17:59:49 +00003738 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003739sed 's/^/| /' conftest.$ac_ext >&5
3740
Matthias Kloseb9621712010-04-24 17:59:49 +00003741{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3742$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw278266f2010-10-14 17:38:46 +00003743as_fn_error $? "cannot compute suffix of object files: cannot compile
3744See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003745fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003746rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3749$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003750OBJEXT=$ac_cv_objext
3751ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3753$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3754if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3755 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003756else
Matthias Kloseb9621712010-04-24 17:59:49 +00003757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003758/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003759
Martin v. Löwis11437992002-04-12 09:54:03 +00003760int
3761main ()
3762{
3763#ifndef __GNUC__
3764 choke me
3765#endif
3766
3767 ;
3768 return 0;
3769}
3770_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003771if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003772 ac_compiler_gnu=yes
3773else
Matthias Kloseb9621712010-04-24 17:59:49 +00003774 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003775fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003777ac_cv_c_compiler_gnu=$ac_compiler_gnu
3778
3779fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3781$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3782if test $ac_compiler_gnu = yes; then
3783 GCC=yes
3784else
3785 GCC=
3786fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003787ac_test_CFLAGS=${CFLAGS+set}
3788ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3790$as_echo_n "checking whether $CC accepts -g... " >&6; }
3791if test "${ac_cv_prog_cc_g+set}" = set; then :
3792 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003793else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003794 ac_save_c_werror_flag=$ac_c_werror_flag
3795 ac_c_werror_flag=yes
3796 ac_cv_prog_cc_g=no
3797 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003799/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003800
Martin v. Löwis11437992002-04-12 09:54:03 +00003801int
3802main ()
3803{
3804
3805 ;
3806 return 0;
3807}
3808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003809if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003810 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003811else
Matthias Kloseb9621712010-04-24 17:59:49 +00003812 CFLAGS=""
3813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003814/* end confdefs.h. */
3815
3816int
3817main ()
3818{
3819
3820 ;
3821 return 0;
3822}
3823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003824if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003825
Matthias Kloseb9621712010-04-24 17:59:49 +00003826else
3827 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003828 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003830/* end confdefs.h. */
3831
3832int
3833main ()
3834{
3835
3836 ;
3837 return 0;
3838}
3839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003840if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003841 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003842fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003844fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3846fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3848 ac_c_werror_flag=$ac_save_c_werror_flag
3849fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3851$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003852if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003853 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003854elif test $ac_cv_prog_cc_g = yes; then
3855 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003856 CFLAGS="-g -O2"
3857 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003858 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003859 fi
3860else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003861 if test "$GCC" = yes; then
3862 CFLAGS="-O2"
3863 else
3864 CFLAGS=
3865 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3868$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3869if test "${ac_cv_prog_cc_c89+set}" = set; then :
3870 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003871else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003872 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003873ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003875/* end confdefs.h. */
3876#include <stdarg.h>
3877#include <stdio.h>
3878#include <sys/types.h>
3879#include <sys/stat.h>
3880/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3881struct buf { int x; };
3882FILE * (*rcsopen) (struct buf *, struct stat *, int);
3883static char *e (p, i)
3884 char **p;
3885 int i;
3886{
3887 return p[i];
3888}
3889static char *f (char * (*g) (char **, int), char **p, ...)
3890{
3891 char *s;
3892 va_list v;
3893 va_start (v,p);
3894 s = g (p, va_arg (v,int));
3895 va_end (v);
3896 return s;
3897}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003898
3899/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3900 function prototypes and stuff, but not '\xHH' hex character constants.
3901 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003902 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003903 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3904 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003905 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003906int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3907
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003908/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3909 inside strings and character constants. */
3910#define FOO(x) 'x'
3911int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3912
Skip Montanaro6dead952003-09-25 14:50:04 +00003913int test (int i, double x);
3914struct s1 {int (*f) (int a);};
3915struct s2 {int (*f) (double a);};
3916int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3917int argc;
3918char **argv;
3919int
3920main ()
3921{
3922return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3923 ;
3924 return 0;
3925}
3926_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003927for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3928 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003929do
3930 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003931 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003932 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003933fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003934rm -f core conftest.err conftest.$ac_objext
3935 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003936done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003937rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003938CC=$ac_save_CC
3939
3940fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003941# AC_CACHE_VAL
3942case "x$ac_cv_prog_cc_c89" in
3943 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3945$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3948$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003949 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003950 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3952$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003953esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003954if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003955
Matthias Kloseb9621712010-04-24 17:59:49 +00003956fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003957
Martin v. Löwis11437992002-04-12 09:54:03 +00003958ac_ext=c
3959ac_cpp='$CPP $CPPFLAGS'
3960ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3961ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3962ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003963
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003964
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003965
3966
Matthias Kloseb9621712010-04-24 17:59:49 +00003967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3968$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003969
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003970# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003971if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003972 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003973
3974 case $withval in
3975 no) with_cxx_main=no
3976 MAINCC='$(CC)';;
3977 yes) with_cxx_main=yes
3978 MAINCC='$(CXX)';;
3979 *) with_cxx_main=yes
3980 MAINCC=$withval
3981 if test -z "$CXX"
3982 then
3983 CXX=$withval
3984 fi;;
3985 esac
3986else
3987
3988 with_cxx_main=no
3989 MAINCC='$(CC)'
3990
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003991fi
3992
Matthias Kloseb9621712010-04-24 17:59:49 +00003993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
3994$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003995
3996preset_cxx="$CXX"
3997if test -z "$CXX"
3998then
3999 case "$CC" in
4000 gcc) # Extract the first word of "g++", so it can be a program name with args.
4001set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4003$as_echo_n "checking for $ac_word... " >&6; }
4004if test "${ac_cv_path_CXX+set}" = set; then :
4005 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004006else
4007 case $CXX in
4008 [\\/]* | ?:[\\/]*)
4009 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4010 ;;
4011 *)
4012 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4013for as_dir in notfound
4014do
4015 IFS=$as_save_IFS
4016 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004017 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004018 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 +00004019 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004020 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004021 break 2
4022 fi
4023done
Matthias Kloseb9621712010-04-24 17:59:49 +00004024 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004025IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004026
4027 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4028 ;;
4029esac
4030fi
4031CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004032if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4034$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004035else
Matthias Kloseb9621712010-04-24 17:59:49 +00004036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4037$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004039
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004040 ;;
4041 cc) # Extract the first word of "c++", so it can be a program name with args.
4042set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4044$as_echo_n "checking for $ac_word... " >&6; }
4045if test "${ac_cv_path_CXX+set}" = set; then :
4046 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004047else
4048 case $CXX in
4049 [\\/]* | ?:[\\/]*)
4050 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4051 ;;
4052 *)
4053 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4054for as_dir in notfound
4055do
4056 IFS=$as_save_IFS
4057 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004058 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004059 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 +00004060 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004061 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004062 break 2
4063 fi
4064done
Matthias Kloseb9621712010-04-24 17:59:49 +00004065 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004066IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004067
4068 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4069 ;;
4070esac
4071fi
4072CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004073if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4075$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004076else
Matthias Kloseb9621712010-04-24 17:59:49 +00004077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4078$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004079fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004080
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004081 ;;
4082 esac
4083 if test "$CXX" = "notfound"
4084 then
4085 CXX=""
4086 fi
4087fi
4088if test -z "$CXX"
4089then
4090 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4091do
4092 # Extract the first word of "$ac_prog", so it can be a program name with args.
4093set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4095$as_echo_n "checking for $ac_word... " >&6; }
4096if test "${ac_cv_prog_CXX+set}" = set; then :
4097 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004098else
4099 if test -n "$CXX"; then
4100 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4101else
4102as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4103for as_dir in $PATH
4104do
4105 IFS=$as_save_IFS
4106 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004107 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004108 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 +00004109 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004110 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004111 break 2
4112 fi
4113done
Matthias Kloseb9621712010-04-24 17:59:49 +00004114 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004115IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004116
4117fi
4118fi
4119CXX=$ac_cv_prog_CXX
4120if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4122$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004123else
Matthias Kloseb9621712010-04-24 17:59:49 +00004124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4125$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004126fi
4127
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004128
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004129 test -n "$CXX" && break
4130done
4131test -n "$CXX" || CXX="notfound"
4132
4133 if test "$CXX" = "notfound"
4134 then
4135 CXX=""
4136 fi
4137fi
4138if test "$preset_cxx" != "$CXX"
4139then
Matthias Kloseb9621712010-04-24 17:59:49 +00004140 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004141
4142 By default, distutils will build C++ extension modules with \"$CXX\".
4143 If this is not intended, then set CXX on the configure command line.
4144 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004145$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004146
4147 By default, distutils will build C++ extension modules with \"$CXX\".
4148 If this is not intended, then set CXX on the configure command line.
4149 " >&2;}
4150fi
4151
4152
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004153# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004154
4155ac_ext=c
4156ac_cpp='$CPP $CPPFLAGS'
4157ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4158ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4159ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4161$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004162# On Suns, sometimes $CPP names a directory.
4163if test -n "$CPP" && test -d "$CPP"; then
4164 CPP=
4165fi
4166if test -z "$CPP"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004167 if test "${ac_cv_prog_CPP+set}" = set; then :
4168 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004169else
Martin v. Löwis11437992002-04-12 09:54:03 +00004170 # Double quotes because CPP needs to be expanded
4171 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4172 do
4173 ac_preproc_ok=false
4174for ac_c_preproc_warn_flag in '' yes
4175do
4176 # Use a header file that comes with gcc, so configuring glibc
4177 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004178 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4179 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004180 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004181 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004183/* end confdefs.h. */
4184#ifdef __STDC__
4185# include <limits.h>
4186#else
4187# include <assert.h>
4188#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004189 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004191if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004192
Matthias Kloseb9621712010-04-24 17:59:49 +00004193else
Martin v. Löwis11437992002-04-12 09:54:03 +00004194 # Broken: fails on valid input.
4195continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004196fi
Barry Warsaw278266f2010-10-14 17:38:46 +00004197rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004198
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004199 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004200 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004202/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004203#include <ac_nonexistent.h>
4204_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004205if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004206 # Broken: success on invalid input.
4207continue
4208else
Martin v. Löwis11437992002-04-12 09:54:03 +00004209 # Passes both tests.
4210ac_preproc_ok=:
4211break
4212fi
Barry Warsaw278266f2010-10-14 17:38:46 +00004213rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004214
4215done
4216# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Barry Warsaw278266f2010-10-14 17:38:46 +00004217rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004218if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004219 break
4220fi
4221
4222 done
4223 ac_cv_prog_CPP=$CPP
4224
4225fi
4226 CPP=$ac_cv_prog_CPP
4227else
4228 ac_cv_prog_CPP=$CPP
4229fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4231$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004232ac_preproc_ok=false
4233for ac_c_preproc_warn_flag in '' yes
4234do
4235 # Use a header file that comes with gcc, so configuring glibc
4236 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004237 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4238 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004239 # On the NeXT, cc -E runs the code through the compiler's parser,
4240 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004242/* end confdefs.h. */
4243#ifdef __STDC__
4244# include <limits.h>
4245#else
4246# include <assert.h>
4247#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004248 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004249_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004250if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004251
Matthias Kloseb9621712010-04-24 17:59:49 +00004252else
Martin v. Löwis11437992002-04-12 09:54:03 +00004253 # Broken: fails on valid input.
4254continue
4255fi
Barry Warsaw278266f2010-10-14 17:38:46 +00004256rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004257
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004258 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004259 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004261/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004262#include <ac_nonexistent.h>
4263_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004264if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004265 # Broken: success on invalid input.
4266continue
4267else
Martin v. Löwis11437992002-04-12 09:54:03 +00004268 # Passes both tests.
4269ac_preproc_ok=:
4270break
4271fi
Barry Warsaw278266f2010-10-14 17:38:46 +00004272rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004273
4274done
4275# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Barry Warsaw278266f2010-10-14 17:38:46 +00004276rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004277if $ac_preproc_ok; then :
4278
Martin v. Löwis11437992002-04-12 09:54:03 +00004279else
Matthias Kloseb9621712010-04-24 17:59:49 +00004280 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4281$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw278266f2010-10-14 17:38:46 +00004282as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4283See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004284fi
4285
4286ac_ext=c
4287ac_cpp='$CPP $CPPFLAGS'
4288ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4289ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4290ac_compiler_gnu=$ac_cv_c_compiler_gnu
4291
4292
Matthias Kloseb9621712010-04-24 17:59:49 +00004293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4294$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4295if test "${ac_cv_path_GREP+set}" = set; then :
4296 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004297else
Matthias Kloseb9621712010-04-24 17:59:49 +00004298 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004299 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004300 # Loop through the user's path and test for each of PROGNAME-LIST
4301 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004302for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4303do
4304 IFS=$as_save_IFS
4305 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004306 for ac_prog in grep ggrep; do
4307 for ac_exec_ext in '' $ac_executable_extensions; do
4308 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4309 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4310# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004311 # Check for GNU $ac_path_GREP
4312case `"$ac_path_GREP" --version 2>&1` in
4313*GNU*)
4314 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4315*)
4316 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004317 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004318 while :
4319 do
4320 cat "conftest.in" "conftest.in" >"conftest.tmp"
4321 mv "conftest.tmp" "conftest.in"
4322 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004323 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004324 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4325 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004326 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004327 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4328 # Best one so far, save it but keep looking for a better one
4329 ac_cv_path_GREP="$ac_path_GREP"
4330 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004331 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004332 # 10*(2^10) chars as input seems more than enough
4333 test $ac_count -gt 10 && break
4334 done
4335 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4336esac
4337
Matthias Kloseb9621712010-04-24 17:59:49 +00004338 $ac_path_GREP_found && break 3
4339 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004341 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004342IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004343 if test -z "$ac_cv_path_GREP"; then
Barry Warsaw278266f2010-10-14 17:38:46 +00004344 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 +00004345 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004346else
4347 ac_cv_path_GREP=$GREP
4348fi
4349
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004350fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4352$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004353 GREP="$ac_cv_path_GREP"
4354
4355
Matthias Kloseb9621712010-04-24 17:59:49 +00004356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4357$as_echo_n "checking for egrep... " >&6; }
4358if test "${ac_cv_path_EGREP+set}" = set; then :
4359 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004360else
4361 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4362 then ac_cv_path_EGREP="$GREP -E"
4363 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004364 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004365 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004366 # Loop through the user's path and test for each of PROGNAME-LIST
4367 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004368for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4369do
4370 IFS=$as_save_IFS
4371 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004372 for ac_prog in egrep; do
4373 for ac_exec_ext in '' $ac_executable_extensions; do
4374 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4375 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4376# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004377 # Check for GNU $ac_path_EGREP
4378case `"$ac_path_EGREP" --version 2>&1` in
4379*GNU*)
4380 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4381*)
4382 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004383 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004384 while :
4385 do
4386 cat "conftest.in" "conftest.in" >"conftest.tmp"
4387 mv "conftest.tmp" "conftest.in"
4388 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004389 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004390 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4391 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004392 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004393 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4394 # Best one so far, save it but keep looking for a better one
4395 ac_cv_path_EGREP="$ac_path_EGREP"
4396 ac_path_EGREP_max=$ac_count
4397 fi
4398 # 10*(2^10) chars as input seems more than enough
4399 test $ac_count -gt 10 && break
4400 done
4401 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4402esac
4403
Matthias Kloseb9621712010-04-24 17:59:49 +00004404 $ac_path_EGREP_found && break 3
4405 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004406 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004407 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004408IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004409 if test -z "$ac_cv_path_EGREP"; then
Barry Warsaw278266f2010-10-14 17:38:46 +00004410 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 +00004411 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004412else
4413 ac_cv_path_EGREP=$EGREP
4414fi
4415
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004416 fi
4417fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4419$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004420 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004421
4422
Matthias Kloseb9621712010-04-24 17:59:49 +00004423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4424$as_echo_n "checking for ANSI C header files... " >&6; }
4425if test "${ac_cv_header_stdc+set}" = set; then :
4426 $as_echo_n "(cached) " >&6
4427else
4428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004429/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004430#include <stdlib.h>
4431#include <stdarg.h>
4432#include <string.h>
4433#include <float.h>
4434
4435int
4436main ()
4437{
4438
4439 ;
4440 return 0;
4441}
4442_ACEOF
4443if ac_fn_c_try_compile "$LINENO"; then :
4444 ac_cv_header_stdc=yes
4445else
4446 ac_cv_header_stdc=no
4447fi
4448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4449
4450if test $ac_cv_header_stdc = yes; then
4451 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4453/* end confdefs.h. */
4454#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004455
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004456_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004457if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004458 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004459
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004460else
Matthias Kloseb9621712010-04-24 17:59:49 +00004461 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004462fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004463rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004464
Matthias Kloseb9621712010-04-24 17:59:49 +00004465fi
4466
4467if test $ac_cv_header_stdc = yes; then
4468 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4470/* end confdefs.h. */
4471#include <stdlib.h>
4472
4473_ACEOF
4474if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4475 $EGREP "free" >/dev/null 2>&1; then :
4476
4477else
4478 ac_cv_header_stdc=no
4479fi
4480rm -f conftest*
4481
4482fi
4483
4484if test $ac_cv_header_stdc = yes; then
4485 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4486 if test "$cross_compiling" = yes; then :
4487 :
4488else
4489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4490/* end confdefs.h. */
4491#include <ctype.h>
4492#include <stdlib.h>
4493#if ((' ' & 0x0FF) == 0x020)
4494# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4495# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4496#else
4497# define ISLOWER(c) \
4498 (('a' <= (c) && (c) <= 'i') \
4499 || ('j' <= (c) && (c) <= 'r') \
4500 || ('s' <= (c) && (c) <= 'z'))
4501# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4502#endif
4503
4504#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4505int
4506main ()
4507{
4508 int i;
4509 for (i = 0; i < 256; i++)
4510 if (XOR (islower (i), ISLOWER (i))
4511 || toupper (i) != TOUPPER (i))
4512 return 2;
4513 return 0;
4514}
4515_ACEOF
4516if ac_fn_c_try_run "$LINENO"; then :
4517
4518else
4519 ac_cv_header_stdc=no
4520fi
4521rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4522 conftest.$ac_objext conftest.beam conftest.$ac_ext
4523fi
4524
4525fi
4526fi
4527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4528$as_echo "$ac_cv_header_stdc" >&6; }
4529if test $ac_cv_header_stdc = yes; then
4530
4531$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4532
4533fi
4534
4535# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4536for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4537 inttypes.h stdint.h unistd.h
4538do :
4539 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4540ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4541"
Barry Warsaw278266f2010-10-14 17:38:46 +00004542if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004543 cat >>confdefs.h <<_ACEOF
4544#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4545_ACEOF
4546
4547fi
4548
4549done
4550
4551
4552
4553 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4554if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4555 MINIX=yes
4556else
4557 MINIX=
4558fi
4559
4560
4561 if test "$MINIX" = yes; then
4562
4563$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4564
4565
4566$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4567
4568
4569$as_echo "#define _MINIX 1" >>confdefs.h
4570
4571 fi
4572
4573
4574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4575$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4576if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4577 $as_echo_n "(cached) " >&6
4578else
4579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4580/* end confdefs.h. */
4581
4582# define __EXTENSIONS__ 1
4583 $ac_includes_default
4584int
4585main ()
4586{
4587
4588 ;
4589 return 0;
4590}
4591_ACEOF
4592if ac_fn_c_try_compile "$LINENO"; then :
4593 ac_cv_safe_to_define___extensions__=yes
4594else
4595 ac_cv_safe_to_define___extensions__=no
4596fi
4597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4598fi
4599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4600$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4601 test $ac_cv_safe_to_define___extensions__ = yes &&
4602 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4603
4604 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4605
4606 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4607
4608 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4609
4610 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4611
4612
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004613
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004614# Check for unsupported systems
4615case $ac_sys_system/$ac_sys_release in
4616atheos*|Linux*/1*)
4617 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4618 echo See README for details.
4619 exit 1;;
4620esac
4621
4622
Matthias Kloseb9621712010-04-24 17:59:49 +00004623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4624$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004625
4626# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004627if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004628 withval=$with_suffix;
4629 case $withval in
4630 no) EXEEXT=;;
4631 yes) EXEEXT=.exe;;
4632 *) EXEEXT=$withval;;
4633 esac
4634fi
4635
Matthias Kloseb9621712010-04-24 17:59:49 +00004636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4637$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004638
4639# Test whether we're running on a non-case-sensitive system, in which
4640# case we give a warning if no ext is given
4641
Matthias Kloseb9621712010-04-24 17:59:49 +00004642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4643$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004644if test ! -d CaseSensitiveTestDir; then
4645mkdir CaseSensitiveTestDir
4646fi
4647
4648if test -d casesensitivetestdir
4649then
Matthias Kloseb9621712010-04-24 17:59:49 +00004650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4651$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004652 BUILDEXEEXT=.exe
4653else
Matthias Kloseb9621712010-04-24 17:59:49 +00004654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4655$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004656 BUILDEXEEXT=$EXEEXT
4657fi
4658rmdir CaseSensitiveTestDir
4659
4660case $MACHDEP in
4661bsdos*)
4662 case $CC in
4663 gcc) CC="$CC -D_HAVE_BSDI";;
4664 esac;;
4665esac
4666
4667case $ac_sys_system in
4668hp*|HP*)
4669 case $CC in
4670 cc|*/cc) CC="$CC -Ae";;
4671 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004672esac
4673
4674
4675
Matthias Kloseb9621712010-04-24 17:59:49 +00004676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4677$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004678if test -z "$LIBRARY"
4679then
4680 LIBRARY='libpython$(VERSION).a'
4681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4683$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004684
4685# LDLIBRARY is the name of the library to link against (as opposed to the
4686# name of the library into which to insert object files). BLDLIBRARY is also
4687# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4688# is blank as the main program is not linked directly against LDLIBRARY.
4689# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4690# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4691# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4692# DLLLIBRARY is the shared (i.e., DLL) library.
4693#
4694# RUNSHARED is used to run shared python without installed libraries
4695#
4696# INSTSONAME is the name of the shared library that will be use to install
4697# on the system - some systems like version suffix, others don't
4698
4699
4700
4701
4702
4703
4704LDLIBRARY="$LIBRARY"
4705BLDLIBRARY='$(LDLIBRARY)'
4706INSTSONAME='$(LDLIBRARY)'
4707DLLLIBRARY=''
4708LDLIBRARYDIR=''
4709RUNSHARED=''
4710
4711# LINKCC is the command that links the python executable -- default is $(CC).
4712# If CXX is set, and if it is needed to link a main function that was
4713# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4714# python might then depend on the C++ runtime
4715# This is altered for AIX in order to build the export list before
4716# linking.
4717
Matthias Kloseb9621712010-04-24 17:59:49 +00004718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4719$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004720if test -z "$LINKCC"
4721then
4722 LINKCC='$(PURIFY) $(MAINCC)'
4723 case $ac_sys_system in
4724 AIX*)
4725 exp_extra="\"\""
4726 if test $ac_sys_release -ge 5 -o \
4727 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4728 exp_extra="."
4729 fi
4730 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004731 QNX*)
4732 # qcc must be used because the other compilers do not
4733 # support -N.
4734 LINKCC=qcc;;
4735 esac
4736fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4738$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004739
4740# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4741# make sure we default having it set to "no": this is used by
4742# distutils.unixccompiler to know if it should add --enable-new-dtags
4743# to linker command lines, and failing to detect GNU ld simply results
4744# in the same bahaviour as before.
4745
Matthias Kloseb9621712010-04-24 17:59:49 +00004746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4747$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004748ac_prog=ld
4749if test "$GCC" = yes; then
4750 ac_prog=`$CC -print-prog-name=ld`
4751fi
4752case `"$ac_prog" -V 2>&1 < /dev/null` in
4753 *GNU*)
4754 GNULD=yes;;
4755 *)
4756 GNULD=no;;
4757esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4759$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004760
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4762$as_echo_n "checking for inline... " >&6; }
4763if test "${ac_cv_c_inline+set}" = set; then :
4764 $as_echo_n "(cached) " >&6
4765else
4766 ac_cv_c_inline=no
4767for ac_kw in inline __inline__ __inline; do
4768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4769/* end confdefs.h. */
4770#ifndef __cplusplus
4771typedef int foo_t;
4772static $ac_kw foo_t static_foo () {return 0; }
4773$ac_kw foo_t foo () {return 0; }
4774#endif
4775
4776_ACEOF
4777if ac_fn_c_try_compile "$LINENO"; then :
4778 ac_cv_c_inline=$ac_kw
4779fi
4780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4781 test "$ac_cv_c_inline" != no && break
4782done
4783
4784fi
4785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4786$as_echo "$ac_cv_c_inline" >&6; }
4787
4788case $ac_cv_c_inline in
4789 inline | yes) ;;
4790 *)
4791 case $ac_cv_c_inline in
4792 no) ac_val=;;
4793 *) ac_val=$ac_cv_c_inline;;
4794 esac
4795 cat >>confdefs.h <<_ACEOF
4796#ifndef __cplusplus
4797#define inline $ac_val
4798#endif
4799_ACEOF
4800 ;;
4801esac
4802
4803if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004804
4805$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004806
4807
4808fi
4809
4810
Matthias Kloseb9621712010-04-24 17:59:49 +00004811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4812$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004813# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004814if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004815 enableval=$enable_shared;
4816fi
4817
4818
4819if test -z "$enable_shared"
4820then
4821 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004822 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004823 enable_shared="yes";;
4824 *)
4825 enable_shared="no";;
4826 esac
4827fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4829$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004830
Matthias Kloseb9621712010-04-24 17:59:49 +00004831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4832$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004833# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004834if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004835 enableval=$enable_profiling; ac_save_cc="$CC"
4836 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004837 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004838 ac_enable_profiling="no"
4839else
Matthias Kloseb9621712010-04-24 17:59:49 +00004840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004841/* end confdefs.h. */
4842int main() { return 0; }
4843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004844if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004845 ac_enable_profiling="yes"
4846else
Matthias Kloseb9621712010-04-24 17:59:49 +00004847 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004849rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4850 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004851fi
4852
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004853 CC="$ac_save_cc"
4854fi
4855
Matthias Kloseb9621712010-04-24 17:59:49 +00004856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4857$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004858
4859case "$ac_enable_profiling" in
4860 "yes")
4861 BASECFLAGS="-pg $BASECFLAGS"
4862 LDFLAGS="-pg $LDFLAGS"
4863 ;;
4864esac
4865
Matthias Kloseb9621712010-04-24 17:59:49 +00004866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4867$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004868
4869# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4870# library that we build, but we do not want to link against it (we
4871# will find it with a -framework option). For this reason there is an
4872# extra variable BLDLIBRARY against which Python and the extension
4873# modules are linked, BLDLIBRARY. This is normally the same as
4874# LDLIBRARY, but empty for MacOSX framework builds.
4875if test "$enable_framework"
4876then
4877 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4878 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4879 BLDLIBRARY=''
4880else
4881 BLDLIBRARY='$(LDLIBRARY)'
4882fi
4883
4884# Other platforms follow
4885if test $enable_shared = "yes"; then
4886
Matthias Kloseb9621712010-04-24 17:59:49 +00004887$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004888
4889 case $ac_sys_system in
4890 CYGWIN*)
4891 LDLIBRARY='libpython$(VERSION).dll.a'
4892 DLLLIBRARY='libpython$(VERSION).dll'
4893 ;;
4894 SunOS*)
4895 LDLIBRARY='libpython$(VERSION).so'
4896 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4897 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4898 INSTSONAME="$LDLIBRARY".$SOVERSION
4899 ;;
4900 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4901 LDLIBRARY='libpython$(VERSION).so'
4902 BLDLIBRARY='-L. -lpython$(VERSION)'
4903 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4904 case $ac_sys_system in
4905 FreeBSD*)
4906 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4907 ;;
4908 esac
4909 INSTSONAME="$LDLIBRARY".$SOVERSION
4910 ;;
4911 hp*|HP*)
4912 case `uname -m` in
4913 ia64)
4914 LDLIBRARY='libpython$(VERSION).so'
4915 ;;
4916 *)
4917 LDLIBRARY='libpython$(VERSION).sl'
4918 ;;
4919 esac
4920 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4921 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4922 ;;
4923 OSF*)
4924 LDLIBRARY='libpython$(VERSION).so'
4925 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4926 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4927 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004928 Darwin*)
4929 LDLIBRARY='libpython$(VERSION).dylib'
4930 BLDLIBRARY='-L. -lpython$(VERSION)'
4931 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4932 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004933 AIX*)
4934 LDLIBRARY='libpython$(VERSION).so'
4935 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4936 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004937
4938 esac
4939else # shared is disabled
4940 case $ac_sys_system in
4941 CYGWIN*)
4942 BLDLIBRARY='$(LIBRARY)'
4943 LDLIBRARY='libpython$(VERSION).dll.a'
4944 ;;
4945 esac
4946fi
4947
Matthias Kloseb9621712010-04-24 17:59:49 +00004948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4949$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004950
4951if test -n "$ac_tool_prefix"; then
4952 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4953set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4955$as_echo_n "checking for $ac_word... " >&6; }
4956if test "${ac_cv_prog_RANLIB+set}" = set; then :
4957 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004958else
4959 if test -n "$RANLIB"; then
4960 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4961else
4962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4963for as_dir in $PATH
4964do
4965 IFS=$as_save_IFS
4966 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004967 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004968 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4969 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004970 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004971 break 2
4972 fi
4973done
Matthias Kloseb9621712010-04-24 17:59:49 +00004974 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004975IFS=$as_save_IFS
4976
4977fi
4978fi
4979RANLIB=$ac_cv_prog_RANLIB
4980if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4982$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004983else
Matthias Kloseb9621712010-04-24 17:59:49 +00004984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4985$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004986fi
4987
4988
4989fi
4990if test -z "$ac_cv_prog_RANLIB"; then
4991 ac_ct_RANLIB=$RANLIB
4992 # Extract the first word of "ranlib", so it can be a program name with args.
4993set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4995$as_echo_n "checking for $ac_word... " >&6; }
4996if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4997 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004998else
4999 if test -n "$ac_ct_RANLIB"; then
5000 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5001else
5002as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5003for as_dir in $PATH
5004do
5005 IFS=$as_save_IFS
5006 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005007 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005008 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5009 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005010 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005011 break 2
5012 fi
5013done
Matthias Kloseb9621712010-04-24 17:59:49 +00005014 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005015IFS=$as_save_IFS
5016
5017fi
5018fi
5019ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5020if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5022$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005023else
Matthias Kloseb9621712010-04-24 17:59:49 +00005024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5025$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005026fi
5027
5028 if test "x$ac_ct_RANLIB" = x; then
5029 RANLIB=":"
5030 else
5031 case $cross_compiling:$ac_tool_warned in
5032yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005033{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5034$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005035ac_tool_warned=yes ;;
5036esac
5037 RANLIB=$ac_ct_RANLIB
5038 fi
5039else
5040 RANLIB="$ac_cv_prog_RANLIB"
5041fi
5042
5043
5044for ac_prog in ar aal
5045do
5046 # Extract the first word of "$ac_prog", so it can be a program name with args.
5047set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5049$as_echo_n "checking for $ac_word... " >&6; }
5050if test "${ac_cv_prog_AR+set}" = set; then :
5051 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005052else
5053 if test -n "$AR"; then
5054 ac_cv_prog_AR="$AR" # Let the user override the test.
5055else
5056as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5057for as_dir in $PATH
5058do
5059 IFS=$as_save_IFS
5060 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005061 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005062 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5063 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005064 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005065 break 2
5066 fi
5067done
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005069IFS=$as_save_IFS
5070
5071fi
5072fi
5073AR=$ac_cv_prog_AR
5074if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5076$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005077else
Matthias Kloseb9621712010-04-24 17:59:49 +00005078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5079$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005080fi
5081
5082
5083 test -n "$AR" && break
5084done
5085test -n "$AR" || AR="ar"
5086
5087
5088# tweak ARFLAGS only if the user didn't set it on the command line
5089
5090if test -z "$ARFLAGS"
5091then
5092 ARFLAGS="rc"
5093fi
5094
5095
5096# Extract the first word of "svnversion", so it can be a program name with args.
5097set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5099$as_echo_n "checking for $ac_word... " >&6; }
5100if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
5101 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005102else
5103 if test -n "$SVNVERSION"; then
5104 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5105else
5106as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5107for as_dir in $PATH
5108do
5109 IFS=$as_save_IFS
5110 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005111 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005112 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5113 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005114 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005115 break 2
5116 fi
5117done
Matthias Kloseb9621712010-04-24 17:59:49 +00005118 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005119IFS=$as_save_IFS
5120
5121 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5122fi
5123fi
5124SVNVERSION=$ac_cv_prog_SVNVERSION
5125if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5127$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005128else
Matthias Kloseb9621712010-04-24 17:59:49 +00005129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5130$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005131fi
5132
5133
5134if test $SVNVERSION = found
5135then
5136 SVNVERSION="svnversion \$(srcdir)"
5137else
5138 SVNVERSION="echo Unversioned directory"
5139fi
5140
5141case $MACHDEP in
5142bsdos*|hp*|HP*)
5143 # install -d does not work on BSDI or HP-UX
5144 if test -z "$INSTALL"
5145 then
5146 INSTALL="${srcdir}/install-sh -c"
5147 fi
5148esac
5149ac_aux_dir=
5150for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Barry Warsaw278266f2010-10-14 17:38:46 +00005151 if test -f "$ac_dir/install-sh"; then
5152 ac_aux_dir=$ac_dir
5153 ac_install_sh="$ac_aux_dir/install-sh -c"
5154 break
5155 elif test -f "$ac_dir/install.sh"; then
5156 ac_aux_dir=$ac_dir
5157 ac_install_sh="$ac_aux_dir/install.sh -c"
5158 break
5159 elif test -f "$ac_dir/shtool"; then
5160 ac_aux_dir=$ac_dir
5161 ac_install_sh="$ac_aux_dir/shtool install -c"
5162 break
5163 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005164done
5165if test -z "$ac_aux_dir"; then
Barry Warsaw278266f2010-10-14 17:38:46 +00005166 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005167fi
5168
5169# These three variables are undocumented and unsupported,
5170# and are intended to be withdrawn in a future Autoconf release.
5171# They can cause serious problems if a builder's source tree is in a directory
5172# whose full name contains unusual characters.
5173ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5174ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5175ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5176
5177
5178# Find a good install program. We prefer a C program (faster),
5179# so one script is as good as another. But avoid the broken or
5180# incompatible versions:
5181# SysV /etc/install, /usr/sbin/install
5182# SunOS /usr/etc/install
5183# IRIX /sbin/install
5184# AIX /bin/install
5185# AmigaOS /C/install, which installs bootblocks on floppy discs
5186# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5187# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5188# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5189# OS/2's system install, which has a completely different semantic
5190# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005191# Reject install programs that cannot install multiple files.
5192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5193$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005194if test -z "$INSTALL"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005195if test "${ac_cv_path_install+set}" = set; then :
5196 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005197else
5198 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5199for as_dir in $PATH
5200do
5201 IFS=$as_save_IFS
5202 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005203 # Account for people who put trailing slashes in PATH elements.
5204case $as_dir/ in #((
5205 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005206 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005207 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005208 /usr/ucb/* ) ;;
5209 *)
5210 # OSF1 and SCO ODT 3.0 have their own names for install.
5211 # Don't use installbsd from OSF since it installs stuff as root
5212 # by default.
5213 for ac_prog in ginstall scoinst install; do
5214 for ac_exec_ext in '' $ac_executable_extensions; do
5215 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5216 if test $ac_prog = install &&
5217 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5218 # AIX install. It has an incompatible calling convention.
5219 :
5220 elif test $ac_prog = install &&
5221 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5222 # program-specific install script used by HP pwplus--don't use.
5223 :
5224 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005225 rm -rf conftest.one conftest.two conftest.dir
5226 echo one > conftest.one
5227 echo two > conftest.two
5228 mkdir conftest.dir
5229 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5230 test -s conftest.one && test -s conftest.two &&
5231 test -s conftest.dir/conftest.one &&
5232 test -s conftest.dir/conftest.two
5233 then
5234 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5235 break 3
5236 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005237 fi
5238 fi
5239 done
5240 done
5241 ;;
5242esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005243
5244 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005245IFS=$as_save_IFS
5246
Matthias Kloseb9621712010-04-24 17:59:49 +00005247rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005248
5249fi
5250 if test "${ac_cv_path_install+set}" = set; then
5251 INSTALL=$ac_cv_path_install
5252 else
5253 # As a last resort, use the slow shell script. Don't cache a
5254 # value for INSTALL within a source directory, because that will
5255 # break other packages using the cache if that directory is
5256 # removed, or if the value is a relative name.
5257 INSTALL=$ac_install_sh
5258 fi
5259fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5261$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005262
5263# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5264# It thinks the first close brace ends the variable substitution.
5265test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5266
5267test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5268
5269test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5270
5271
5272# Not every filesystem supports hard links
5273
5274if test -z "$LN" ; then
5275 case $ac_sys_system in
5276 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005277 *) LN=ln;;
5278 esac
5279fi
5280
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005281# For calculating the .so ABI tag.
5282SOABI_QUALIFIERS=""
5283
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005284# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5286$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005287
5288# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005289if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005290 withval=$with_pydebug;
5291if test "$withval" != no
5292then
5293
Matthias Kloseb9621712010-04-24 17:59:49 +00005294$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005295
Matthias Kloseb9621712010-04-24 17:59:49 +00005296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5297$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005298 Py_DEBUG='true'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005299 SOABI_QUALIFIERS="${SOABI_QUALIFIERS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005300else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5301$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005302fi
5303else
Matthias Kloseb9621712010-04-24 17:59:49 +00005304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5305$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005306fi
5307
5308
5309# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5310# merged with this chunk of code?
5311
5312# Optimizer/debugger flags
5313# ------------------------
5314# (The following bit of code is complicated enough - please keep things
5315# indented properly. Just pretend you're editing Python code. ;-)
5316
5317# There are two parallel sets of case statements below, one that checks to
5318# see if OPT was set and one that does BASECFLAGS setting based upon
5319# compiler and platform. BASECFLAGS tweaks need to be made even if the
5320# user set OPT.
5321
5322# tweak OPT based on compiler and platform, only if the user didn't set
5323# it on the command line
5324
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005325if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005326then
5327 case $GCC in
5328 yes)
5329 if test "$CC" != 'g++' ; then
5330 STRICT_PROTO="-Wstrict-prototypes"
5331 fi
5332 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5333 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5334 WRAP="-fwrapv"
5335 fi
5336 case $ac_cv_prog_cc_g in
5337 yes)
5338 if test "$Py_DEBUG" = 'true' ; then
5339 # Optimization messes up debuggers, so turn it off for
5340 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005341 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005342 else
5343 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5344 fi
5345 ;;
5346 *)
5347 OPT="-O3 -Wall $STRICT_PROTO"
5348 ;;
5349 esac
5350 case $ac_sys_system in
5351 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5352 ;;
5353 esac
5354 ;;
5355
5356 *)
5357 OPT="-O"
5358 ;;
5359 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005360fi
5361
5362
5363
5364# The -arch flags for universal builds on OSX
5365UNIVERSAL_ARCH_FLAGS=
5366
5367
5368# tweak BASECFLAGS based on compiler and platform
5369case $GCC in
5370yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005371 # Python doesn't violate C99 aliasing rules, but older versions of
5372 # GCC produce warnings for legal Python code. Enable
5373 # -fno-strict-aliasing on versions of GCC that support but produce
5374 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5376$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005377 ac_save_cc="$CC"
5378 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005379 save_CFLAGS="$CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +00005380 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
5381 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005382else
Matthias Kloseb9621712010-04-24 17:59:49 +00005383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005384/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005385
Matthias Kloseb159a552010-04-25 21:00:44 +00005386
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005387int
5388main ()
5389{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005390
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005391 ;
5392 return 0;
5393}
Matthias Kloseb159a552010-04-25 21:00:44 +00005394
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005396if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005397
5398 CC="$ac_save_cc -fstrict-aliasing"
5399 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005401/* end confdefs.h. */
5402
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005403 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005404int
5405main ()
5406{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005407double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005408 ;
5409 return 0;
5410}
Matthias Kloseb159a552010-04-25 21:00:44 +00005411
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005413if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005414
5415 ac_cv_no_strict_aliasing=no
5416
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005417else
Matthias Kloseb159a552010-04-25 21:00:44 +00005418
5419 ac_cv_no_strict_aliasing=yes
5420
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005421fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005423
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005424else
Matthias Kloseb159a552010-04-25 21:00:44 +00005425
5426 ac_cv_no_strict_aliasing=no
5427
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005428fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005430fi
5431
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005432 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005433 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5435$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005436 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005437 then
5438 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5439 fi
5440
5441 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5442 # support. Without this, treatment of subnormals doesn't follow
5443 # the standard.
5444 case $ac_sys_machine in
5445 alpha*)
5446 BASECFLAGS="$BASECFLAGS -mieee"
5447 ;;
5448 esac
5449
5450 case $ac_sys_system in
5451 SCO_SV*)
5452 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5453 ;;
5454 # is there any other compiler on Darwin besides gcc?
5455 Darwin*)
5456 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5457 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005458 if test "${CC}" = gcc
5459 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5461$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005462 case "${UNIVERSALSDK}" in
5463 */MacOSX10.4u.sdk)
5464 # Build using 10.4 SDK, force usage of gcc when the
5465 # compiler is gcc, otherwise the user will get very
5466 # confusing error messages when building on OSX 10.6
5467 CC=gcc-4.0
5468 CPP=cpp-4.0
5469 ;;
5470 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5472$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005473 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005474
5475
5476 if test "${enable_universalsdk}"; then
5477 UNIVERSAL_ARCH_FLAGS=""
5478 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5479 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5480 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005481 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005482 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5483 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005484 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005485 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005486
5487 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5488 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005489 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005490 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005491
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005492 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5493 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005494 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005495 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005496
5497 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5498 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005499 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005500 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005501
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005502 else
Barry Warsaw278266f2010-10-14 17:38:46 +00005503 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 +00005504
5505 fi
5506
5507
Ronald Oussoren666028b2010-04-18 19:07:43 +00005508 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5509 if test "${UNIVERSALSDK}" != "/"
5510 then
5511 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5512 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005513 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005514 fi
5515 fi
5516
5517 # Calculate the right deployment target for this build.
5518 #
5519 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5520 if test ${cur_target} '>' 10.2; then
5521 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005522 if test ${enable_universalsdk}; then
5523 if test "${UNIVERSAL_ARCHS}" = "all"; then
5524 # Ensure that the default platform for a
5525 # 4-way universal build is OSX 10.5,
5526 # that's the first OS release where
5527 # 4-way builds make sense.
5528 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005529
5530 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5531 cur_target='10.5'
5532
5533 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5534 cur_target='10.5'
5535
5536 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5537 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005538 fi
5539 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005540 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005541 # On Intel macs default to a deployment
5542 # target of 10.4, that's the first OSX
5543 # release with Intel support.
5544 cur_target="10.4"
5545 fi
5546 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005547 fi
5548 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5549
5550 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5551 # environment with a value that is the same as what we'll use
5552 # in the Makefile to ensure that we'll get the same compiler
5553 # environment during configure and build time.
5554 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5555 export MACOSX_DEPLOYMENT_TARGET
5556 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5557
5558 ;;
5559 OSF*)
5560 BASECFLAGS="$BASECFLAGS -mieee"
5561 ;;
5562 esac
5563 ;;
5564
5565*)
5566 case $ac_sys_system in
5567 OpenUNIX*|UnixWare*)
5568 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5569 ;;
5570 OSF*)
5571 BASECFLAGS="$BASECFLAGS -ieee -std"
5572 ;;
5573 SCO_SV*)
5574 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5575 ;;
5576 esac
5577 ;;
5578esac
5579
5580if test "$Py_DEBUG" = 'true'; then
5581 :
5582else
5583 OPT="-DNDEBUG $OPT"
5584fi
5585
5586if test "$ac_arch_flags"
5587then
5588 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5589fi
5590
5591# disable check for icc since it seems to pass, but generates a warning
5592if test "$CC" = icc
5593then
5594 ac_cv_opt_olimit_ok=no
5595fi
5596
Matthias Kloseb9621712010-04-24 17:59:49 +00005597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5598$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
5599if test "${ac_cv_opt_olimit_ok+set}" = set; then :
5600 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005601else
5602 ac_save_cc="$CC"
5603CC="$CC -OPT:Olimit=0"
Matthias Kloseb9621712010-04-24 17:59:49 +00005604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005605/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005606
5607int
5608main ()
5609{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005610
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005611 ;
5612 return 0;
5613}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005615if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005616 ac_cv_opt_olimit_ok=yes
5617else
Matthias Kloseb9621712010-04-24 17:59:49 +00005618 ac_cv_opt_olimit_ok=no
Matthias Kloseb159a552010-04-25 21:00:44 +00005619
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005620fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005622CC="$ac_save_cc"
5623fi
5624
Matthias Kloseb9621712010-04-24 17:59:49 +00005625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5626$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005627if test $ac_cv_opt_olimit_ok = yes; then
5628 case $ac_sys_system in
5629 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5630 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5631 # environment?
5632 Darwin*)
5633 ;;
5634 *)
5635 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5636 ;;
5637 esac
5638else
Matthias Kloseb9621712010-04-24 17:59:49 +00005639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5640$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
5641 if test "${ac_cv_olimit_ok+set}" = set; then :
5642 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005643else
5644 ac_save_cc="$CC"
5645 CC="$CC -Olimit 1500"
Matthias Kloseb9621712010-04-24 17:59:49 +00005646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005647/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005648
5649int
5650main ()
5651{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005652
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005653 ;
5654 return 0;
5655}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005657if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658 ac_cv_olimit_ok=yes
5659else
Matthias Kloseb9621712010-04-24 17:59:49 +00005660 ac_cv_olimit_ok=no
Matthias Kloseb159a552010-04-25 21:00:44 +00005661
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005662fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005664 CC="$ac_save_cc"
5665fi
5666
Matthias Kloseb9621712010-04-24 17:59:49 +00005667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5668$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005669 if test $ac_cv_olimit_ok = yes; then
5670 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5671 fi
5672fi
5673
5674# Check whether GCC supports PyArg_ParseTuple format
5675if test "$GCC" = "yes"
5676then
Matthias Kloseb9621712010-04-24 17:59:49 +00005677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5678$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005679 save_CFLAGS=$CFLAGS
5680 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005682/* end confdefs.h. */
5683
5684 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005685int
5686main ()
5687{
5688
5689 ;
5690 return 0;
5691}
Matthias Kloseb159a552010-04-25 21:00:44 +00005692
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005694if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695
Matthias Kloseb159a552010-04-25 21:00:44 +00005696
Matthias Kloseb9621712010-04-24 17:59:49 +00005697$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698
Matthias Kloseb159a552010-04-25 21:00:44 +00005699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005700$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005701
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005702else
Matthias Kloseb159a552010-04-25 21:00:44 +00005703
5704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005705$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706
5707fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5709 CFLAGS=$save_CFLAGS
5710fi
5711
5712# On some compilers, pthreads are available without further options
5713# (e.g. MacOS X). On some of these systems, the compiler will not
5714# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5715# So we have to see first whether pthreads are available without
5716# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5718$as_echo_n "checking whether pthreads are available without options... " >&6; }
5719if test "${ac_cv_pthread_is_default+set}" = set; then :
5720 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005721else
Matthias Kloseb9621712010-04-24 17:59:49 +00005722 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723 ac_cv_pthread_is_default=no
5724else
Matthias Kloseb9621712010-04-24 17:59:49 +00005725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726/* end confdefs.h. */
5727
5728#include <pthread.h>
5729
5730void* routine(void* p){return NULL;}
5731
5732int main(){
5733 pthread_t p;
5734 if(pthread_create(&p,NULL,routine,NULL)!=0)
5735 return 1;
5736 (void)pthread_detach(p);
5737 return 0;
5738}
5739
5740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005741if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742
5743 ac_cv_pthread_is_default=yes
5744 ac_cv_kthread=no
5745 ac_cv_pthread=no
5746
5747else
Matthias Kloseb9621712010-04-24 17:59:49 +00005748 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005750rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5751 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752fi
5753
5754
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755fi
5756
Matthias Kloseb9621712010-04-24 17:59:49 +00005757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5758$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759
5760
5761if test $ac_cv_pthread_is_default = yes
5762then
5763 ac_cv_kpthread=no
5764else
5765# -Kpthread, if available, provides the right #defines
5766# and linker options to make pthread_create available
5767# Some compilers won't report that they do not support -Kpthread,
5768# so we need to run a program to see whether it really made the
5769# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5771$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
5772if test "${ac_cv_kpthread+set}" = set; then :
5773 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005774else
5775 ac_save_cc="$CC"
5776CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005777if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778 ac_cv_kpthread=no
5779else
Matthias Kloseb9621712010-04-24 17:59:49 +00005780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005781/* end confdefs.h. */
5782
5783#include <pthread.h>
5784
5785void* routine(void* p){return NULL;}
5786
5787int main(){
5788 pthread_t p;
5789 if(pthread_create(&p,NULL,routine,NULL)!=0)
5790 return 1;
5791 (void)pthread_detach(p);
5792 return 0;
5793}
5794
5795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005796if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797 ac_cv_kpthread=yes
5798else
Matthias Kloseb9621712010-04-24 17:59:49 +00005799 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005801rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5802 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005803fi
5804
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005805CC="$ac_save_cc"
5806fi
5807
Matthias Kloseb9621712010-04-24 17:59:49 +00005808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5809$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005810fi
5811
5812if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5813then
5814# -Kthread, if available, provides the right #defines
5815# and linker options to make pthread_create available
5816# Some compilers won't report that they do not support -Kthread,
5817# so we need to run a program to see whether it really made the
5818# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5820$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
5821if test "${ac_cv_kthread+set}" = set; then :
5822 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005823else
5824 ac_save_cc="$CC"
5825CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005826if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827 ac_cv_kthread=no
5828else
Matthias Kloseb9621712010-04-24 17:59:49 +00005829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005830/* end confdefs.h. */
5831
5832#include <pthread.h>
5833
5834void* routine(void* p){return NULL;}
5835
5836int main(){
5837 pthread_t p;
5838 if(pthread_create(&p,NULL,routine,NULL)!=0)
5839 return 1;
5840 (void)pthread_detach(p);
5841 return 0;
5842}
5843
5844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005845if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846 ac_cv_kthread=yes
5847else
Matthias Kloseb9621712010-04-24 17:59:49 +00005848 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005849fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005850rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5851 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005852fi
5853
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854CC="$ac_save_cc"
5855fi
5856
Matthias Kloseb9621712010-04-24 17:59:49 +00005857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5858$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005859fi
5860
5861if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5862then
5863# -pthread, if available, provides the right #defines
5864# and linker options to make pthread_create available
5865# Some compilers won't report that they do not support -pthread,
5866# so we need to run a program to see whether it really made the
5867# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5869$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
5870if test "${ac_cv_thread+set}" = set; then :
5871 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005872else
5873 ac_save_cc="$CC"
5874CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005875if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876 ac_cv_pthread=no
5877else
Matthias Kloseb9621712010-04-24 17:59:49 +00005878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879/* end confdefs.h. */
5880
5881#include <pthread.h>
5882
5883void* routine(void* p){return NULL;}
5884
5885int main(){
5886 pthread_t p;
5887 if(pthread_create(&p,NULL,routine,NULL)!=0)
5888 return 1;
5889 (void)pthread_detach(p);
5890 return 0;
5891}
5892
5893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005894if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005895 ac_cv_pthread=yes
5896else
Matthias Kloseb9621712010-04-24 17:59:49 +00005897 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005899rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5900 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005901fi
5902
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903CC="$ac_save_cc"
5904fi
5905
Matthias Kloseb9621712010-04-24 17:59:49 +00005906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5907$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908fi
5909
5910# If we have set a CC compiler flag for thread support then
5911# check if it works for CXX, too.
5912ac_cv_cxx_thread=no
5913if test ! -z "$CXX"
5914then
Matthias Kloseb9621712010-04-24 17:59:49 +00005915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5916$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917ac_save_cxx="$CXX"
5918
5919if test "$ac_cv_kpthread" = "yes"
5920then
5921 CXX="$CXX -Kpthread"
5922 ac_cv_cxx_thread=yes
5923elif test "$ac_cv_kthread" = "yes"
5924then
5925 CXX="$CXX -Kthread"
5926 ac_cv_cxx_thread=yes
5927elif test "$ac_cv_pthread" = "yes"
5928then
5929 CXX="$CXX -pthread"
5930 ac_cv_cxx_thread=yes
5931fi
5932
5933if test $ac_cv_cxx_thread = yes
5934then
5935 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5936 $CXX -c conftest.$ac_ext 2>&5
5937 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5938 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5939 then
5940 ac_cv_cxx_thread=yes
5941 else
5942 ac_cv_cxx_thread=no
5943 fi
5944 rm -fr conftest*
5945fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5947$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948fi
5949CXX="$ac_save_cxx"
5950
5951
5952# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5954$as_echo_n "checking for ANSI C header files... " >&6; }
5955if test "${ac_cv_header_stdc+set}" = set; then :
5956 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005957else
Matthias Kloseb9621712010-04-24 17:59:49 +00005958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005959/* end confdefs.h. */
5960#include <stdlib.h>
5961#include <stdarg.h>
5962#include <string.h>
5963#include <float.h>
5964
5965int
5966main ()
5967{
5968
5969 ;
5970 return 0;
5971}
5972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005973if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005974 ac_cv_header_stdc=yes
5975else
Matthias Kloseb9621712010-04-24 17:59:49 +00005976 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005977fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5979
5980if test $ac_cv_header_stdc = yes; then
5981 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005983/* end confdefs.h. */
5984#include <string.h>
5985
5986_ACEOF
5987if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005988 $EGREP "memchr" >/dev/null 2>&1; then :
5989
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990else
5991 ac_cv_header_stdc=no
5992fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005993rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994
5995fi
5996
5997if test $ac_cv_header_stdc = yes; then
5998 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006000/* end confdefs.h. */
6001#include <stdlib.h>
6002
6003_ACEOF
6004if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006005 $EGREP "free" >/dev/null 2>&1; then :
6006
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007else
6008 ac_cv_header_stdc=no
6009fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006010rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011
6012fi
6013
6014if test $ac_cv_header_stdc = yes; then
6015 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006016 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006017 :
6018else
Matthias Kloseb9621712010-04-24 17:59:49 +00006019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006020/* end confdefs.h. */
6021#include <ctype.h>
6022#include <stdlib.h>
6023#if ((' ' & 0x0FF) == 0x020)
6024# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6025# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6026#else
6027# define ISLOWER(c) \
6028 (('a' <= (c) && (c) <= 'i') \
6029 || ('j' <= (c) && (c) <= 'r') \
6030 || ('s' <= (c) && (c) <= 'z'))
6031# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6032#endif
6033
6034#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6035int
6036main ()
6037{
6038 int i;
6039 for (i = 0; i < 256; i++)
6040 if (XOR (islower (i), ISLOWER (i))
6041 || toupper (i) != TOUPPER (i))
6042 return 2;
6043 return 0;
6044}
6045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006046if ac_fn_c_try_run "$LINENO"; then :
6047
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006048else
Matthias Kloseb9621712010-04-24 17:59:49 +00006049 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006050fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006051rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6052 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006053fi
6054
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006055fi
6056fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6058$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006059if test $ac_cv_header_stdc = yes; then
6060
Matthias Kloseb9621712010-04-24 17:59:49 +00006061$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006062
6063fi
6064
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006065for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6066fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006067ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006068shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006069unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006070sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6071sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006072sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006073sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006074sys/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 +00006075sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006076bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006077do :
6078 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6079ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Barry Warsaw278266f2010-10-14 17:38:46 +00006080if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006081 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006082#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006083_ACEOF
6084
6085fi
6086
Guido van Rossum627b2d71993-12-24 10:39:16 +00006087done
6088
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006089ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006090for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006091 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6093$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Barry Warsaw278266f2010-10-14 17:38:46 +00006094if eval "test \"\${$as_ac_Header+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006095 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006096else
Matthias Kloseb9621712010-04-24 17:59:49 +00006097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006098/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006099#include <sys/types.h>
6100#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006101
Martin v. Löwis11437992002-04-12 09:54:03 +00006102int
6103main ()
6104{
6105if ((DIR *) 0)
6106return 0;
6107 ;
6108 return 0;
6109}
6110_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006111if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006112 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006113else
Matthias Kloseb9621712010-04-24 17:59:49 +00006114 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006115fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006117fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006118eval ac_res=\$$as_ac_Header
6119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6120$as_echo "$ac_res" >&6; }
Barry Warsaw278266f2010-10-14 17:38:46 +00006121if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006122 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006123#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006124_ACEOF
6125
6126ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006127fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006128
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006129done
6130# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6131if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6133$as_echo_n "checking for library containing opendir... " >&6; }
6134if test "${ac_cv_search_opendir+set}" = set; then :
6135 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006136else
Martin v. Löwis11437992002-04-12 09:54:03 +00006137 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006139/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006140
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006141/* Override any GCC internal prototype to avoid an error.
6142 Use char because int might match the return type of a GCC
6143 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006144#ifdef __cplusplus
6145extern "C"
6146#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006147char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006148int
6149main ()
6150{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006151return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006152 ;
6153 return 0;
6154}
6155_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006156for ac_lib in '' dir; do
6157 if test -z "$ac_lib"; then
6158 ac_res="none required"
6159 else
6160 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006161 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006162 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006163 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006164 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006165fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006166rm -f core conftest.err conftest.$ac_objext \
6167 conftest$ac_exeext
6168 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006169 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006171done
Matthias Kloseb9621712010-04-24 17:59:49 +00006172if test "${ac_cv_search_opendir+set}" = set; then :
6173
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006174else
6175 ac_cv_search_opendir=no
6176fi
6177rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006178LIBS=$ac_func_search_save_LIBS
6179fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6181$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006182ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006183if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006184 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006185
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006186fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006187
Michael W. Hudson54241132001-12-07 15:38:26 +00006188else
Matthias Kloseb9621712010-04-24 17:59:49 +00006189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6190$as_echo_n "checking for library containing opendir... " >&6; }
6191if test "${ac_cv_search_opendir+set}" = set; then :
6192 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006193else
6194 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006195cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006196/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006197
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006198/* Override any GCC internal prototype to avoid an error.
6199 Use char because int might match the return type of a GCC
6200 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006201#ifdef __cplusplus
6202extern "C"
6203#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006204char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006205int
6206main ()
6207{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006208return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006209 ;
6210 return 0;
6211}
6212_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006213for ac_lib in '' x; do
6214 if test -z "$ac_lib"; then
6215 ac_res="none required"
6216 else
6217 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006218 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006219 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006220 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006221 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006222fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006223rm -f core conftest.err conftest.$ac_objext \
6224 conftest$ac_exeext
6225 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006226 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006227fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006228done
Matthias Kloseb9621712010-04-24 17:59:49 +00006229if test "${ac_cv_search_opendir+set}" = set; then :
6230
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006231else
6232 ac_cv_search_opendir=no
6233fi
6234rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006235LIBS=$ac_func_search_save_LIBS
6236fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6238$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006239ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006240if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006241 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006242
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006243fi
6244
6245fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006246
Matthias Kloseb9621712010-04-24 17:59:49 +00006247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6248$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
6249if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
6250 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006251else
Matthias Kloseb9621712010-04-24 17:59:49 +00006252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006253/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006254#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006255int
6256main ()
6257{
6258return makedev(0, 0);
6259 ;
6260 return 0;
6261}
6262_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006263if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006264 ac_cv_header_sys_types_h_makedev=yes
6265else
Matthias Kloseb9621712010-04-24 17:59:49 +00006266 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006267fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006268rm -f core conftest.err conftest.$ac_objext \
6269 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006270
6271fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6273$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006274
6275if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006276ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
6277if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006278
Matthias Kloseb9621712010-04-24 17:59:49 +00006279$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006280
6281fi
6282
6283
6284
6285 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006286 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
6287if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006288
Matthias Kloseb9621712010-04-24 17:59:49 +00006289$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006290
6291fi
6292
6293
6294 fi
6295fi
6296
Michael W. Hudson54241132001-12-07 15:38:26 +00006297
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006298# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006299for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006300do :
6301 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006302#ifdef HAVE_CURSES_H
6303#include <curses.h>
6304#endif
6305
Matthias Kloseb9621712010-04-24 17:59:49 +00006306"
6307if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006308 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006309#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006310_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006311
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006312fi
6313
6314done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006315
6316
Martin v. Löwis11017b12006-01-14 18:12:57 +00006317# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006318for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006319do :
6320 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 +00006321#ifdef HAVE_ASM_TYPES_H
6322#include <asm/types.h>
6323#endif
6324#ifdef HAVE_SYS_SOCKET_H
6325#include <sys/socket.h>
6326#endif
6327
Matthias Kloseb9621712010-04-24 17:59:49 +00006328"
6329if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006330 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006331#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006332_ACEOF
6333
6334fi
6335
6336done
6337
6338
Guido van Rossum627b2d71993-12-24 10:39:16 +00006339# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006340was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6342$as_echo_n "checking for clock_t in time.h... " >&6; }
6343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006344/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006345#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006346
6347_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006348if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006349 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006350 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006351else
Martin v. Löwis11437992002-04-12 09:54:03 +00006352
6353
Matthias Kloseb9621712010-04-24 17:59:49 +00006354$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006355
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006356
Guido van Rossum627b2d71993-12-24 10:39:16 +00006357fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006358rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006359
Matthias Kloseb9621712010-04-24 17:59:49 +00006360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6361$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006362
Neal Norwitz11690112002-07-30 01:08:28 +00006363# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6365$as_echo_n "checking for makedev... " >&6; }
6366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006367/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006368
Jesus Cea740f53a2010-04-28 11:35:30 +00006369#if defined(MAJOR_IN_MKDEV)
6370#include <sys/mkdev.h>
6371#elif defined(MAJOR_IN_SYSMACROS)
6372#include <sys/sysmacros.h>
6373#else
6374#include <sys/types.h>
6375#endif
6376
Neal Norwitz11690112002-07-30 01:08:28 +00006377int
6378main ()
6379{
Jesus Cea740f53a2010-04-28 11:35:30 +00006380
6381 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006382 ;
6383 return 0;
6384}
Matthias Kloseb159a552010-04-25 21:00:44 +00006385
Neal Norwitz11690112002-07-30 01:08:28 +00006386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006387if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006388 ac_cv_has_makedev=yes
6389else
Matthias Kloseb9621712010-04-24 17:59:49 +00006390 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006391fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006392rm -f core conftest.err conftest.$ac_objext \
6393 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006394if test "$ac_cv_has_makedev" = "no"; then
6395 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006397/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006398
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006399#define _OSF_SOURCE 1
6400#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006401
Neal Norwitz11690112002-07-30 01:08:28 +00006402int
6403main ()
6404{
6405 makedev(0, 0)
6406 ;
6407 return 0;
6408}
6409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006410if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006411 ac_cv_has_makedev=yes
6412else
Matthias Kloseb9621712010-04-24 17:59:49 +00006413 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006414fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006415rm -f core conftest.err conftest.$ac_objext \
6416 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006417 if test "$ac_cv_has_makedev" = "yes"; then
6418
Matthias Kloseb9621712010-04-24 17:59:49 +00006419$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006420
6421 fi
6422fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6424$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006425if test "$ac_cv_has_makedev" = "yes"; then
6426
Matthias Kloseb9621712010-04-24 17:59:49 +00006427$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006428
6429fi
6430
Martin v. Löwis399a6892002-10-04 10:22:02 +00006431# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6432# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6433# defined, but the compiler does not support pragma redefine_extname,
6434# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6435# structures (such as rlimit64) without declaring them. As a
6436# work-around, disable LFS on such configurations
6437
6438use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6440$as_echo_n "checking Solaris LFS bug... " >&6; }
6441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006442/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006443
6444#define _LARGEFILE_SOURCE 1
6445#define _FILE_OFFSET_BITS 64
6446#include <sys/resource.h>
6447
Martin v. Löwis399a6892002-10-04 10:22:02 +00006448int
6449main ()
6450{
6451struct rlimit foo;
6452 ;
6453 return 0;
6454}
6455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006456if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006457 sol_lfs_bug=no
6458else
Matthias Kloseb9621712010-04-24 17:59:49 +00006459 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006460fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6463$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006464if test "$sol_lfs_bug" = "yes"; then
6465 use_lfs=no
6466fi
6467
6468if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006469# Two defines needed to enable largefile support on various platforms
6470# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006471
Matthias Kloseb9621712010-04-24 17:59:49 +00006472$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006473
6474
Matthias Kloseb9621712010-04-24 17:59:49 +00006475$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006476
Martin v. Löwis399a6892002-10-04 10:22:02 +00006477fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006478
Guido van Rossum84e7b241996-08-19 21:59:00 +00006479# Add some code to confdefs.h so that the test for off_t works on SCO
6480cat >> confdefs.h <<\EOF
6481#if defined(SCO_DS)
6482#undef _OFF_T
6483#endif
6484EOF
6485
Guido van Rossumef2255b2000-03-10 22:30:29 +00006486# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006487ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
6488if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006489
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006490else
Martin v. Löwis11437992002-04-12 09:54:03 +00006491
6492cat >>confdefs.h <<_ACEOF
6493#define mode_t int
6494_ACEOF
6495
6496fi
6497
Matthias Kloseb9621712010-04-24 17:59:49 +00006498ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
6499if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006500
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006501else
Martin v. Löwis11437992002-04-12 09:54:03 +00006502
6503cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006504#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006505_ACEOF
6506
6507fi
6508
Matthias Kloseb9621712010-04-24 17:59:49 +00006509ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6510if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006511
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006512else
Martin v. Löwis11437992002-04-12 09:54:03 +00006513
6514cat >>confdefs.h <<_ACEOF
6515#define pid_t int
6516_ACEOF
6517
6518fi
6519
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006520
Martin v. Löwis11437992002-04-12 09:54:03 +00006521cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006522#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006523_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006524
Matthias Kloseb9621712010-04-24 17:59:49 +00006525ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6526if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006527
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006528else
Martin v. Löwis11437992002-04-12 09:54:03 +00006529
6530cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006531#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006532_ACEOF
6533
6534fi
6535
Matthias Kloseb9621712010-04-24 17:59:49 +00006536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6537$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
6538if test "${ac_cv_type_uid_t+set}" = set; then :
6539 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006540else
Matthias Kloseb9621712010-04-24 17:59:49 +00006541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006542/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006543#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006544
6545_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006546if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006547 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006548 ac_cv_type_uid_t=yes
6549else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006550 ac_cv_type_uid_t=no
6551fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006552rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006553
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006554fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6556$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006557if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006558
Matthias Kloseb9621712010-04-24 17:59:49 +00006559$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006560
6561
Matthias Kloseb9621712010-04-24 17:59:49 +00006562$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006563
6564fi
6565
Matthias Kloseb9621712010-04-24 17:59:49 +00006566ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6567case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006568 no|yes) ;; #(
6569 *)
6570
Matthias Kloseb9621712010-04-24 17:59:49 +00006571$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006572
6573
6574cat >>confdefs.h <<_ACEOF
6575#define uint32_t $ac_cv_c_uint32_t
6576_ACEOF
6577;;
6578 esac
6579
Matthias Kloseb9621712010-04-24 17:59:49 +00006580ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6581case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006582 no|yes) ;; #(
6583 *)
6584
Matthias Kloseb9621712010-04-24 17:59:49 +00006585$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006586
6587
6588cat >>confdefs.h <<_ACEOF
6589#define uint64_t $ac_cv_c_uint64_t
6590_ACEOF
6591;;
6592 esac
6593
Matthias Kloseb9621712010-04-24 17:59:49 +00006594ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6595case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006596 no|yes) ;; #(
6597 *)
6598
6599cat >>confdefs.h <<_ACEOF
6600#define int32_t $ac_cv_c_int32_t
6601_ACEOF
6602;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006603esac
6604
Matthias Kloseb9621712010-04-24 17:59:49 +00006605ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6606case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006607 no|yes) ;; #(
6608 *)
6609
6610cat >>confdefs.h <<_ACEOF
6611#define int64_t $ac_cv_c_int64_t
6612_ACEOF
6613;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006614esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006615
Matthias Kloseb9621712010-04-24 17:59:49 +00006616ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
6617if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006618
Matthias Kloseb9621712010-04-24 17:59:49 +00006619$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006620
6621fi
6622
Jack Jansendd19cf82001-12-06 22:36:17 +00006623
Michael W. Hudson54241132001-12-07 15:38:26 +00006624# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006625# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006626# The cast to long int works around a bug in the HP C Compiler
6627# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6628# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6629# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6631$as_echo_n "checking size of int... " >&6; }
6632if test "${ac_cv_sizeof_int+set}" = set; then :
6633 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006634else
Matthias Kloseb9621712010-04-24 17:59:49 +00006635 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 +00006636
Martin v. Löwis11437992002-04-12 09:54:03 +00006637else
Matthias Kloseb9621712010-04-24 17:59:49 +00006638 if test "$ac_cv_type_int" = yes; then
6639 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6640$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw278266f2010-10-14 17:38:46 +00006641as_fn_error 77 "cannot compute sizeof (int)
6642See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006643 else
6644 ac_cv_sizeof_int=0
6645 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006646fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006647
Martin v. Löwis11437992002-04-12 09:54:03 +00006648fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6650$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006651
6652
6653
Martin v. Löwis11437992002-04-12 09:54:03 +00006654cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006655#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006656_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006657
6658
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006659# The cast to long int works around a bug in the HP C Compiler
6660# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6661# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6662# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6664$as_echo_n "checking size of long... " >&6; }
6665if test "${ac_cv_sizeof_long+set}" = set; then :
6666 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006667else
Matthias Kloseb9621712010-04-24 17:59:49 +00006668 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 +00006669
Martin v. Löwis11437992002-04-12 09:54:03 +00006670else
Matthias Kloseb9621712010-04-24 17:59:49 +00006671 if test "$ac_cv_type_long" = yes; then
6672 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6673$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw278266f2010-10-14 17:38:46 +00006674as_fn_error 77 "cannot compute sizeof (long)
6675See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006676 else
6677 ac_cv_sizeof_long=0
6678 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006680
Martin v. Löwis11437992002-04-12 09:54:03 +00006681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6683$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006684
6685
6686
Martin v. Löwis11437992002-04-12 09:54:03 +00006687cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006688#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006689_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006690
6691
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006692# The cast to long int works around a bug in the HP C Compiler
6693# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6694# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6695# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6697$as_echo_n "checking size of void *... " >&6; }
6698if test "${ac_cv_sizeof_void_p+set}" = set; then :
6699 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006700else
Matthias Kloseb9621712010-04-24 17:59:49 +00006701 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 +00006702
Martin v. Löwis11437992002-04-12 09:54:03 +00006703else
Matthias Kloseb9621712010-04-24 17:59:49 +00006704 if test "$ac_cv_type_void_p" = yes; then
6705 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6706$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw278266f2010-10-14 17:38:46 +00006707as_fn_error 77 "cannot compute sizeof (void *)
6708See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006709 else
6710 ac_cv_sizeof_void_p=0
6711 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006712fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006713
Martin v. Löwis11437992002-04-12 09:54:03 +00006714fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6716$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006717
6718
6719
Martin v. Löwis11437992002-04-12 09:54:03 +00006720cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006721#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006722_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006723
6724
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006725# The cast to long int works around a bug in the HP C Compiler
6726# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6727# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6728# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6730$as_echo_n "checking size of short... " >&6; }
6731if test "${ac_cv_sizeof_short+set}" = set; then :
6732 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006733else
Matthias Kloseb9621712010-04-24 17:59:49 +00006734 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 +00006735
Martin v. Löwis11437992002-04-12 09:54:03 +00006736else
Matthias Kloseb9621712010-04-24 17:59:49 +00006737 if test "$ac_cv_type_short" = yes; then
6738 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6739$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw278266f2010-10-14 17:38:46 +00006740as_fn_error 77 "cannot compute sizeof (short)
6741See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006742 else
6743 ac_cv_sizeof_short=0
6744 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006746
Martin v. Löwis11437992002-04-12 09:54:03 +00006747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6749$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006750
6751
6752
Martin v. Löwis11437992002-04-12 09:54:03 +00006753cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006754#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006755_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006756
6757
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006758# The cast to long int works around a bug in the HP C Compiler
6759# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6760# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6761# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6763$as_echo_n "checking size of float... " >&6; }
6764if test "${ac_cv_sizeof_float+set}" = set; then :
6765 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006766else
Matthias Kloseb9621712010-04-24 17:59:49 +00006767 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 +00006768
Martin v. Löwis11437992002-04-12 09:54:03 +00006769else
Matthias Kloseb9621712010-04-24 17:59:49 +00006770 if test "$ac_cv_type_float" = yes; then
6771 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6772$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw278266f2010-10-14 17:38:46 +00006773as_fn_error 77 "cannot compute sizeof (float)
6774See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006775 else
6776 ac_cv_sizeof_float=0
6777 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006779
Martin v. Löwis11437992002-04-12 09:54:03 +00006780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6782$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006783
6784
6785
Martin v. Löwis11437992002-04-12 09:54:03 +00006786cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006787#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006788_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006789
6790
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006791# The cast to long int works around a bug in the HP C Compiler
6792# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6793# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6794# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6796$as_echo_n "checking size of double... " >&6; }
6797if test "${ac_cv_sizeof_double+set}" = set; then :
6798 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006799else
Matthias Kloseb9621712010-04-24 17:59:49 +00006800 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 +00006801
Martin v. Löwis11437992002-04-12 09:54:03 +00006802else
Matthias Kloseb9621712010-04-24 17:59:49 +00006803 if test "$ac_cv_type_double" = yes; then
6804 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6805$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw278266f2010-10-14 17:38:46 +00006806as_fn_error 77 "cannot compute sizeof (double)
6807See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006808 else
6809 ac_cv_sizeof_double=0
6810 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006811fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006812
Martin v. Löwis11437992002-04-12 09:54:03 +00006813fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6815$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006816
6817
6818
Martin v. Löwis11437992002-04-12 09:54:03 +00006819cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006820#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006821_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006822
6823
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006824# The cast to long int works around a bug in the HP C Compiler
6825# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6826# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6827# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6829$as_echo_n "checking size of fpos_t... " >&6; }
6830if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
6831 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006832else
Matthias Kloseb9621712010-04-24 17:59:49 +00006833 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 +00006834
Martin v. Löwis11437992002-04-12 09:54:03 +00006835else
Matthias Kloseb9621712010-04-24 17:59:49 +00006836 if test "$ac_cv_type_fpos_t" = yes; then
6837 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6838$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw278266f2010-10-14 17:38:46 +00006839as_fn_error 77 "cannot compute sizeof (fpos_t)
6840See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006841 else
6842 ac_cv_sizeof_fpos_t=0
6843 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006845
Martin v. Löwis11437992002-04-12 09:54:03 +00006846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6848$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006849
6850
6851
Martin v. Löwis11437992002-04-12 09:54:03 +00006852cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006853#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006854_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006855
Michael W. Hudson54241132001-12-07 15:38:26 +00006856
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006857# The cast to long int works around a bug in the HP C Compiler
6858# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6859# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6860# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6862$as_echo_n "checking size of size_t... " >&6; }
6863if test "${ac_cv_sizeof_size_t+set}" = set; then :
6864 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006865else
Matthias Kloseb9621712010-04-24 17:59:49 +00006866 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 +00006867
Martin v. Löwis18e16552006-02-15 17:27:45 +00006868else
Matthias Kloseb9621712010-04-24 17:59:49 +00006869 if test "$ac_cv_type_size_t" = yes; then
6870 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6871$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw278266f2010-10-14 17:38:46 +00006872as_fn_error 77 "cannot compute sizeof (size_t)
6873See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006874 else
6875 ac_cv_sizeof_size_t=0
6876 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006878
Martin v. Löwis18e16552006-02-15 17:27:45 +00006879fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6881$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006882
6883
6884
Martin v. Löwis18e16552006-02-15 17:27:45 +00006885cat >>confdefs.h <<_ACEOF
6886#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6887_ACEOF
6888
6889
Christian Heimes400adb02008-02-01 08:12:03 +00006890# The cast to long int works around a bug in the HP C Compiler
6891# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6892# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6893# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6895$as_echo_n "checking size of pid_t... " >&6; }
6896if test "${ac_cv_sizeof_pid_t+set}" = set; then :
6897 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006898else
Matthias Kloseb9621712010-04-24 17:59:49 +00006899 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 +00006900
Christian Heimes400adb02008-02-01 08:12:03 +00006901else
Matthias Kloseb9621712010-04-24 17:59:49 +00006902 if test "$ac_cv_type_pid_t" = yes; then
6903 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6904$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw278266f2010-10-14 17:38:46 +00006905as_fn_error 77 "cannot compute sizeof (pid_t)
6906See \`config.log' for more details" "$LINENO" 5 ; }
Christian Heimes400adb02008-02-01 08:12:03 +00006907 else
6908 ac_cv_sizeof_pid_t=0
6909 fi
6910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006911
Christian Heimes400adb02008-02-01 08:12:03 +00006912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6914$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006915
6916
6917
6918cat >>confdefs.h <<_ACEOF
6919#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6920_ACEOF
6921
6922
Michael W. Hudson54241132001-12-07 15:38:26 +00006923
Matthias Kloseb9621712010-04-24 17:59:49 +00006924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6925$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006926have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006928/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006929
Martin v. Löwis11437992002-04-12 09:54:03 +00006930int
6931main ()
6932{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006933long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006934 ;
6935 return 0;
6936}
6937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006938if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006939
6940
Matthias Kloseb9621712010-04-24 17:59:49 +00006941$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006942
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006943 have_long_long=yes
6944
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006945fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6948$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006949if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006950# The cast to long int works around a bug in the HP C Compiler
6951# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6952# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6953# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6955$as_echo_n "checking size of long long... " >&6; }
6956if test "${ac_cv_sizeof_long_long+set}" = set; then :
6957 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006958else
Matthias Kloseb9621712010-04-24 17:59:49 +00006959 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 +00006960
Martin v. Löwis11437992002-04-12 09:54:03 +00006961else
Matthias Kloseb9621712010-04-24 17:59:49 +00006962 if test "$ac_cv_type_long_long" = yes; then
6963 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6964$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw278266f2010-10-14 17:38:46 +00006965as_fn_error 77 "cannot compute sizeof (long long)
6966See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006967 else
6968 ac_cv_sizeof_long_long=0
6969 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006970fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006971
Martin v. Löwis11437992002-04-12 09:54:03 +00006972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6974$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006975
6976
6977
Martin v. Löwis11437992002-04-12 09:54:03 +00006978cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006979#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006980_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006981
Michael W. Hudson54241132001-12-07 15:38:26 +00006982
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006983fi
6984
Matthias Kloseb9621712010-04-24 17:59:49 +00006985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6986$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006987have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006989/* end confdefs.h. */
6990
6991int
6992main ()
6993{
6994long double x; x = (long double)0;
6995 ;
6996 return 0;
6997}
6998_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006999if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007000
7001
Matthias Kloseb9621712010-04-24 17:59:49 +00007002$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007003
7004 have_long_double=yes
7005
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007006fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7009$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007010if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007011# The cast to long int works around a bug in the HP C Compiler
7012# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7013# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7014# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7016$as_echo_n "checking size of long double... " >&6; }
7017if test "${ac_cv_sizeof_long_double+set}" = set; then :
7018 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007019else
Matthias Kloseb9621712010-04-24 17:59:49 +00007020 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 +00007021
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007022else
Matthias Kloseb9621712010-04-24 17:59:49 +00007023 if test "$ac_cv_type_long_double" = yes; then
7024 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7025$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw278266f2010-10-14 17:38:46 +00007026as_fn_error 77 "cannot compute sizeof (long double)
7027See \`config.log' for more details" "$LINENO" 5 ; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007028 else
7029 ac_cv_sizeof_long_double=0
7030 fi
7031fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007032
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007033fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7035$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007036
7037
7038
7039cat >>confdefs.h <<_ACEOF
7040#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7041_ACEOF
7042
7043
7044fi
7045
7046
Matthias Kloseb9621712010-04-24 17:59:49 +00007047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7048$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007049have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007051/* end confdefs.h. */
7052
7053int
7054main ()
7055{
7056_Bool x; x = (_Bool)0;
7057 ;
7058 return 0;
7059}
7060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007061if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007062
7063
Matthias Kloseb9621712010-04-24 17:59:49 +00007064$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007065
7066 have_c99_bool=yes
7067
Thomas Woutersb2137042007-02-01 18:02:27 +00007068fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7071$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007072if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007073# The cast to long int works around a bug in the HP C Compiler
7074# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7075# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7076# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7078$as_echo_n "checking size of _Bool... " >&6; }
7079if test "${ac_cv_sizeof__Bool+set}" = set; then :
7080 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007081else
Matthias Kloseb9621712010-04-24 17:59:49 +00007082 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 +00007083
Thomas Woutersb2137042007-02-01 18:02:27 +00007084else
Matthias Kloseb9621712010-04-24 17:59:49 +00007085 if test "$ac_cv_type__Bool" = yes; then
7086 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7087$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw278266f2010-10-14 17:38:46 +00007088as_fn_error 77 "cannot compute sizeof (_Bool)
7089See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007090 else
7091 ac_cv_sizeof__Bool=0
7092 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007093fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007094
Thomas Woutersb2137042007-02-01 18:02:27 +00007095fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7097$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007098
7099
7100
Thomas Woutersb2137042007-02-01 18:02:27 +00007101cat >>confdefs.h <<_ACEOF
7102#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7103_ACEOF
7104
7105
7106fi
7107
Matthias Kloseb9621712010-04-24 17:59:49 +00007108ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007109 #include <stdint.h>
7110 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007111 #ifdef HAVE_INTTYPES_H
7112 #include <inttypes.h>
7113 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007114"
7115if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007116
7117cat >>confdefs.h <<_ACEOF
7118#define HAVE_UINTPTR_T 1
7119_ACEOF
7120
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007121# The cast to long int works around a bug in the HP C Compiler
7122# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7123# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7124# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7126$as_echo_n "checking size of uintptr_t... " >&6; }
7127if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
7128 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007129else
Matthias Kloseb9621712010-04-24 17:59:49 +00007130 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 +00007131
Martin v. Löwis11437992002-04-12 09:54:03 +00007132else
Matthias Kloseb9621712010-04-24 17:59:49 +00007133 if test "$ac_cv_type_uintptr_t" = yes; then
7134 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7135$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw278266f2010-10-14 17:38:46 +00007136as_fn_error 77 "cannot compute sizeof (uintptr_t)
7137See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007138 else
7139 ac_cv_sizeof_uintptr_t=0
7140 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007141fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007142
Martin v. Löwis11437992002-04-12 09:54:03 +00007143fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7145$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007146
7147
7148
Martin v. Löwis11437992002-04-12 09:54:03 +00007149cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007150#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007151_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007152
Michael W. Hudson54241132001-12-07 15:38:26 +00007153
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007154fi
7155
Thomas Wouters89f507f2006-12-13 04:49:30 +00007156
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007157# The cast to long int works around a bug in the HP C Compiler
7158# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7159# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7160# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7162$as_echo_n "checking size of off_t... " >&6; }
7163if test "${ac_cv_sizeof_off_t+set}" = set; then :
7164 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007165else
Matthias Kloseb9621712010-04-24 17:59:49 +00007166 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007167#ifdef HAVE_SYS_TYPES_H
7168#include <sys/types.h>
7169#endif
7170
Matthias Kloseb9621712010-04-24 17:59:49 +00007171"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007172
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007173else
Matthias Kloseb9621712010-04-24 17:59:49 +00007174 if test "$ac_cv_type_off_t" = yes; then
7175 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7176$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw278266f2010-10-14 17:38:46 +00007177as_fn_error 77 "cannot compute sizeof (off_t)
7178See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007179 else
7180 ac_cv_sizeof_off_t=0
7181 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007182fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007183
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007184fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7186$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007187
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007188
7189
Martin v. Löwis11437992002-04-12 09:54:03 +00007190cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007191#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007192_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007193
Michael W. Hudson54241132001-12-07 15:38:26 +00007194
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007195
Matthias Kloseb9621712010-04-24 17:59:49 +00007196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7197$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007198if test "$have_long_long" = yes
7199then
7200if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007201 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007202
Matthias Kloseb9621712010-04-24 17:59:49 +00007203$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007204
Matthias Kloseb9621712010-04-24 17:59:49 +00007205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7206$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007207else
Matthias Kloseb9621712010-04-24 17:59:49 +00007208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7209$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007210fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007211else
Matthias Kloseb9621712010-04-24 17:59:49 +00007212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7213$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007214fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007215
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007216# The cast to long int works around a bug in the HP C Compiler
7217# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7218# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7219# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7221$as_echo_n "checking size of time_t... " >&6; }
7222if test "${ac_cv_sizeof_time_t+set}" = set; then :
7223 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007224else
Matthias Kloseb9621712010-04-24 17:59:49 +00007225 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007226#ifdef HAVE_SYS_TYPES_H
7227#include <sys/types.h>
7228#endif
7229#ifdef HAVE_TIME_H
7230#include <time.h>
7231#endif
7232
Matthias Kloseb9621712010-04-24 17:59:49 +00007233"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007234
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007235else
Matthias Kloseb9621712010-04-24 17:59:49 +00007236 if test "$ac_cv_type_time_t" = yes; then
7237 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7238$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw278266f2010-10-14 17:38:46 +00007239as_fn_error 77 "cannot compute sizeof (time_t)
7240See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007241 else
7242 ac_cv_sizeof_time_t=0
7243 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007244fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007245
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007246fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7248$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007249
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007250
7251
Martin v. Löwis11437992002-04-12 09:54:03 +00007252cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007253#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007254_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007255
Michael W. Hudson54241132001-12-07 15:38:26 +00007256
7257
Trent Mick635f6fb2000-08-23 21:33:05 +00007258# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007259ac_save_cc="$CC"
7260if test "$ac_cv_kpthread" = "yes"
7261then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007262elif test "$ac_cv_kthread" = "yes"
7263then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007264elif test "$ac_cv_pthread" = "yes"
7265then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007266fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007267
Matthias Kloseb9621712010-04-24 17:59:49 +00007268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7269$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007270have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007272/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007273
7274 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007275int
7276main ()
7277{
Guido van Rossum12580492000-09-24 16:47:19 +00007278pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007279 ;
7280 return 0;
7281}
Matthias Kloseb159a552010-04-25 21:00:44 +00007282
Martin v. Löwis11437992002-04-12 09:54:03 +00007283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007284if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007285 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007286fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7289$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007290if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007291 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007292# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7293# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7294# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7296$as_echo_n "checking size of pthread_t... " >&6; }
7297if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
7298 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007299else
Matthias Kloseb9621712010-04-24 17:59:49 +00007300 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007301#ifdef HAVE_PTHREAD_H
7302#include <pthread.h>
7303#endif
7304
Matthias Kloseb9621712010-04-24 17:59:49 +00007305"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007306
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007307else
Matthias Kloseb9621712010-04-24 17:59:49 +00007308 if test "$ac_cv_type_pthread_t" = yes; then
7309 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7310$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw278266f2010-10-14 17:38:46 +00007311as_fn_error 77 "cannot compute sizeof (pthread_t)
7312See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007313 else
7314 ac_cv_sizeof_pthread_t=0
7315 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007316fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007317
Trent Mick635f6fb2000-08-23 21:33:05 +00007318fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7320$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007321
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007322
7323
Martin v. Löwis11437992002-04-12 09:54:03 +00007324cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007325#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007326_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007327
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007328
Trent Mick635f6fb2000-08-23 21:33:05 +00007329fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007330CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007331
Michael W. Hudson54241132001-12-07 15:38:26 +00007332
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007333case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007334 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007335 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7336 ;;
7337 Darwin/*)
7338 OTHER_LIBTOOL_OPT=""
7339 ;;
7340esac
7341
7342
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007343ARCH_RUN_32BIT=""
7344
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007345case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007346 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007347 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7348 if test "${enable_universalsdk}"; then
7349 :
7350 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007351 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007352 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007353 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007354 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007355 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007356 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007357 if test ${gcc_version} '<' 4.0
7358 then
7359 LIBTOOL_CRUFT="-lcc_dynamic"
7360 else
7361 LIBTOOL_CRUFT=""
7362 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007363 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007364 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007365else
Matthias Kloseb9621712010-04-24 17:59:49 +00007366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007367/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007368
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007369 #include <unistd.h>
7370 int main(int argc, char*argv[])
7371 {
7372 if (sizeof(long) == 4) {
7373 return 0;
7374 } else {
7375 return 1;
7376 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007377 }
7378
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007380if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007381 ac_osx_32bit=yes
7382else
Matthias Kloseb9621712010-04-24 17:59:49 +00007383 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007384fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007385rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7386 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007387fi
7388
7389
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007390 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007391 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007392 i386)
7393 MACOSX_DEFAULT_ARCH="i386"
7394 ;;
7395 ppc)
7396 MACOSX_DEFAULT_ARCH="ppc"
7397 ;;
7398 *)
Barry Warsaw278266f2010-10-14 17:38:46 +00007399 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007400 ;;
7401 esac
7402 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007403 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007404 i386)
7405 MACOSX_DEFAULT_ARCH="x86_64"
7406 ;;
7407 ppc)
7408 MACOSX_DEFAULT_ARCH="ppc64"
7409 ;;
7410 *)
Barry Warsaw278266f2010-10-14 17:38:46 +00007411 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007412 ;;
7413 esac
7414
7415 #ARCH_RUN_32BIT="true"
7416 fi
7417
7418 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007419 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007420 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007421esac
7422
Matthias Kloseb9621712010-04-24 17:59:49 +00007423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7424$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007425if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007426then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007427 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007428 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007429 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007430
Matthias Kloseb9621712010-04-24 17:59:49 +00007431$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007432
Matthias Kloseb9621712010-04-24 17:59:49 +00007433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7434$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007435 if test $enable_shared = "yes"
7436 then
Barry Warsaw278266f2010-10-14 17:38:46 +00007437 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 +00007438 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007439else
Matthias Kloseb9621712010-04-24 17:59:49 +00007440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7441$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007442fi
7443
Matthias Kloseb9621712010-04-24 17:59:49 +00007444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7445$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007446case $ac_sys_system/$ac_sys_release in
7447 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007448
Matthias Kloseb9621712010-04-24 17:59:49 +00007449$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007450
Matthias Kloseb9621712010-04-24 17:59:49 +00007451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7452$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007453 ;;
7454 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7456$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007457 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007458esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007459
Guido van Rossum0a516c91994-09-12 10:58:40 +00007460# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007461
Michael W. Hudson54241132001-12-07 15:38:26 +00007462
7463
7464
7465
Benjamin Peterson99f03762010-04-11 22:15:28 +00007466
Thomas Wouters477c8d52006-05-27 19:21:47 +00007467
Georg Brandlb1441c72009-01-03 22:33:39 +00007468
Thomas Wouters477c8d52006-05-27 19:21:47 +00007469cat >>confdefs.h <<_ACEOF
7470#define SHLIB_EXT "$SO"
7471_ACEOF
7472
Guido van Rossum0a516c91994-09-12 10:58:40 +00007473# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007474# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007475# (Shared libraries in this instance are shared modules to be loaded into
7476# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7478$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007479if test -z "$LDSHARED"
7480then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007481 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007482 AIX*)
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00007483 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp -L\$(srcdir)"
Guido van Rossumce608b02001-09-28 15:59:38 +00007484 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007485 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007486 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007487 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007488 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007489 if test "$GCC" = "yes" ; then
7490 LDSHARED='$(CC) -shared'
7491 LDCXXSHARED='$(CXX) -shared'
7492 else
7493 LDSHARED='$(CC) -G'
7494 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007495 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007496 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007497 if test "$GCC" = "yes" ; then
7498 LDSHARED='$(CC) -shared'
7499 LDCXXSHARED='$(CXX) -shared'
7500 else
7501 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007502 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007503 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007504 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007505 LDSHARED='$(CC) -bundle'
7506 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007507 if test "$enable_framework" ; then
7508 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007509 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7510 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007511 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007512 else
7513 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007514 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007515 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007516 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007517 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007518 LDSHARED='$(CC) -bundle'
7519 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007520 if test "$enable_framework" ; then
7521 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007522 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7523 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007524 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007525 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007526 # No framework, use the Python app as bundle-loader
7527 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007528 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007529 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007530 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007531 Darwin/*)
7532 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7533 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007534
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007535 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007536 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007537 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007538 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007539 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007540 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7541 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007542 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007543 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007544 LDSHARED='$(CC) -bundle'
7545 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007546 if test "$enable_framework" ; then
7547 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007548 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7549 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007550 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007551 else
7552 # No framework, use the Python app as bundle-loader
7553 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7554 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007555 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007556 fi
7557 fi
7558 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007559 Linux*|GNU*|QNX*)
7560 LDSHARED='$(CC) -shared'
7561 LDCXXSHARED='$(CXX) -shared';;
7562 BSD/OS*/4*)
7563 LDSHARED="gcc -shared"
7564 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007565 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007566 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007567 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007568 LDSHARED='$(CC) -shared'
7569 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007570 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007571 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007572 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007573 OpenBSD*)
7574 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7575 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007576 LDSHARED='$(CC) -shared $(CCSHARED)'
7577 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007578 else
7579 case `uname -r` in
7580 [01].* | 2.[0-7] | 2.[0-7].*)
7581 LDSHARED="ld -Bshareable ${LDFLAGS}"
7582 ;;
7583 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007584 LDSHARED='$(CC) -shared $(CCSHARED)'
7585 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007586 ;;
7587 esac
7588 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007589 NetBSD*|DragonFly*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007590 LDSHARED="cc -shared"
7591 LDCXXSHARED="c++ -shared";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007592 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007593 if test "$GCC" = "yes" ; then
7594 LDSHARED='$(CC) -shared'
7595 LDCXXSHARED='$(CXX) -shared'
7596 else
7597 LDSHARED='$(CC) -G'
7598 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007599 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007600 SCO_SV*)
7601 LDSHARED='$(CC) -Wl,-G,-Bexport'
7602 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7603 CYGWIN*)
7604 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7605 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007606 *) LDSHARED="ld";;
7607 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007608fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7610$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007611LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007612BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007613# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007614# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7616$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007617if test -z "$CCSHARED"
7618then
Guido van Rossum07397971997-04-29 21:49:50 +00007619 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007620 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007621 then CCSHARED="-fPIC";
7622 elif test `uname -p` = sparc;
7623 then CCSHARED="-xcode=pic32";
7624 else CCSHARED="-Kpic";
7625 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007626 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007627 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007628 else CCSHARED="+z";
7629 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007630 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007631 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007632 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007633 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007634 if test "$GCC" = "yes"
7635 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007636 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007637 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007638 SCO_SV*)
7639 if test "$GCC" = "yes"
7640 then CCSHARED="-fPIC"
7641 else CCSHARED="-Kpic -belf"
7642 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007643 IRIX*/6*) case $CC in
7644 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007645 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007646 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007647 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007648fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7650$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007651# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007652# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7654$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007655if test -z "$LINKFORSHARED"
7656then
Guido van Rossum07397971997-04-29 21:49:50 +00007657 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007658 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007659 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007660 LINKFORSHARED="-Wl,-E -Wl,+s";;
7661# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007662 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007663 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007664 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007665 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007666 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007667 if test "$enable_framework"
7668 then
Jack Jansenda49e192005-01-07 13:08:22 +00007669 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007670 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007671 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007672 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007673 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007674 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007675 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007676 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7677 then
7678 LINKFORSHARED="-Wl,--export-dynamic"
7679 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007680 SunOS/5*) case $CC in
7681 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007682 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007683 then
7684 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007685 fi;;
7686 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007687 CYGWIN*)
7688 if test $enable_shared = "no"
7689 then
7690 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7691 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007692 QNX*)
7693 # -Wl,-E causes the symbols to be added to the dynamic
7694 # symbol table so that they can be found when a module
7695 # is loaded. -N 2048K causes the stack size to be set
7696 # to 2048 kilobytes so that the stack doesn't overflow
7697 # when running test_compile.py.
7698 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007699 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7702$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007703
Michael W. Hudson54241132001-12-07 15:38:26 +00007704
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007705
Matthias Kloseb9621712010-04-24 17:59:49 +00007706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7707$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007708if test ! "$LIBRARY" = "$LDLIBRARY"
7709then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007710 case $ac_sys_system in
7711 CYGWIN*)
7712 # Cygwin needs CCSHARED when building extension DLLs
7713 # but not when building the interpreter DLL.
7714 CFLAGSFORSHARED='';;
7715 *)
7716 CFLAGSFORSHARED='$(CCSHARED)'
7717 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007718fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7720$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007721
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007722# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7723# library (with --enable-shared).
7724# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007725# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7726# if it is not required, since it creates a dependency of the shared library
7727# to LIBS. This, in turn, means that applications linking the shared libpython
7728# don't need to link LIBS explicitly. The default should be only changed
7729# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007730
Matthias Kloseb9621712010-04-24 17:59:49 +00007731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7732$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007733case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007734 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007735 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007736esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7738$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007739
7740
Guido van Rossum627b2d71993-12-24 10:39:16 +00007741# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7743$as_echo_n "checking for dlopen in -ldl... " >&6; }
7744if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
7745 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007746else
Martin v. Löwis11437992002-04-12 09:54:03 +00007747 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007748LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007750/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007751
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007752/* Override any GCC internal prototype to avoid an error.
7753 Use char because int might match the return type of a GCC
7754 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007755#ifdef __cplusplus
7756extern "C"
7757#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007758char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007759int
7760main ()
7761{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007762return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007763 ;
7764 return 0;
7765}
7766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007767if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007768 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007769else
Matthias Kloseb9621712010-04-24 17:59:49 +00007770 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007771fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007772rm -f core conftest.err conftest.$ac_objext \
7773 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007774LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7777$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
7778if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007779 cat >>confdefs.h <<_ACEOF
7780#define HAVE_LIBDL 1
7781_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007782
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007783 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007784
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007785fi
7786 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7788$as_echo_n "checking for shl_load in -ldld... " >&6; }
7789if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
7790 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007791else
Martin v. Löwis11437992002-04-12 09:54:03 +00007792 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007793LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007795/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007796
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007797/* Override any GCC internal prototype to avoid an error.
7798 Use char because int might match the return type of a GCC
7799 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007800#ifdef __cplusplus
7801extern "C"
7802#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007803char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007804int
7805main ()
7806{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007807return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007808 ;
7809 return 0;
7810}
7811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007812if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007813 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007814else
Matthias Kloseb9621712010-04-24 17:59:49 +00007815 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007816fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007817rm -f core conftest.err conftest.$ac_objext \
7818 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007819LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007820fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7822$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
7823if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007824 cat >>confdefs.h <<_ACEOF
7825#define HAVE_LIBDLD 1
7826_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007827
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007828 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007829
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007830fi
7831 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007832
Georg Brandlb1441c72009-01-03 22:33:39 +00007833# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007834if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7836$as_echo_n "checking for library containing sem_init... " >&6; }
7837if test "${ac_cv_search_sem_init+set}" = set; then :
7838 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007839else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007840 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007841cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007842/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007843
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007844/* Override any GCC internal prototype to avoid an error.
7845 Use char because int might match the return type of a GCC
7846 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007847#ifdef __cplusplus
7848extern "C"
7849#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007850char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007851int
7852main ()
7853{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007854return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007855 ;
7856 return 0;
7857}
7858_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007859for ac_lib in '' pthread rt posix4; do
7860 if test -z "$ac_lib"; then
7861 ac_res="none required"
7862 else
7863 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007864 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007865 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007866 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007867 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007869rm -f core conftest.err conftest.$ac_objext \
7870 conftest$ac_exeext
7871 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007872 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007874done
Matthias Kloseb9621712010-04-24 17:59:49 +00007875if test "${ac_cv_search_sem_init+set}" = set; then :
7876
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007877else
7878 ac_cv_search_sem_init=no
7879fi
7880rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007881LIBS=$ac_func_search_save_LIBS
7882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7884$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007885ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007886if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007887 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007888
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007889fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007890 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007891 # posix4 on Solaris 2.6
7892 # pthread (first!) on Linux
7893fi
7894
Martin v. Löwis19d17342003-06-14 21:03:05 +00007895# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7897$as_echo_n "checking for textdomain in -lintl... " >&6; }
7898if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
7899 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007900else
7901 ac_check_lib_save_LIBS=$LIBS
7902LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007904/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007905
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007906/* Override any GCC internal prototype to avoid an error.
7907 Use char because int might match the return type of a GCC
7908 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007909#ifdef __cplusplus
7910extern "C"
7911#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007912char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007913int
7914main ()
7915{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007916return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007917 ;
7918 return 0;
7919}
7920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007921if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007922 ac_cv_lib_intl_textdomain=yes
7923else
Matthias Kloseb9621712010-04-24 17:59:49 +00007924 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007925fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007926rm -f core conftest.err conftest.$ac_objext \
7927 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007928LIBS=$ac_check_lib_save_LIBS
7929fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7931$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
7932if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007933
Matthias Kloseb9621712010-04-24 17:59:49 +00007934$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007935
Brett Cannonc6d936e2009-06-07 20:09:53 +00007936 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007937fi
7938
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007939
7940# checks for system dependent C++ extensions support
7941case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007942 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7943$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007945/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007946
7947 #include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007948int
7949main ()
7950{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007951loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007952 ;
7953 return 0;
7954}
Matthias Kloseb159a552010-04-25 21:00:44 +00007955
Martin v. Löwis11437992002-04-12 09:54:03 +00007956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007957if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007958
Matthias Kloseb159a552010-04-25 21:00:44 +00007959
Matthias Kloseb9621712010-04-24 17:59:49 +00007960$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007961
Matthias Kloseb159a552010-04-25 21:00:44 +00007962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007963$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007964
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007965else
Matthias Kloseb159a552010-04-25 21:00:44 +00007966
7967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007968$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007969
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007970fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007971rm -f core conftest.err conftest.$ac_objext \
7972 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007973 *) ;;
7974esac
7975
Guido van Rossum70c7f481998-03-26 18:44:10 +00007976# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7978$as_echo_n "checking for t_open in -lnsl... " >&6; }
7979if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
7980 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007981else
Martin v. Löwis11437992002-04-12 09:54:03 +00007982 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007983LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007985/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007986
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007987/* Override any GCC internal prototype to avoid an error.
7988 Use char because int might match the return type of a GCC
7989 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007990#ifdef __cplusplus
7991extern "C"
7992#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007993char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007994int
7995main ()
7996{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007997return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007998 ;
7999 return 0;
8000}
8001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008002if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008003 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008004else
Matthias Kloseb9621712010-04-24 17:59:49 +00008005 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008006fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008007rm -f core conftest.err conftest.$ac_objext \
8008 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008009LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8012$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
8013if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008014 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008015fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008016 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8018$as_echo_n "checking for socket in -lsocket... " >&6; }
8019if test "${ac_cv_lib_socket_socket+set}" = set; then :
8020 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008021else
Martin v. Löwis11437992002-04-12 09:54:03 +00008022 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008023LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008025/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008026
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008027/* Override any GCC internal prototype to avoid an error.
8028 Use char because int might match the return type of a GCC
8029 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008030#ifdef __cplusplus
8031extern "C"
8032#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008033char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008034int
8035main ()
8036{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008037return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008038 ;
8039 return 0;
8040}
8041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008042if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008043 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008044else
Matthias Kloseb9621712010-04-24 17:59:49 +00008045 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008046fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008047rm -f core conftest.err conftest.$ac_objext \
8048 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008049LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008050fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8052$as_echo "$ac_cv_lib_socket_socket" >&6; }
8053if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008054 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008055fi
8056 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008057
Matthias Kloseb9621712010-04-24 17:59:49 +00008058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8059$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008060
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008061# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008062if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008063 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8065$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008066LIBS="$withval $LIBS"
8067
8068else
Matthias Kloseb9621712010-04-24 17:59:49 +00008069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8070$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008071fi
8072
Guido van Rossum7f43da71994-08-01 12:15:30 +00008073
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008074if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008075 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8076set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8078$as_echo_n "checking for $ac_word... " >&6; }
8079if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8080 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008081else
8082 case $PKG_CONFIG in
8083 [\\/]* | ?:[\\/]*)
8084 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8085 ;;
8086 *)
8087 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8088for as_dir in $PATH
8089do
8090 IFS=$as_save_IFS
8091 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008092 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008093 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8094 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008095 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008096 break 2
8097 fi
8098done
Matthias Kloseb9621712010-04-24 17:59:49 +00008099 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008100IFS=$as_save_IFS
8101
8102 ;;
8103esac
8104fi
8105PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8106if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8108$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008109else
Matthias Kloseb9621712010-04-24 17:59:49 +00008110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8111$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008112fi
8113
8114
8115fi
8116if test -z "$ac_cv_path_PKG_CONFIG"; then
8117 ac_pt_PKG_CONFIG=$PKG_CONFIG
8118 # Extract the first word of "pkg-config", so it can be a program name with args.
8119set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8121$as_echo_n "checking for $ac_word... " >&6; }
8122if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
8123 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008124else
8125 case $ac_pt_PKG_CONFIG in
8126 [\\/]* | ?:[\\/]*)
8127 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8128 ;;
8129 *)
8130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8131for as_dir in $PATH
8132do
8133 IFS=$as_save_IFS
8134 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008135 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008136 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8137 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008138 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008139 break 2
8140 fi
8141done
Matthias Kloseb9621712010-04-24 17:59:49 +00008142 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008143IFS=$as_save_IFS
8144
8145 ;;
8146esac
8147fi
8148ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8149if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8151$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008152else
Matthias Kloseb9621712010-04-24 17:59:49 +00008153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8154$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008155fi
8156
8157 if test "x$ac_pt_PKG_CONFIG" = x; then
8158 PKG_CONFIG=""
8159 else
8160 case $cross_compiling:$ac_tool_warned in
8161yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008162{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8163$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008164ac_tool_warned=yes ;;
8165esac
8166 PKG_CONFIG=$ac_pt_PKG_CONFIG
8167 fi
8168else
8169 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8170fi
8171
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008172
8173# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8175$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008176
8177# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008178if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008179 withval=$with_system_expat;
8180fi
8181
8182
Matthias Kloseb9621712010-04-24 17:59:49 +00008183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8184$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008185
8186# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8188$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008189
8190# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008191if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008192 withval=$with_system_ffi;
8193fi
8194
8195
8196if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008197 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8198else
8199 LIBFFI_INCLUDEDIR=""
8200fi
8201
8202
Matthias Kloseb9621712010-04-24 17:59:49 +00008203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8204$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008205
Matthias Klose55708cc2009-04-30 08:06:49 +00008206# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8208$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008209
8210# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008211if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008212 withval=$with_dbmliborder;
8213if test x$with_dbmliborder = xyes
8214then
Barry Warsaw278266f2010-10-14 17:38:46 +00008215as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008216else
8217 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8218 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8219 then
Barry Warsaw278266f2010-10-14 17:38:46 +00008220 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008221 fi
8222 done
8223fi
8224fi
8225
Matthias Kloseb9621712010-04-24 17:59:49 +00008226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8227$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008228
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008229# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008230
8231
Matthias Kloseb9621712010-04-24 17:59:49 +00008232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8233$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008234
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008235# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008236if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008237 withval=$with_signal_module;
8238fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008239
8240
8241if test -z "$with_signal_module"
8242then with_signal_module="yes"
8243fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8245$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008246
8247if test "${with_signal_module}" = "yes"; then
8248 USE_SIGNAL_MODULE=""
8249 SIGNAL_OBJS=""
8250else
8251 USE_SIGNAL_MODULE="#"
8252 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8253fi
8254
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008255# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008256
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008257USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008258
Matthias Kloseb9621712010-04-24 17:59:49 +00008259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8260$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008261
Guido van Rossumec2f0731997-01-22 20:54:01 +00008262
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008263# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008264if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008265 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8267$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008268LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008269if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008270 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008271fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008272else
Matthias Kloseb9621712010-04-24 17:59:49 +00008273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8274$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008275fi
8276
Martin v. Löwis11437992002-04-12 09:54:03 +00008277
8278# Templates for things AC_DEFINEd more than once.
8279# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008280
8281
Martin v. Löwis11437992002-04-12 09:54:03 +00008282
8283
Matthias Kloseb9621712010-04-24 17:59:49 +00008284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8285$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008286
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008287# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008288if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008289 withval=$with_threads;
8290fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008291
8292
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008293# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008294
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008295# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008296if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008297 withval=$with_thread; with_threads=$with_thread
8298fi
8299
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008300
8301if test -z "$with_threads"
8302then with_threads="yes"
8303fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8305$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008306
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008307
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008308if test "$with_threads" = "no"
8309then
8310 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008311elif test "$ac_cv_pthread_is_default" = yes
8312then
Matthias Kloseb9621712010-04-24 17:59:49 +00008313 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008314
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008315 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008316 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008317
8318 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008319 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008320elif test "$ac_cv_kpthread" = "yes"
8321then
8322 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008323 if test "$ac_cv_cxx_thread" = "yes"; then
8324 CXX="$CXX -Kpthread"
8325 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008326 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008327
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008328 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008329 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008330elif test "$ac_cv_kthread" = "yes"
8331then
8332 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008333 if test "$ac_cv_cxx_thread" = "yes"; then
8334 CXX="$CXX -Kthread"
8335 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008336 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008337
8338 posix_threads=yes
8339 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008340elif test "$ac_cv_pthread" = "yes"
8341then
8342 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008343 if test "$ac_cv_cxx_thread" = "yes"; then
8344 CXX="$CXX -pthread"
8345 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008346 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008347
8348 posix_threads=yes
8349 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008350else
8351 if test ! -z "$with_threads" -a -d "$with_threads"
8352 then LDFLAGS="$LDFLAGS -L$with_threads"
8353 fi
8354 if test ! -z "$withval" -a -d "$withval"
8355 then LDFLAGS="$LDFLAGS -L$withval"
8356 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008357
8358 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008359 # define _POSIX_THREADS in unistd.h. Some apparently don't
8360 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8362$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008364/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008365
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008366#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008367#ifdef _POSIX_THREADS
8368yes
8369#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008370
8371_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008372if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008373 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008374 unistd_defines_pthreads=yes
8375else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008376 unistd_defines_pthreads=no
8377fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008378rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008379
Matthias Kloseb9621712010-04-24 17:59:49 +00008380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8381$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008382
Matthias Kloseb9621712010-04-24 17:59:49 +00008383 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008384
Matthias Kloseb9621712010-04-24 17:59:49 +00008385 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
8386if test "x$ac_cv_header_cthreads_h" = x""yes; then :
8387 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008388
Matthias Kloseb9621712010-04-24 17:59:49 +00008389 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008390
Martin v. Löwis11437992002-04-12 09:54:03 +00008391
Matthias Kloseb9621712010-04-24 17:59:49 +00008392$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008393
8394 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008395 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008396else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008397
Matthias Kloseb9621712010-04-24 17:59:49 +00008398 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
8399if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
8400 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008401
Matthias Kloseb9621712010-04-24 17:59:49 +00008402 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008403
Martin v. Löwis11437992002-04-12 09:54:03 +00008404
Matthias Kloseb9621712010-04-24 17:59:49 +00008405$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008406
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008407 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008408else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008409
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008410 # Just looking for pthread_create in libpthread is not enough:
8411 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8412 # So we really have to include pthread.h, and then link.
8413 _libs=$LIBS
8414 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8416$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008418/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008419#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008420
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008421void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008422int
8423main ()
8424{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008425
8426pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008427 ;
8428 return 0;
8429}
8430_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008431if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008432
Matthias Kloseb9621712010-04-24 17:59:49 +00008433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8434$as_echo "yes" >&6; }
8435 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008436
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008437 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008438 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008439else
Martin v. Löwis11437992002-04-12 09:54:03 +00008440
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008441 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008442 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
8443if test "x$ac_cv_func_pthread_detach" = x""yes; then :
8444 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008445
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008446 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008447 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008448else
Guido van Rossumad678af1998-10-02 14:42:15 +00008449
Matthias Kloseb9621712010-04-24 17:59:49 +00008450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8451$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
8452if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
8453 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008454else
Martin v. Löwis11437992002-04-12 09:54:03 +00008455 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008456LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008458/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008459
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008460/* Override any GCC internal prototype to avoid an error.
8461 Use char because int might match the return type of a GCC
8462 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008463#ifdef __cplusplus
8464extern "C"
8465#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008466char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008467int
8468main ()
8469{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008470return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008471 ;
8472 return 0;
8473}
8474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008475if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008476 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008477else
Matthias Kloseb9621712010-04-24 17:59:49 +00008478 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008479fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008480rm -f core conftest.err conftest.$ac_objext \
8481 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008482LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008483fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8485$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
8486if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
8487 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008488
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008489 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008490 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008491 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008492else
Greg Steinadf63d62000-07-05 10:38:09 +00008493
Matthias Kloseb9621712010-04-24 17:59:49 +00008494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8495$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
8496if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
8497 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008498else
Martin v. Löwis11437992002-04-12 09:54:03 +00008499 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008500LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008502/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008503
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008504/* Override any GCC internal prototype to avoid an error.
8505 Use char because int might match the return type of a GCC
8506 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008507#ifdef __cplusplus
8508extern "C"
8509#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008510char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008511int
8512main ()
8513{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008514return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008515 ;
8516 return 0;
8517}
8518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008519if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008520 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008521else
Matthias Kloseb9621712010-04-24 17:59:49 +00008522 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008523fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008524rm -f core conftest.err conftest.$ac_objext \
8525 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008526LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008527fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8529$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
8530if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
8531 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008532
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008533 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008534 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008535 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008536else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008537
Matthias Kloseb9621712010-04-24 17:59:49 +00008538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8539$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
8540if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
8541 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008542else
Martin v. Löwis11437992002-04-12 09:54:03 +00008543 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008544LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008546/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008547
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008548/* Override any GCC internal prototype to avoid an error.
8549 Use char because int might match the return type of a GCC
8550 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008551#ifdef __cplusplus
8552extern "C"
8553#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008554char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008555int
8556main ()
8557{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008558return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008559 ;
8560 return 0;
8561}
8562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008563if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008564 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008565else
Matthias Kloseb9621712010-04-24 17:59:49 +00008566 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008567fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008568rm -f core conftest.err conftest.$ac_objext \
8569 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008570LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008571fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8573$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
8574if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
8575 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008576
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008577 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008578 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008579 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008580else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008581
Matthias Kloseb9621712010-04-24 17:59:49 +00008582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8583$as_echo_n "checking for pthread_create in -lcma... " >&6; }
8584if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
8585 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008586else
Martin v. Löwis11437992002-04-12 09:54:03 +00008587 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008588LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008590/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008591
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008592/* Override any GCC internal prototype to avoid an error.
8593 Use char because int might match the return type of a GCC
8594 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008595#ifdef __cplusplus
8596extern "C"
8597#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008598char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008599int
8600main ()
8601{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008602return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008603 ;
8604 return 0;
8605}
8606_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008607if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008608 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008609else
Matthias Kloseb9621712010-04-24 17:59:49 +00008610 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008611fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008612rm -f core conftest.err conftest.$ac_objext \
8613 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008614LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008615fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8617$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
8618if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
8619 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008620
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008621 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008622 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008623 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008624else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008625
Martin v. Löwis130fb172001-07-19 11:00:41 +00008626 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008627fi
8628
Guido van Rossum627b2d71993-12-24 10:39:16 +00008629
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008630fi
8631
Guido van Rossum0be3e491997-05-22 20:33:33 +00008632fi
8633
Guido van Rossum49545951997-12-02 19:28:29 +00008634fi
8635
Guido van Rossumb93a8621998-05-07 13:27:32 +00008636fi
8637
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008638fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008639rm -f core conftest.err conftest.$ac_objext \
8640 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008641fi
8642
Martin v. Löwis11437992002-04-12 09:54:03 +00008643
8644fi
8645
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008646
Michael W. Hudson54241132001-12-07 15:38:26 +00008647
Matthias Kloseb9621712010-04-24 17:59:49 +00008648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8649$as_echo_n "checking for usconfig in -lmpc... " >&6; }
8650if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
8651 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008652else
Martin v. Löwis11437992002-04-12 09:54:03 +00008653 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008654LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008655cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008656/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008657
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008658/* Override any GCC internal prototype to avoid an error.
8659 Use char because int might match the return type of a GCC
8660 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008661#ifdef __cplusplus
8662extern "C"
8663#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008664char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008665int
8666main ()
8667{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008668return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008669 ;
8670 return 0;
8671}
8672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008673if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008674 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008675else
Matthias Kloseb9621712010-04-24 17:59:49 +00008676 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008677fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008678rm -f core conftest.err conftest.$ac_objext \
8679 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008680LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8683$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
8684if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
8685 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008686
Martin v. Löwis130fb172001-07-19 11:00:41 +00008687 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008688 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008689 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008690fi
8691
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008692
Neal Norwitza978ab02002-11-02 16:58:05 +00008693 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8695$as_echo_n "checking for thr_create in -lthread... " >&6; }
8696if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
8697 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008698else
Martin v. Löwis11437992002-04-12 09:54:03 +00008699 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008700LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008702/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008703
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008704/* Override any GCC internal prototype to avoid an error.
8705 Use char because int might match the return type of a GCC
8706 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008707#ifdef __cplusplus
8708extern "C"
8709#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008710char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008711int
8712main ()
8713{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008714return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008715 ;
8716 return 0;
8717}
8718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008719if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008720 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008721else
Matthias Kloseb9621712010-04-24 17:59:49 +00008722 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008723fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008724rm -f core conftest.err conftest.$ac_objext \
8725 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008726LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008727fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8729$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
8730if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
8731 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008732
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008733 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008734 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008735 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008736fi
8737
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008738 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008739
Martin v. Löwis130fb172001-07-19 11:00:41 +00008740 if test "$USE_THREAD_MODULE" != "#"
8741 then
8742 # If the above checks didn't disable threads, (at least) OSF1
8743 # needs this '-threads' argument during linking.
8744 case $ac_sys_system in
8745 OSF1) LDLAST=-threads;;
8746 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008747 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008748fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008749
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008750if test "$posix_threads" = "yes"; then
8751 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008752
Matthias Kloseb9621712010-04-24 17:59:49 +00008753$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008754
8755 fi
8756
8757 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8758 case $ac_sys_system/$ac_sys_release in
8759 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008760$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008761
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008762 ;;
8763 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008764$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008765
8766 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008767 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008768$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008769
8770 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008771 AIX/6)
8772$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8773
8774 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008775 esac
8776
Matthias Kloseb9621712010-04-24 17:59:49 +00008777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8778$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
8779 if test "${ac_cv_pthread_system_supported+set}" = set; then :
8780 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008781else
Matthias Kloseb9621712010-04-24 17:59:49 +00008782 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008783 ac_cv_pthread_system_supported=no
8784else
Matthias Kloseb9621712010-04-24 17:59:49 +00008785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008786/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008787#include <pthread.h>
8788 void *foo(void *parm) {
8789 return NULL;
8790 }
8791 main() {
8792 pthread_attr_t attr;
8793 pthread_t id;
8794 if (pthread_attr_init(&attr)) exit(-1);
8795 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8796 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8797 exit(0);
8798 }
8799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008800if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008801 ac_cv_pthread_system_supported=yes
8802else
Matthias Kloseb9621712010-04-24 17:59:49 +00008803 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008805rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8806 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008807fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008808
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008809
Guido van Rossum627b2d71993-12-24 10:39:16 +00008810fi
8811
Matthias Kloseb9621712010-04-24 17:59:49 +00008812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8813$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008814 if test "$ac_cv_pthread_system_supported" = "yes"; then
8815
Matthias Kloseb9621712010-04-24 17:59:49 +00008816$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008817
8818 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008819 for ac_func in pthread_sigmask
8820do :
8821 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
8822if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008823 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008824#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008825_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008826 case $ac_sys_system in
8827 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008828
Matthias Kloseb9621712010-04-24 17:59:49 +00008829$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008830
8831 ;;
8832 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008833fi
8834done
8835
8836fi
8837
8838
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008839# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008840
Matthias Kloseb9621712010-04-24 17:59:49 +00008841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8842$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008843# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008844if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008845 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008846 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8848$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008849 ipv6=no
8850 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008851 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8852$as_echo "yes" >&6; }
8853 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008854
8855 ipv6=yes
8856 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008857 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008858else
Martin v. Löwis11437992002-04-12 09:54:03 +00008859
Matthias Kloseb9621712010-04-24 17:59:49 +00008860 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008861
Matthias Kloseb9621712010-04-24 17:59:49 +00008862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8863$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008864 ipv6=no
8865
8866else
Matthias Kloseb9621712010-04-24 17:59:49 +00008867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008868/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008869 /* AF_INET6 available check */
8870#include <sys/types.h>
8871#include <sys/socket.h>
8872main()
8873{
8874 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8875 exit(1);
8876 else
8877 exit(0);
8878}
8879
Martin v. Löwis11437992002-04-12 09:54:03 +00008880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008881if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008882
Matthias Kloseb9621712010-04-24 17:59:49 +00008883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8884$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008885 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008886
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008887else
Matthias Kloseb159a552010-04-25 21:00:44 +00008888
Matthias Kloseb9621712010-04-24 17:59:49 +00008889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8890$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008891 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008892
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008893fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008894rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8895 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008896fi
8897
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008898
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008899if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8901$as_echo_n "checking if RFC2553 API is available... " >&6; }
8902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008903/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008904
8905 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008906#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008907int
8908main ()
8909{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008910struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008911 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008912 ;
8913 return 0;
8914}
Matthias Kloseb159a552010-04-25 21:00:44 +00008915
Martin v. Löwis11437992002-04-12 09:54:03 +00008916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008917if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008918
8919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008920$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008921 ipv6=yes
8922
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008923else
Matthias Kloseb159a552010-04-25 21:00:44 +00008924
8925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008926$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008927 ipv6=no
8928
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008929fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008931fi
8932
8933if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008934 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008935
8936fi
8937
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008938fi
8939
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008940
8941ipv6type=unknown
8942ipv6lib=none
8943ipv6trylibc=no
8944
8945if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8947$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008948 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8949 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008950 case $i in
8951 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008953/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008954
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008955#include <netinet/in.h>
8956#ifdef IPV6_INRIA_VERSION
8957yes
8958#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008959_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008960if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008961 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008962 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008963fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008964rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008965
8966 ;;
8967 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008969/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008970
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008971#include <netinet/in.h>
8972#ifdef __KAME__
8973yes
8974#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008975_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008976if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008977 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008978 ipv6type=$i;
8979 ipv6lib=inet6
8980 ipv6libdir=/usr/local/v6/lib
8981 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008982fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008983rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008984
8985 ;;
8986 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008988/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008989
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008990#include <features.h>
8991#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
8992yes
8993#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008994_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008995if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008996 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008997 ipv6type=$i;
8998 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008999fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009000rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009001
9002 ;;
9003 linux-inet6)
9004 if test -d /usr/inet6; then
9005 ipv6type=$i
9006 ipv6lib=inet6
9007 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009008 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009009 fi
9010 ;;
9011 solaris)
9012 if test -f /etc/netconfig; then
9013 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
9014 ipv6type=$i
9015 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009016 fi
9017 fi
9018 ;;
9019 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009021/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009022
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009023#include <sys/param.h>
9024#ifdef _TOSHIBA_INET6
9025yes
9026#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009027_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009028if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009029 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009030 ipv6type=$i;
9031 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009032 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009033fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009034rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009035
9036 ;;
9037 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009039/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009040
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009041#include </usr/local/v6/include/sys/v6config.h>
9042#ifdef __V6D__
9043yes
9044#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009045_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009046if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009047 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009048 ipv6type=$i;
9049 ipv6lib=v6;
9050 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009051 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009052fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009053rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009054
9055 ;;
9056 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009058/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009059
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009060#include <sys/param.h>
9061#ifdef _ZETA_MINAMI_INET6
9062yes
9063#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009064_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009065if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009066 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009067 ipv6type=$i;
9068 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009069 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009070fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009071rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009072
9073 ;;
9074 esac
9075 if test "$ipv6type" != "unknown"; then
9076 break
9077 fi
9078 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9080$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009081fi
9082
9083if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9084 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9085 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9086 echo "using lib$ipv6lib"
9087 else
9088 if test $ipv6trylibc = "yes"; then
9089 echo "using libc"
9090 else
9091 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9092 echo "You need to fetch lib$ipv6lib.a from appropriate"
9093 echo 'ipv6 kit and compile beforehand.'
9094 exit 1
9095 fi
9096 fi
9097fi
9098
Matthias Kloseb9621712010-04-24 17:59:49 +00009099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9100$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009102/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009103
9104 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009105int
9106main ()
9107{
9108FSIORefNum fRef = 0
9109 ;
9110 return 0;
9111}
Matthias Kloseb159a552010-04-25 21:00:44 +00009112
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009113_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009114if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009115
Matthias Kloseb159a552010-04-25 21:00:44 +00009116
Matthias Kloseb9621712010-04-24 17:59:49 +00009117$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009118
Matthias Kloseb9621712010-04-24 17:59:49 +00009119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9120$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009121
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009122else
Matthias Kloseb159a552010-04-25 21:00:44 +00009123
Matthias Kloseb9621712010-04-24 17:59:49 +00009124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9125$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009126
9127fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9129
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009130# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9132$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009133
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009134# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009135if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009136 withval=$with_doc_strings;
9137fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009138
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009139
9140if test -z "$with_doc_strings"
9141then with_doc_strings="yes"
9142fi
9143if test "$with_doc_strings" != "no"
9144then
9145
Matthias Kloseb9621712010-04-24 17:59:49 +00009146$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009147
9148fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9150$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009151
Antoine Pitrou042b1282010-08-13 21:15:58 +00009152# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9154$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009155
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009156# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009157if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009158 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009159if test "$withval" != no
9160then
9161
Matthias Kloseb9621712010-04-24 17:59:49 +00009162$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009163
Matthias Kloseb9621712010-04-24 17:59:49 +00009164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9165$as_echo "yes" >&6; }
9166else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9167$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009168fi
9169else
Matthias Kloseb9621712010-04-24 17:59:49 +00009170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9171$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009172fi
9173
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009174
9175# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9177$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009178
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009179# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009180if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009181 withval=$with_pymalloc;
9182fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009183
Neil Schemenauera35c6882001-02-27 04:45:05 +00009184
Neil Schemenauer16c22972002-03-22 15:34:49 +00009185if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009186then
9187 with_pymalloc="yes"
9188 SOABI_QUALIFIERS="${SOABI_QUALIFIERS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009189fi
9190if test "$with_pymalloc" != "no"
9191then
Martin v. Löwis11437992002-04-12 09:54:03 +00009192
Matthias Kloseb9621712010-04-24 17:59:49 +00009193$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009194
9195fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9197$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009198
Benjamin Peterson05159c42009-12-03 03:01:27 +00009199# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9201$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009202
9203# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009204if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009205 withval=$with_valgrind;
9206else
9207 with_valgrind=no
9208fi
9209
Matthias Kloseb9621712010-04-24 17:59:49 +00009210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9211$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009212if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009213 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
9214if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009215
Matthias Kloseb9621712010-04-24 17:59:49 +00009216$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009217
9218else
Barry Warsaw278266f2010-10-14 17:38:46 +00009219 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009220
9221fi
9222
9223
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009224 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009225fi
9226
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009227# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009228
Guido van Rossum98935bf2001-09-05 19:13:16 +00009229DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009230
Guido van Rossume97ee181999-12-20 21:27:22 +00009231# the dlopen() function means we might want to use dynload_shlib.o. some
9232# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009233for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009234do :
9235 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
9236if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009237 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009238#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009239_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009240
Guido van Rossume97ee181999-12-20 21:27:22 +00009241fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009242done
Guido van Rossume97ee181999-12-20 21:27:22 +00009243
Michael W. Hudson54241132001-12-07 15:38:26 +00009244
Guido van Rossume97ee181999-12-20 21:27:22 +00009245# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9246# loading of modules.
9247
Matthias Kloseb9621712010-04-24 17:59:49 +00009248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9249$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009250if test -z "$DYNLOADFILE"
9251then
9252 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009253 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9254 if test "$ac_cv_func_dlopen" = yes
9255 then DYNLOADFILE="dynload_shlib.o"
9256 else DYNLOADFILE="dynload_aix.o"
9257 fi
9258 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009259 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009260 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9261 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009262 *)
9263 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9264 # out any dynamic loading
9265 if test "$ac_cv_func_dlopen" = yes
9266 then DYNLOADFILE="dynload_shlib.o"
9267 else DYNLOADFILE="dynload_stub.o"
9268 fi
9269 ;;
9270 esac
9271fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9273$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009274if test "$DYNLOADFILE" != "dynload_stub.o"
9275then
Martin v. Löwis11437992002-04-12 09:54:03 +00009276
Matthias Kloseb9621712010-04-24 17:59:49 +00009277$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009278
9279fi
9280
Neil Schemenauer4e425612001-06-19 15:44:15 +00009281# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9282
Michael W. Hudson54241132001-12-07 15:38:26 +00009283
Matthias Kloseb9621712010-04-24 17:59:49 +00009284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9285$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009286if test -z "$MACHDEP_OBJS"
9287then
Jack Jansene578a632001-08-15 01:27:14 +00009288 MACHDEP_OBJS=$extra_machdep_objs
9289else
9290 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009291fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9293$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009294
Guido van Rossum627b2d71993-12-24 10:39:16 +00009295# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009296for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Martin v. Löwis823725e2008-03-24 13:39:54 +00009297 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009298 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009299 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009300 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009301 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009302 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009303 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9304 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009305 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009306 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009307 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009308 truncate uname unsetenv utimes waitpid wait3 wait4 \
9309 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009310do :
9311 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9312ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Barry Warsaw278266f2010-10-14 17:38:46 +00009313if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009314 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009315#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009316_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009317
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009318fi
9319done
9320
Michael W. Hudson54241132001-12-07 15:38:26 +00009321
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009322# For some functions, having a definition is not sufficient, since
9323# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9325$as_echo_n "checking for chroot... " >&6; }
9326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009327/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009328#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009329int
9330main ()
9331{
9332void *x=chroot
9333 ;
9334 return 0;
9335}
9336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009337if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009338
Matthias Kloseb9621712010-04-24 17:59:49 +00009339$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009340
Matthias Kloseb159a552010-04-25 21:00:44 +00009341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009342$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009343else
Matthias Kloseb9621712010-04-24 17:59:49 +00009344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9345$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009346
9347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9350$as_echo_n "checking for link... " >&6; }
9351cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009352/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009353#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009354int
9355main ()
9356{
9357void *x=link
9358 ;
9359 return 0;
9360}
9361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009362if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009363
Matthias Kloseb9621712010-04-24 17:59:49 +00009364$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009365
Matthias Kloseb159a552010-04-25 21:00:44 +00009366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009367$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009368else
Matthias Kloseb9621712010-04-24 17:59:49 +00009369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9370$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009371
9372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9375$as_echo_n "checking for symlink... " >&6; }
9376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009377/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009378#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009379int
9380main ()
9381{
9382void *x=symlink
9383 ;
9384 return 0;
9385}
9386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009387if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009388
Matthias Kloseb9621712010-04-24 17:59:49 +00009389$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009390
Matthias Kloseb159a552010-04-25 21:00:44 +00009391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009392$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009393else
Matthias Kloseb9621712010-04-24 17:59:49 +00009394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9395$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009396
9397fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9400$as_echo_n "checking for fchdir... " >&6; }
9401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009402/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009403#include <unistd.h>
9404int
9405main ()
9406{
9407void *x=fchdir
9408 ;
9409 return 0;
9410}
9411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009412if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009413
Matthias Kloseb9621712010-04-24 17:59:49 +00009414$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009415
Matthias Kloseb159a552010-04-25 21:00:44 +00009416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009417$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009418else
Matthias Kloseb9621712010-04-24 17:59:49 +00009419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9420$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009421
9422fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9425$as_echo_n "checking for fsync... " >&6; }
9426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009427/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009428#include <unistd.h>
9429int
9430main ()
9431{
9432void *x=fsync
9433 ;
9434 return 0;
9435}
9436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009437if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009438
Matthias Kloseb9621712010-04-24 17:59:49 +00009439$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009440
Matthias Kloseb159a552010-04-25 21:00:44 +00009441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009442$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009443else
Matthias Kloseb9621712010-04-24 17:59:49 +00009444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9445$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009446
9447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9450$as_echo_n "checking for fdatasync... " >&6; }
9451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009452/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009453#include <unistd.h>
9454int
9455main ()
9456{
9457void *x=fdatasync
9458 ;
9459 return 0;
9460}
9461_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009462if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009463
Matthias Kloseb9621712010-04-24 17:59:49 +00009464$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009465
Matthias Kloseb159a552010-04-25 21:00:44 +00009466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009467$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009468else
Matthias Kloseb9621712010-04-24 17:59:49 +00009469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9470$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009471
9472fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9475$as_echo_n "checking for epoll... " >&6; }
9476cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009477/* end confdefs.h. */
9478#include <sys/epoll.h>
9479int
9480main ()
9481{
9482void *x=epoll_create
9483 ;
9484 return 0;
9485}
9486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009487if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009488
Matthias Kloseb9621712010-04-24 17:59:49 +00009489$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009490
Matthias Kloseb159a552010-04-25 21:00:44 +00009491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009492$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009493else
Matthias Kloseb9621712010-04-24 17:59:49 +00009494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9495$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009496
9497fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9500$as_echo_n "checking for kqueue... " >&6; }
9501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009502/* end confdefs.h. */
9503
9504#include <sys/types.h>
9505#include <sys/event.h>
9506
9507int
9508main ()
9509{
9510int x=kqueue()
9511 ;
9512 return 0;
9513}
9514_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009515if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009516
Matthias Kloseb9621712010-04-24 17:59:49 +00009517$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009518
Matthias Kloseb159a552010-04-25 21:00:44 +00009519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009520$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009521else
Matthias Kloseb9621712010-04-24 17:59:49 +00009522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9523$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009524
9525fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009527# On some systems (eg. FreeBSD 5), we would find a definition of the
9528# functions ctermid_r, setgroups in the library, but no prototype
9529# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9530# address to avoid compiler warnings and potential miscompilations
9531# because of the missing prototypes.
9532
Matthias Kloseb9621712010-04-24 17:59:49 +00009533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9534$as_echo_n "checking for ctermid_r... " >&6; }
9535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009536/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009537
Martin v. Löwisd5843682002-11-21 20:41:28 +00009538#include <stdio.h>
9539
Martin v. Löwisd5843682002-11-21 20:41:28 +00009540int
9541main ()
9542{
9543void* p = ctermid_r
9544 ;
9545 return 0;
9546}
9547_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009548if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009549
Matthias Kloseb9621712010-04-24 17:59:49 +00009550$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009551
Matthias Kloseb159a552010-04-25 21:00:44 +00009552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009553$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009554else
Matthias Kloseb9621712010-04-24 17:59:49 +00009555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9556$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009557
9558fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9560
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9562$as_echo_n "checking for flock declaration... " >&6; }
9563if test "${ac_cv_flock_decl+set}" = set; then :
9564 $as_echo_n "(cached) " >&6
9565else
9566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009567/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009568#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009569int
9570main ()
9571{
9572void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009573
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009574 ;
9575 return 0;
9576}
9577_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009578if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009579 ac_cv_flock_decl=yes
9580else
9581 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009582
9583fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009585
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009586fi
9587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9588$as_echo "$ac_cv_flock_decl" >&6; }
9589if test "x${ac_cv_flock_decl}" = xyes; then
9590 for ac_func in flock
9591do :
9592 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
9593if test "x$ac_cv_func_flock" = x""yes; then :
9594 cat >>confdefs.h <<_ACEOF
9595#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009596_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009597
Antoine Pitroua3000072010-09-07 14:52:42 +00009598else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009600$as_echo_n "checking for flock in -lbsd... " >&6; }
9601if test "${ac_cv_lib_bsd_flock+set}" = set; then :
9602 $as_echo_n "(cached) " >&6
9603else
9604 ac_check_lib_save_LIBS=$LIBS
9605LIBS="-lbsd $LIBS"
9606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9607/* end confdefs.h. */
9608
9609/* Override any GCC internal prototype to avoid an error.
9610 Use char because int might match the return type of a GCC
9611 builtin and then its argument prototype would still apply. */
9612#ifdef __cplusplus
9613extern "C"
9614#endif
9615char flock ();
9616int
9617main ()
9618{
9619return flock ();
9620 ;
9621 return 0;
9622}
9623_ACEOF
9624if ac_fn_c_try_link "$LINENO"; then :
9625 ac_cv_lib_bsd_flock=yes
9626else
9627 ac_cv_lib_bsd_flock=no
9628fi
9629rm -f core conftest.err conftest.$ac_objext \
9630 conftest$ac_exeext conftest.$ac_ext
9631LIBS=$ac_check_lib_save_LIBS
9632fi
9633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9634$as_echo "$ac_cv_lib_bsd_flock" >&6; }
9635if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009636 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009637
9638
9639$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9640
9641
9642fi
9643
9644
9645fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009646done
9647
Antoine Pitroua3000072010-09-07 14:52:42 +00009648fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009649
Matthias Kloseb9621712010-04-24 17:59:49 +00009650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9651$as_echo_n "checking for getpagesize... " >&6; }
9652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009653/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009654
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009655#include <unistd.h>
9656
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009657int
9658main ()
9659{
9660void* p = getpagesize
9661 ;
9662 return 0;
9663}
9664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009665if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009666
Matthias Kloseb9621712010-04-24 17:59:49 +00009667$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009668
Matthias Kloseb159a552010-04-25 21:00:44 +00009669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009670$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009671else
Matthias Kloseb9621712010-04-24 17:59:49 +00009672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9673$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009674
9675fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009677
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009678for ac_prog in true
9679do
9680 # Extract the first word of "$ac_prog", so it can be a program name with args.
9681set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9683$as_echo_n "checking for $ac_word... " >&6; }
9684if test "${ac_cv_prog_TRUE+set}" = set; then :
9685 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009686else
9687 if test -n "$TRUE"; then
9688 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9689else
9690as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9691for as_dir in $PATH
9692do
9693 IFS=$as_save_IFS
9694 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009695 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009696 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 +00009697 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009698 $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 +00009699 break 2
9700 fi
9701done
Matthias Kloseb9621712010-04-24 17:59:49 +00009702 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009703IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009704
9705fi
9706fi
9707TRUE=$ac_cv_prog_TRUE
9708if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9710$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009711else
Matthias Kloseb9621712010-04-24 17:59:49 +00009712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9713$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009714fi
9715
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009716
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009717 test -n "$TRUE" && break
9718done
9719test -n "$TRUE" || TRUE="/bin/true"
9720
9721
Matthias Kloseb9621712010-04-24 17:59:49 +00009722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9723$as_echo_n "checking for inet_aton in -lc... " >&6; }
9724if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
9725 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009726else
9727 ac_check_lib_save_LIBS=$LIBS
9728LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009729cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009730/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009731
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009732/* Override any GCC internal prototype to avoid an error.
9733 Use char because int might match the return type of a GCC
9734 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009735#ifdef __cplusplus
9736extern "C"
9737#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009738char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009739int
9740main ()
9741{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009742return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009743 ;
9744 return 0;
9745}
9746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009747if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009748 ac_cv_lib_c_inet_aton=yes
9749else
Matthias Kloseb9621712010-04-24 17:59:49 +00009750 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009752rm -f core conftest.err conftest.$ac_objext \
9753 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009754LIBS=$ac_check_lib_save_LIBS
9755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9757$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
9758if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009759 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009760else
Matthias Kloseb9621712010-04-24 17:59:49 +00009761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9762$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
9763if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
9764 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009765else
9766 ac_check_lib_save_LIBS=$LIBS
9767LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009769/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009770
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009771/* Override any GCC internal prototype to avoid an error.
9772 Use char because int might match the return type of a GCC
9773 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009774#ifdef __cplusplus
9775extern "C"
9776#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009777char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009778int
9779main ()
9780{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009781return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009782 ;
9783 return 0;
9784}
9785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009786if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009787 ac_cv_lib_resolv_inet_aton=yes
9788else
Matthias Kloseb9621712010-04-24 17:59:49 +00009789 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009790fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009791rm -f core conftest.err conftest.$ac_objext \
9792 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009793LIBS=$ac_check_lib_save_LIBS
9794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9796$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
9797if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009798 cat >>confdefs.h <<_ACEOF
9799#define HAVE_LIBRESOLV 1
9800_ACEOF
9801
9802 LIBS="-lresolv $LIBS"
9803
9804fi
9805
9806
9807fi
9808
9809
Christian Heimesd0764e22007-12-04 15:00:33 +00009810# On Tru64, chflags seems to be present, but calling it will
9811# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9813$as_echo_n "checking for chflags... " >&6; }
9814if test "${ac_cv_have_chflags+set}" = set; then :
9815 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009816else
Matthias Kloseb9621712010-04-24 17:59:49 +00009817 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009818 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009819else
Matthias Kloseb9621712010-04-24 17:59:49 +00009820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009821/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009822[
Christian Heimesd0764e22007-12-04 15:00:33 +00009823#include <sys/stat.h>
9824#include <unistd.h>
9825int main(int argc, char*argv[])
9826{
9827 if(chflags(argv[0], 0) != 0)
9828 return 1;
9829 return 0;
9830}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009831]
Christian Heimesd0764e22007-12-04 15:00:33 +00009832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009833if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009834 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009835else
Matthias Kloseb9621712010-04-24 17:59:49 +00009836 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009837fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009838rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9839 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009840fi
9841
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009842
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009843fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9845$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009846if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009847 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
9848if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009849 ac_cv_have_chflags="yes"
9850else
9851 ac_cv_have_chflags="no"
9852fi
9853
9854fi
9855if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009856
Matthias Kloseb9621712010-04-24 17:59:49 +00009857$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009858
9859fi
9860
Matthias Kloseb9621712010-04-24 17:59:49 +00009861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9862$as_echo_n "checking for lchflags... " >&6; }
9863if test "${ac_cv_have_lchflags+set}" = set; then :
9864 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009865else
Matthias Kloseb9621712010-04-24 17:59:49 +00009866 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009867 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009868else
Matthias Kloseb9621712010-04-24 17:59:49 +00009869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009870/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009871[
Christian Heimesd0764e22007-12-04 15:00:33 +00009872#include <sys/stat.h>
9873#include <unistd.h>
9874int main(int argc, char*argv[])
9875{
9876 if(lchflags(argv[0], 0) != 0)
9877 return 1;
9878 return 0;
9879}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009880]
Christian Heimesd0764e22007-12-04 15:00:33 +00009881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009882if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009883 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009884else
Matthias Kloseb9621712010-04-24 17:59:49 +00009885 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009886fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009887rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9888 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009889fi
9890
9891
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009892fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9894$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009895if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009896 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
9897if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009898 ac_cv_have_lchflags="yes"
9899else
9900 ac_cv_have_lchflags="no"
9901fi
9902
9903fi
9904if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009905
Matthias Kloseb9621712010-04-24 17:59:49 +00009906$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009907
9908fi
9909
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009910case $ac_sys_system/$ac_sys_release in
9911Darwin/*)
9912 _CUR_CFLAGS="${CFLAGS}"
9913 _CUR_LDFLAGS="${LDFLAGS}"
9914 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9915 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9916 ;;
9917esac
9918
Matthias Kloseb9621712010-04-24 17:59:49 +00009919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9920$as_echo_n "checking for inflateCopy in -lz... " >&6; }
9921if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
9922 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009923else
9924 ac_check_lib_save_LIBS=$LIBS
9925LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009926cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009927/* end confdefs.h. */
9928
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009929/* Override any GCC internal prototype to avoid an error.
9930 Use char because int might match the return type of a GCC
9931 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009932#ifdef __cplusplus
9933extern "C"
9934#endif
9935char inflateCopy ();
9936int
9937main ()
9938{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009939return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009940 ;
9941 return 0;
9942}
9943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009944if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009945 ac_cv_lib_z_inflateCopy=yes
9946else
Matthias Kloseb9621712010-04-24 17:59:49 +00009947 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009948fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009949rm -f core conftest.err conftest.$ac_objext \
9950 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009951LIBS=$ac_check_lib_save_LIBS
9952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9954$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
9955if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009956
Matthias Kloseb9621712010-04-24 17:59:49 +00009957$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009958
9959fi
9960
9961
9962case $ac_sys_system/$ac_sys_release in
9963Darwin/*)
9964 CFLAGS="${_CUR_CFLAGS}"
9965 LDFLAGS="${_CUR_LDFLAGS}"
9966 ;;
9967esac
9968
Matthias Kloseb9621712010-04-24 17:59:49 +00009969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9970$as_echo_n "checking for hstrerror... " >&6; }
9971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009972/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009973
Martin v. Löwise9416172003-05-03 10:12:45 +00009974#include <netdb.h>
9975
Martin v. Löwise9416172003-05-03 10:12:45 +00009976int
9977main ()
9978{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009979void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009980 ;
9981 return 0;
9982}
9983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009984if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009985
Matthias Kloseb9621712010-04-24 17:59:49 +00009986$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009987
Matthias Kloseb159a552010-04-25 21:00:44 +00009988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009989$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009990else
Matthias Kloseb9621712010-04-24 17:59:49 +00009991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9992$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009993
9994fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009995rm -f core conftest.err conftest.$ac_objext \
9996 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009997
Matthias Kloseb9621712010-04-24 17:59:49 +00009998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
9999$as_echo_n "checking for inet_aton... " >&6; }
10000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010001/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010002
Martin v. Löwis86d66262006-02-17 08:40:11 +000010003#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010004#include <sys/socket.h>
10005#include <netinet/in.h>
10006#include <arpa/inet.h>
10007
Martin v. Löwise9416172003-05-03 10:12:45 +000010008int
10009main ()
10010{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010011void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010012 ;
10013 return 0;
10014}
10015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010016if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010017
Matthias Kloseb9621712010-04-24 17:59:49 +000010018$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010019
Matthias Kloseb159a552010-04-25 21:00:44 +000010020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010021$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010022else
Matthias Kloseb9621712010-04-24 17:59:49 +000010023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10024$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010025
10026fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010027rm -f core conftest.err conftest.$ac_objext \
10028 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010029
Matthias Kloseb9621712010-04-24 17:59:49 +000010030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10031$as_echo_n "checking for inet_pton... " >&6; }
10032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010033/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010034
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010035#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010036#include <sys/socket.h>
10037#include <netinet/in.h>
10038#include <arpa/inet.h>
10039
Martin v. Löwise9416172003-05-03 10:12:45 +000010040int
10041main ()
10042{
10043void* p = inet_pton
10044 ;
10045 return 0;
10046}
10047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010048if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010049
Matthias Kloseb9621712010-04-24 17:59:49 +000010050$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010051
Matthias Kloseb159a552010-04-25 21:00:44 +000010052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010053$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010054else
Matthias Kloseb9621712010-04-24 17:59:49 +000010055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10056$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010057
10058fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010060
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010061# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10063$as_echo_n "checking for setgroups... " >&6; }
10064cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010065/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010066
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010067#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010068#ifdef HAVE_GRP_H
10069#include <grp.h>
10070#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010071
Martin v. Löwisd5843682002-11-21 20:41:28 +000010072int
10073main ()
10074{
10075void* p = setgroups
10076 ;
10077 return 0;
10078}
10079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010080if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010081
Matthias Kloseb9621712010-04-24 17:59:49 +000010082$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010083
Matthias Kloseb159a552010-04-25 21:00:44 +000010084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010085$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010086else
Matthias Kloseb9621712010-04-24 17:59:49 +000010087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10088$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010089
10090fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010092
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010093# check for openpty and forkpty
10094
10095for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010096do :
10097 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
10098if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010099 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010100#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010101_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010102
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010103else
Matthias Kloseb9621712010-04-24 17:59:49 +000010104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10105$as_echo_n "checking for openpty in -lutil... " >&6; }
10106if test "${ac_cv_lib_util_openpty+set}" = set; then :
10107 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010108else
Martin v. Löwis11437992002-04-12 09:54:03 +000010109 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010110LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010111cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010112/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010113
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010114/* Override any GCC internal prototype to avoid an error.
10115 Use char because int might match the return type of a GCC
10116 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010117#ifdef __cplusplus
10118extern "C"
10119#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010120char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010121int
10122main ()
10123{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010124return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010125 ;
10126 return 0;
10127}
10128_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010129if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010130 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010131else
Matthias Kloseb9621712010-04-24 17:59:49 +000010132 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010133fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010134rm -f core conftest.err conftest.$ac_objext \
10135 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010136LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010137fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10139$as_echo "$ac_cv_lib_util_openpty" >&6; }
10140if test "x$ac_cv_lib_util_openpty" = x""yes; then :
10141 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010142 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010143else
Matthias Kloseb9621712010-04-24 17:59:49 +000010144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10145$as_echo_n "checking for openpty in -lbsd... " >&6; }
10146if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
10147 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010148else
10149 ac_check_lib_save_LIBS=$LIBS
10150LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010152/* end confdefs.h. */
10153
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010154/* Override any GCC internal prototype to avoid an error.
10155 Use char because int might match the return type of a GCC
10156 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010157#ifdef __cplusplus
10158extern "C"
10159#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010160char openpty ();
10161int
10162main ()
10163{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010164return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010165 ;
10166 return 0;
10167}
10168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010169if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010170 ac_cv_lib_bsd_openpty=yes
10171else
Matthias Kloseb9621712010-04-24 17:59:49 +000010172 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010173fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010174rm -f core conftest.err conftest.$ac_objext \
10175 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010176LIBS=$ac_check_lib_save_LIBS
10177fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10179$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
10180if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
10181 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010182 LIBS="$LIBS -lbsd"
10183fi
10184
10185
10186fi
10187
Fred Drake8cef4cf2000-06-28 16:40:38 +000010188
10189fi
10190done
10191
10192for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010193do :
10194 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
10195if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010196 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010197#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010198_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010199
Fred Drake8cef4cf2000-06-28 16:40:38 +000010200else
Matthias Kloseb9621712010-04-24 17:59:49 +000010201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10202$as_echo_n "checking for forkpty in -lutil... " >&6; }
10203if test "${ac_cv_lib_util_forkpty+set}" = set; then :
10204 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010205else
Martin v. Löwis11437992002-04-12 09:54:03 +000010206 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010207LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010209/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010210
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010211/* Override any GCC internal prototype to avoid an error.
10212 Use char because int might match the return type of a GCC
10213 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010214#ifdef __cplusplus
10215extern "C"
10216#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010217char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010218int
10219main ()
10220{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010221return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010222 ;
10223 return 0;
10224}
10225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010226if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010227 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010228else
Matthias Kloseb9621712010-04-24 17:59:49 +000010229 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010230fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010231rm -f core conftest.err conftest.$ac_objext \
10232 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010233LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010234fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10236$as_echo "$ac_cv_lib_util_forkpty" >&6; }
10237if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
10238 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010239 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010240else
Matthias Kloseb9621712010-04-24 17:59:49 +000010241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10242$as_echo_n "checking for forkpty in -lbsd... " >&6; }
10243if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
10244 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010245else
10246 ac_check_lib_save_LIBS=$LIBS
10247LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010249/* end confdefs.h. */
10250
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010251/* Override any GCC internal prototype to avoid an error.
10252 Use char because int might match the return type of a GCC
10253 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010254#ifdef __cplusplus
10255extern "C"
10256#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010257char forkpty ();
10258int
10259main ()
10260{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010261return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010262 ;
10263 return 0;
10264}
10265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010266if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010267 ac_cv_lib_bsd_forkpty=yes
10268else
Matthias Kloseb9621712010-04-24 17:59:49 +000010269 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010270fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010271rm -f core conftest.err conftest.$ac_objext \
10272 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010273LIBS=$ac_check_lib_save_LIBS
10274fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10276$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
10277if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
10278 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010279 LIBS="$LIBS -lbsd"
10280fi
10281
10282
10283fi
10284
Fred Drake8cef4cf2000-06-28 16:40:38 +000010285
10286fi
10287done
10288
Jack Jansendd19cf82001-12-06 22:36:17 +000010289
Christian Heimesb186d002008-03-18 15:15:01 +000010290# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010291for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010292do :
10293 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
10294if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010295 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010296#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010297_ACEOF
10298
10299fi
10300done
10301
10302
Michael W. Hudson54241132001-12-07 15:38:26 +000010303# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010304for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010305do :
10306 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10307ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Barry Warsaw278266f2010-10-14 17:38:46 +000010308if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010309 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010310#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010311_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010312
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010313fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010314done
10315
Michael W. Hudson54241132001-12-07 15:38:26 +000010316
Barry Warsaw278266f2010-10-14 17:38:46 +000010317ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
10318if test "x$ac_cv_func_dup2" = x""yes; then :
10319 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010320
Martin v. Löwis1142de32002-03-29 16:28:31 +000010321else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010322 case " $LIBOBJS " in
Barry Warsaw278266f2010-10-14 17:38:46 +000010323 *" dup2.$ac_objext "* ) ;;
10324 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010325 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010326esac
10327
Martin v. Löwis1142de32002-03-29 16:28:31 +000010328fi
Barry Warsaw278266f2010-10-14 17:38:46 +000010329
10330ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
10331if test "x$ac_cv_func_getcwd" = x""yes; then :
10332 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10333
10334else
10335 case " $LIBOBJS " in
10336 *" getcwd.$ac_objext "* ) ;;
10337 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10338 ;;
10339esac
10340
10341fi
10342
10343ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
10344if test "x$ac_cv_func_strdup" = x""yes; then :
10345 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10346
10347else
10348 case " $LIBOBJS " in
10349 *" strdup.$ac_objext "* ) ;;
10350 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10351 ;;
10352esac
10353
10354fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010355
10356
10357for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010358do :
10359 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
10360if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010361 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010362#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010365/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010366#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010367int
10368main ()
10369{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010370getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010371 ;
10372 return 0;
10373}
10374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010375if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010376
Matthias Kloseb9621712010-04-24 17:59:49 +000010377$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010378
Guido van Rossum627b2d71993-12-24 10:39:16 +000010379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010381
Guido van Rossum627b2d71993-12-24 10:39:16 +000010382fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010383done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010384
Jack Jansen150753c2003-03-29 22:07:47 +000010385for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010386do :
10387 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
10388if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010389 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010390#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010391_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010393/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010394#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010395int
10396main ()
10397{
10398setpgrp(0,0);
10399 ;
10400 return 0;
10401}
10402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010403if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010404
Matthias Kloseb9621712010-04-24 17:59:49 +000010405$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010406
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010407fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010409
10410fi
10411done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010412
Thomas Wouters3a584202000-08-05 23:28:51 +000010413for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010414do :
10415 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
10416if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010417 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010418#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010421/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010422#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010423int
10424main ()
10425{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010426gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010427 ;
10428 return 0;
10429}
10430_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010431if ac_fn_c_try_compile "$LINENO"; then :
10432
Guido van Rossum627b2d71993-12-24 10:39:16 +000010433else
Skip Montanaro6dead952003-09-25 14:50:04 +000010434
Matthias Kloseb9621712010-04-24 17:59:49 +000010435$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010436
Martin v. Löwis11437992002-04-12 09:54:03 +000010437
Guido van Rossum627b2d71993-12-24 10:39:16 +000010438fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010440
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010441fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010442done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010443
Michael W. Hudson54241132001-12-07 15:38:26 +000010444
Matthias Kloseb9621712010-04-24 17:59:49 +000010445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10446$as_echo_n "checking for major... " >&6; }
10447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010448/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010449
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010450#if defined(MAJOR_IN_MKDEV)
10451#include <sys/mkdev.h>
10452#elif defined(MAJOR_IN_SYSMACROS)
10453#include <sys/sysmacros.h>
10454#else
10455#include <sys/types.h>
10456#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010457
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010458int
10459main ()
10460{
10461
10462 makedev(major(0),minor(0));
10463
10464 ;
10465 return 0;
10466}
10467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010468if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010469
10470
Matthias Kloseb9621712010-04-24 17:59:49 +000010471$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010472
Matthias Kloseb9621712010-04-24 17:59:49 +000010473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10474$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010475
10476else
Skip Montanaro6dead952003-09-25 14:50:04 +000010477
Matthias Kloseb9621712010-04-24 17:59:49 +000010478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10479$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010480
10481fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010482rm -f core conftest.err conftest.$ac_objext \
10483 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010484
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010485# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010486# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10488$as_echo_n "checking for getaddrinfo... " >&6; }
10489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010490/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010491
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010492#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010493#include <sys/socket.h>
10494#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010495#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010496
Martin v. Löwis11437992002-04-12 09:54:03 +000010497int
10498main ()
10499{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010500getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010501 ;
10502 return 0;
10503}
10504_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010505if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010506 have_getaddrinfo=yes
10507else
Matthias Kloseb9621712010-04-24 17:59:49 +000010508 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010509fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010510rm -f core conftest.err conftest.$ac_objext \
10511 conftest$ac_exeext conftest.$ac_ext
10512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10513$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010514if test $have_getaddrinfo = yes
10515then
Matthias Kloseb9621712010-04-24 17:59:49 +000010516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10517$as_echo_n "checking getaddrinfo bug... " >&6; }
10518 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
10519 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010520else
Matthias Kloseb9621712010-04-24 17:59:49 +000010521 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010522 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010523else
Matthias Kloseb9621712010-04-24 17:59:49 +000010524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010525/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010526
10527#include <sys/types.h>
10528#include <netdb.h>
10529#include <string.h>
10530#include <sys/socket.h>
10531#include <netinet/in.h>
10532
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010533int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010534{
10535 int passive, gaierr, inet4 = 0, inet6 = 0;
10536 struct addrinfo hints, *ai, *aitop;
10537 char straddr[INET6_ADDRSTRLEN], strport[16];
10538
10539 for (passive = 0; passive <= 1; passive++) {
10540 memset(&hints, 0, sizeof(hints));
10541 hints.ai_family = AF_UNSPEC;
10542 hints.ai_flags = passive ? AI_PASSIVE : 0;
10543 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010544 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010545 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10546 (void)gai_strerror(gaierr);
10547 goto bad;
10548 }
10549 for (ai = aitop; ai; ai = ai->ai_next) {
10550 if (ai->ai_addr == NULL ||
10551 ai->ai_addrlen == 0 ||
10552 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10553 straddr, sizeof(straddr), strport, sizeof(strport),
10554 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10555 goto bad;
10556 }
10557 switch (ai->ai_family) {
10558 case AF_INET:
10559 if (strcmp(strport, "54321") != 0) {
10560 goto bad;
10561 }
10562 if (passive) {
10563 if (strcmp(straddr, "0.0.0.0") != 0) {
10564 goto bad;
10565 }
10566 } else {
10567 if (strcmp(straddr, "127.0.0.1") != 0) {
10568 goto bad;
10569 }
10570 }
10571 inet4++;
10572 break;
10573 case AF_INET6:
10574 if (strcmp(strport, "54321") != 0) {
10575 goto bad;
10576 }
10577 if (passive) {
10578 if (strcmp(straddr, "::") != 0) {
10579 goto bad;
10580 }
10581 } else {
10582 if (strcmp(straddr, "::1") != 0) {
10583 goto bad;
10584 }
10585 }
10586 inet6++;
10587 break;
10588 case AF_UNSPEC:
10589 goto bad;
10590 break;
10591 default:
10592 /* another family support? */
10593 break;
10594 }
10595 }
10596 }
10597
10598 if (!(inet4 == 0 || inet4 == 2))
10599 goto bad;
10600 if (!(inet6 == 0 || inet6 == 2))
10601 goto bad;
10602
10603 if (aitop)
10604 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010605 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010606
10607 bad:
10608 if (aitop)
10609 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010610 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010611}
10612
Martin v. Löwis11437992002-04-12 09:54:03 +000010613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010614if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010615 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010616else
Matthias Kloseb9621712010-04-24 17:59:49 +000010617 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010618fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010619rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10620 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010621fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010622
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010623fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010624
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010626
Mark Dickinson2df5d282009-12-31 21:22:50 +000010627if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010628then
10629 if test $ipv6 = yes
10630 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010631 echo 'Fatal: You must get working getaddrinfo() function.'
10632 echo ' or you can specify "--disable-ipv6"'.
10633 exit 1
10634 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010635else
Martin v. Löwis11437992002-04-12 09:54:03 +000010636
Matthias Kloseb9621712010-04-24 17:59:49 +000010637$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010638
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010639fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010640for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010641do :
10642 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
10643if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010644 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010645#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010646_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010647
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010648fi
10649done
10650
Michael W. Hudson54241132001-12-07 15:38:26 +000010651
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010652# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10654$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
10655if test "${ac_cv_header_time+set}" = set; then :
10656 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010657else
Matthias Kloseb9621712010-04-24 17:59:49 +000010658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010659/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010660#include <sys/types.h>
10661#include <sys/time.h>
10662#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010663
Martin v. Löwis11437992002-04-12 09:54:03 +000010664int
10665main ()
10666{
10667if ((struct tm *) 0)
10668return 0;
10669 ;
10670 return 0;
10671}
10672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010673if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010674 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010675else
Matthias Kloseb9621712010-04-24 17:59:49 +000010676 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010677fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010679fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10681$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010682if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010683
Matthias Kloseb9621712010-04-24 17:59:49 +000010684$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010685
10686fi
10687
Matthias Kloseb9621712010-04-24 17:59:49 +000010688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10689$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10690if test "${ac_cv_struct_tm+set}" = set; then :
10691 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010692else
Matthias Kloseb9621712010-04-24 17:59:49 +000010693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010694/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010695#include <sys/types.h>
10696#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010697
Martin v. Löwis11437992002-04-12 09:54:03 +000010698int
10699main ()
10700{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010701struct tm tm;
10702 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010703 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010704 ;
10705 return 0;
10706}
10707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010708if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010709 ac_cv_struct_tm=time.h
10710else
Matthias Kloseb9621712010-04-24 17:59:49 +000010711 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010712fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010714fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10716$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010717if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010718
Matthias Kloseb9621712010-04-24 17:59:49 +000010719$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010720
10721fi
10722
Matthias Kloseb9621712010-04-24 17:59:49 +000010723ac_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 +000010724#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010725
Matthias Kloseb9621712010-04-24 17:59:49 +000010726"
10727if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010728
10729cat >>confdefs.h <<_ACEOF
10730#define HAVE_STRUCT_TM_TM_ZONE 1
10731_ACEOF
10732
10733
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010734fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010735
Martin v. Löwis11437992002-04-12 09:54:03 +000010736if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10737
Matthias Kloseb9621712010-04-24 17:59:49 +000010738$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010739
10740else
Matthias Kloseb9621712010-04-24 17:59:49 +000010741 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10742"
10743if test "x$ac_cv_have_decl_tzname" = x""yes; then :
10744 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010745else
Matthias Kloseb9621712010-04-24 17:59:49 +000010746 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010747fi
10748
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010749cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010750#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010751_ACEOF
10752
Matthias Kloseb9621712010-04-24 17:59:49 +000010753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10754$as_echo_n "checking for tzname... " >&6; }
10755if test "${ac_cv_var_tzname+set}" = set; then :
10756 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010757else
Matthias Kloseb9621712010-04-24 17:59:49 +000010758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010759/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010760#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010761#if !HAVE_DECL_TZNAME
10762extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010763#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010764
Martin v. Löwis11437992002-04-12 09:54:03 +000010765int
10766main ()
10767{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010768return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010769 ;
10770 return 0;
10771}
10772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010773if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010774 ac_cv_var_tzname=yes
10775else
Matthias Kloseb9621712010-04-24 17:59:49 +000010776 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010777fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010778rm -f core conftest.err conftest.$ac_objext \
10779 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010780fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10782$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010783 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010784
Matthias Kloseb9621712010-04-24 17:59:49 +000010785$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010786
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010787 fi
10788fi
10789
Matthias Kloseb9621712010-04-24 17:59:49 +000010790ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
10791if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010792
10793cat >>confdefs.h <<_ACEOF
10794#define HAVE_STRUCT_STAT_ST_RDEV 1
10795_ACEOF
10796
10797
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010798fi
10799
Matthias Kloseb9621712010-04-24 17:59:49 +000010800ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
10801if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010802
Martin v. Löwis11437992002-04-12 09:54:03 +000010803cat >>confdefs.h <<_ACEOF
10804#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10805_ACEOF
10806
10807
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010808fi
10809
Matthias Kloseb9621712010-04-24 17:59:49 +000010810ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
10811if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010812
10813cat >>confdefs.h <<_ACEOF
10814#define HAVE_STRUCT_STAT_ST_FLAGS 1
10815_ACEOF
10816
10817
10818fi
10819
Matthias Kloseb9621712010-04-24 17:59:49 +000010820ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
10821if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010822
10823cat >>confdefs.h <<_ACEOF
10824#define HAVE_STRUCT_STAT_ST_GEN 1
10825_ACEOF
10826
10827
10828fi
10829
Matthias Kloseb9621712010-04-24 17:59:49 +000010830ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
10831if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010832
10833cat >>confdefs.h <<_ACEOF
10834#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10835_ACEOF
10836
10837
10838fi
10839
Matthias Kloseb9621712010-04-24 17:59:49 +000010840ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
10841if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010842
Martin v. Löwis11437992002-04-12 09:54:03 +000010843cat >>confdefs.h <<_ACEOF
10844#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10845_ACEOF
10846
10847
Matthias Kloseb9621712010-04-24 17:59:49 +000010848$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010849
10850else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010851 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010852 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010853 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10854 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010855esac
10856
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010857fi
10858
Michael W. Hudson54241132001-12-07 15:38:26 +000010859
Martin v. Löwis11437992002-04-12 09:54:03 +000010860
Matthias Kloseb9621712010-04-24 17:59:49 +000010861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10862$as_echo_n "checking for time.h that defines altzone... " >&6; }
10863if test "${ac_cv_header_time_altzone+set}" = set; then :
10864 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010865else
Matthias Kloseb159a552010-04-25 21:00:44 +000010866
Matthias Kloseb9621712010-04-24 17:59:49 +000010867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010868/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010869#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010870int
10871main ()
10872{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010873return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010874 ;
10875 return 0;
10876}
10877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010878if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010879 ac_cv_header_time_altzone=yes
10880else
Matthias Kloseb9621712010-04-24 17:59:49 +000010881 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010882fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010884
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010885fi
10886
Matthias Kloseb9621712010-04-24 17:59:49 +000010887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10888$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010889if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010890
Matthias Kloseb9621712010-04-24 17:59:49 +000010891$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010892
10893fi
10894
Guido van Rossumda88dad1995-01-26 00:46:29 +000010895was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10897$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010899/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010900
10901#include <sys/types.h>
10902#include <sys/select.h>
10903#include <sys/time.h>
10904
Martin v. Löwis11437992002-04-12 09:54:03 +000010905int
10906main ()
10907{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010908;
Martin v. Löwis11437992002-04-12 09:54:03 +000010909 ;
10910 return 0;
10911}
10912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010913if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010914
10915
Matthias Kloseb9621712010-04-24 17:59:49 +000010916$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010917
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010918 was_it_defined=yes
10919
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010920fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10923$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010924
Matthias Kloseb9621712010-04-24 17:59:49 +000010925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10926$as_echo_n "checking for addrinfo... " >&6; }
10927if test "${ac_cv_struct_addrinfo+set}" = set; then :
10928 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010929else
Matthias Kloseb9621712010-04-24 17:59:49 +000010930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010931/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010932#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010933int
10934main ()
10935{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010936struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010937 ;
10938 return 0;
10939}
10940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010941if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010942 ac_cv_struct_addrinfo=yes
10943else
Matthias Kloseb9621712010-04-24 17:59:49 +000010944 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010945fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10947fi
10948
Matthias Kloseb9621712010-04-24 17:59:49 +000010949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10950$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010951if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010952
Matthias Kloseb9621712010-04-24 17:59:49 +000010953$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010954
10955fi
10956
Matthias Kloseb9621712010-04-24 17:59:49 +000010957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10958$as_echo_n "checking for sockaddr_storage... " >&6; }
10959if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
10960 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010961else
Matthias Kloseb9621712010-04-24 17:59:49 +000010962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010963/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010964
10965# include <sys/types.h>
10966# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010967int
10968main ()
10969{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010970struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010971 ;
10972 return 0;
10973}
10974_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010975if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010976 ac_cv_struct_sockaddr_storage=yes
10977else
Matthias Kloseb9621712010-04-24 17:59:49 +000010978 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010979fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10981fi
10982
Matthias Kloseb9621712010-04-24 17:59:49 +000010983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10984$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010985if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010986
Matthias Kloseb9621712010-04-24 17:59:49 +000010987$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010988
10989fi
10990
Guido van Rossum627b2d71993-12-24 10:39:16 +000010991# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000010992
Matthias Kloseb9621712010-04-24 17:59:49 +000010993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10994$as_echo_n "checking whether char is unsigned... " >&6; }
10995if test "${ac_cv_c_char_unsigned+set}" = set; then :
10996 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000010997else
Matthias Kloseb9621712010-04-24 17:59:49 +000010998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010999/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011000$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011001int
11002main ()
11003{
11004static int test_array [1 - 2 * !(((char) -1) < 0)];
11005test_array [0] = 0
11006
11007 ;
11008 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011009}
Martin v. Löwis11437992002-04-12 09:54:03 +000011010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011011if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011012 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011013else
Matthias Kloseb9621712010-04-24 17:59:49 +000011014 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011015fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011017fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11019$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011020if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011021 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011022
11023fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011024
Matthias Kloseb9621712010-04-24 17:59:49 +000011025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11026$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11027if test "${ac_cv_c_const+set}" = set; then :
11028 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011029else
Matthias Kloseb9621712010-04-24 17:59:49 +000011030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011031/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011032
Martin v. Löwis11437992002-04-12 09:54:03 +000011033int
11034main ()
11035{
11036/* FIXME: Include the comments suggested by Paul. */
11037#ifndef __cplusplus
11038 /* Ultrix mips cc rejects this. */
11039 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011040 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011041 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011042 char const *const *pcpcc;
11043 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011044 /* NEC SVR4.0.2 mips cc rejects this. */
11045 struct point {int x, y;};
11046 static struct point const zero = {0,0};
11047 /* AIX XL C 1.02.0.0 rejects this.
11048 It does not let you subtract one const X* pointer from another in
11049 an arm of an if-expression whose if-part is not a constant
11050 expression */
11051 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011052 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011053 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011054 ++pcpcc;
11055 ppc = (char**) pcpcc;
11056 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011057 { /* SCO 3.2v4 cc rejects this. */
11058 char *t;
11059 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011060
Martin v. Löwis11437992002-04-12 09:54:03 +000011061 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011062 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011063 }
11064 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11065 int x[] = {25, 17};
11066 const int *foo = &x[0];
11067 ++foo;
11068 }
11069 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11070 typedef const int *iptr;
11071 iptr p = 0;
11072 ++p;
11073 }
11074 { /* AIX XL C 1.02.0.0 rejects this saying
11075 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11076 struct s { int j; const int *ap[3]; };
11077 struct s *b; b->j = 5;
11078 }
11079 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11080 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011081 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011082 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011083 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011084#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011085
Martin v. Löwis11437992002-04-12 09:54:03 +000011086 ;
11087 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011088}
Martin v. Löwis11437992002-04-12 09:54:03 +000011089_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011090if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011091 ac_cv_c_const=yes
11092else
Matthias Kloseb9621712010-04-24 17:59:49 +000011093 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011094fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011096fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11098$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011099if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011100
Matthias Kloseb9621712010-04-24 17:59:49 +000011101$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011102
11103fi
11104
Michael W. Hudson54241132001-12-07 15:38:26 +000011105
Guido van Rossumda88dad1995-01-26 00:46:29 +000011106works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11108$as_echo_n "checking for working volatile... " >&6; }
11109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011110/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011111
Martin v. Löwis11437992002-04-12 09:54:03 +000011112int
11113main ()
11114{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011115volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011116 ;
11117 return 0;
11118}
11119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011120if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011121 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011122else
Skip Montanaro6dead952003-09-25 14:50:04 +000011123
Matthias Kloseb9621712010-04-24 17:59:49 +000011124$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011125
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011126
Guido van Rossum627b2d71993-12-24 10:39:16 +000011127fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11130$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011131
Guido van Rossumda88dad1995-01-26 00:46:29 +000011132works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11134$as_echo_n "checking for working signed char... " >&6; }
11135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011136/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011137
Martin v. Löwis11437992002-04-12 09:54:03 +000011138int
11139main ()
11140{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011141signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011142 ;
11143 return 0;
11144}
11145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011146if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011147 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011148else
Skip Montanaro6dead952003-09-25 14:50:04 +000011149
Matthias Kloseb9621712010-04-24 17:59:49 +000011150$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011151
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011152
Guido van Rossum7f43da71994-08-01 12:15:30 +000011153fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11156$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011157
Guido van Rossumda88dad1995-01-26 00:46:29 +000011158have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11160$as_echo_n "checking for prototypes... " >&6; }
11161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011162/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011163int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011164int
11165main ()
11166{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011167return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011168 ;
11169 return 0;
11170}
11171_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011172if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011173
Matthias Kloseb9621712010-04-24 17:59:49 +000011174$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011175
Matthias Kloseb159a552010-04-25 21:00:44 +000011176 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011177fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11180$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011181
Guido van Rossumda88dad1995-01-26 00:46:29 +000011182works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11184$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011186/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011187
11188#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011189int foo(int x, ...) {
11190 va_list va;
11191 va_start(va, x);
11192 va_arg(va, int);
11193 va_arg(va, char *);
11194 va_arg(va, double);
11195 return 0;
11196}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011197
Martin v. Löwis11437992002-04-12 09:54:03 +000011198int
11199main ()
11200{
Guido van Rossum90eea071996-08-30 20:58:57 +000011201return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011202 ;
11203 return 0;
11204}
11205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011206if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011207
11208
Matthias Kloseb9621712010-04-24 17:59:49 +000011209$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011210
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011211 works=yes
11212
Guido van Rossum627b2d71993-12-24 10:39:16 +000011213fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11216$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011217
Martin v. Löwisd6320502004-08-12 13:45:08 +000011218# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11220$as_echo_n "checking for socketpair... " >&6; }
11221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011222/* end confdefs.h. */
11223
11224#include <sys/types.h>
11225#include <sys/socket.h>
11226
11227int
11228main ()
11229{
11230void *x=socketpair
11231 ;
11232 return 0;
11233}
11234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011235if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011236
Matthias Kloseb9621712010-04-24 17:59:49 +000011237$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011238
Matthias Kloseb159a552010-04-25 21:00:44 +000011239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011240$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011241else
Matthias Kloseb9621712010-04-24 17:59:49 +000011242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11243$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011244
11245fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011247
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011248# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11250$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011252/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011253#include <sys/types.h>
11254#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011255int
11256main ()
11257{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011258struct sockaddr x;
11259x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011260 ;
11261 return 0;
11262}
11263_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011264if ac_fn_c_try_compile "$LINENO"; then :
11265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11266$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011267
Matthias Kloseb9621712010-04-24 17:59:49 +000011268$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011269
11270else
Matthias Kloseb9621712010-04-24 17:59:49 +000011271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11272$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011273
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011274fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011276
Guido van Rossumda88dad1995-01-26 00:46:29 +000011277va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11279$as_echo_n "checking whether va_list is an array... " >&6; }
11280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011281/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011282
11283#ifdef HAVE_STDARG_PROTOTYPES
11284#include <stdarg.h>
11285#else
11286#include <varargs.h>
11287#endif
11288
Martin v. Löwis11437992002-04-12 09:54:03 +000011289int
11290main ()
11291{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011292va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011293 ;
11294 return 0;
11295}
11296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011297if ac_fn_c_try_compile "$LINENO"; then :
11298
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011299else
Skip Montanaro6dead952003-09-25 14:50:04 +000011300
Martin v. Löwis11437992002-04-12 09:54:03 +000011301
Matthias Kloseb9621712010-04-24 17:59:49 +000011302$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011303
Guido van Rossumda88dad1995-01-26 00:46:29 +000011304 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011305
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11309$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011310
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011311# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011312
11313
Matthias Kloseb9621712010-04-24 17:59:49 +000011314ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
11315if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011316
Matthias Kloseb9621712010-04-24 17:59:49 +000011317 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011318
Matthias Kloseb9621712010-04-24 17:59:49 +000011319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11320$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011321 OLD_CFLAGS=$CFLAGS
11322 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011324/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011325
11326# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011327
Martin v. Löwis11437992002-04-12 09:54:03 +000011328int
11329main ()
11330{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011331
11332 char *name;
11333 struct hostent *he, *res;
11334 char buffer[2048];
11335 int buflen = 2048;
11336 int h_errnop;
11337
11338 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011339
11340 ;
11341 return 0;
11342}
11343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011344if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011345
Matthias Kloseb9621712010-04-24 17:59:49 +000011346 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011347
Martin v. Löwis11437992002-04-12 09:54:03 +000011348
Matthias Kloseb9621712010-04-24 17:59:49 +000011349$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011350
Matthias Kloseb9621712010-04-24 17:59:49 +000011351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11352$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011353
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011354else
Skip Montanaro6dead952003-09-25 14:50:04 +000011355
Matthias Kloseb9621712010-04-24 17:59:49 +000011356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11357$as_echo "no" >&6; }
11358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11359$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011361/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011362
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011363# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011364
Martin v. Löwis11437992002-04-12 09:54:03 +000011365int
11366main ()
11367{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011368
11369 char *name;
11370 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011371 char buffer[2048];
11372 int buflen = 2048;
11373 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011374
Matthias Kloseb159a552010-04-25 21:00:44 +000011375 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011376
11377 ;
11378 return 0;
11379}
11380_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011381if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011382
Matthias Kloseb9621712010-04-24 17:59:49 +000011383 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011384
Martin v. Löwis11437992002-04-12 09:54:03 +000011385
Matthias Kloseb159a552010-04-25 21:00:44 +000011386$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011387
Matthias Kloseb9621712010-04-24 17:59:49 +000011388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11389$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011390
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011391else
Skip Montanaro6dead952003-09-25 14:50:04 +000011392
Matthias Kloseb9621712010-04-24 17:59:49 +000011393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11394$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11396$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11398/* end confdefs.h. */
11399
11400# include <netdb.h>
11401
11402int
11403main ()
11404{
11405
11406 char *name;
11407 struct hostent *he;
11408 struct hostent_data data;
11409
11410 (void) gethostbyname_r(name, he, &data);
11411
11412 ;
11413 return 0;
11414}
11415_ACEOF
11416if ac_fn_c_try_compile "$LINENO"; then :
11417
11418 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11419
11420
11421$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11422
11423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11424$as_echo "yes" >&6; }
11425
11426else
11427
11428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11429$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011430
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011431fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011433
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011434fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011436
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011437fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011439 CFLAGS=$OLD_CFLAGS
11440
11441else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011442
Matthias Kloseb9621712010-04-24 17:59:49 +000011443 for ac_func in gethostbyname
11444do :
11445 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
11446if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011447 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011448#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011449_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011450
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011451fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011452done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011453
Michael W. Hudson54241132001-12-07 15:38:26 +000011454
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011455fi
11456
Michael W. Hudson54241132001-12-07 15:38:26 +000011457
11458
11459
11460
11461
11462
Guido van Rossum627b2d71993-12-24 10:39:16 +000011463# checks for system services
11464# (none yet)
11465
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011466# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011467ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
11468if test "x$ac_cv_func___fpu_control" = x""yes; then :
11469
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011470else
Matthias Kloseb9621712010-04-24 17:59:49 +000011471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11472$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
11473if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
11474 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011475else
Martin v. Löwis11437992002-04-12 09:54:03 +000011476 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011477LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011479/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011480
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011481/* Override any GCC internal prototype to avoid an error.
11482 Use char because int might match the return type of a GCC
11483 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011484#ifdef __cplusplus
11485extern "C"
11486#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011487char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011488int
11489main ()
11490{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011491return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011492 ;
11493 return 0;
11494}
11495_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011496if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011497 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011498else
Matthias Kloseb9621712010-04-24 17:59:49 +000011499 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011500fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011501rm -f core conftest.err conftest.$ac_objext \
11502 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011503LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011504fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11506$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
11507if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011508 cat >>confdefs.h <<_ACEOF
11509#define HAVE_LIBIEEE 1
11510_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011511
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011512 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011513
Guido van Rossum627b2d71993-12-24 10:39:16 +000011514fi
11515
Michael W. Hudson54241132001-12-07 15:38:26 +000011516
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011517fi
11518
Michael W. Hudson54241132001-12-07 15:38:26 +000011519
Guido van Rossum7f253911997-05-09 02:42:48 +000011520# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11522$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011523
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011524# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011525if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011526 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011527if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011528then
11529
Matthias Kloseb9621712010-04-24 17:59:49 +000011530$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011531
Matthias Kloseb9621712010-04-24 17:59:49 +000011532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11533$as_echo "yes" >&6; }
11534else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11535$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011536fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011537else
Matthias Kloseb9621712010-04-24 17:59:49 +000011538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11539$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011540fi
11541
Guido van Rossum7f253911997-05-09 02:42:48 +000011542
Guido van Rossum7f43da71994-08-01 12:15:30 +000011543# check for --with-libm=...
11544
Guido van Rossum563e7081996-09-10 18:20:48 +000011545case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011546Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011547*) LIBM=-lm
11548esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11550$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011551
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011552# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011553if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011554 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011555if test "$withval" = no
11556then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11558$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011559elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011560then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11562$as_echo "set LIBM=\"$withval\"" >&6; }
Barry Warsaw278266f2010-10-14 17:38:46 +000011563else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011564fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011565else
Matthias Kloseb9621712010-04-24 17:59:49 +000011566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11567$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011568fi
11569
Guido van Rossum7f43da71994-08-01 12:15:30 +000011570
11571# check for --with-libc=...
11572
Matthias Kloseb9621712010-04-24 17:59:49 +000011573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11574$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011575
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011576# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011577if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011578 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011579if test "$withval" = no
11580then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11582$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011583elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011584then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11586$as_echo "set LIBC=\"$withval\"" >&6; }
Barry Warsaw278266f2010-10-14 17:38:46 +000011587else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011588fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011589else
Matthias Kloseb9621712010-04-24 17:59:49 +000011590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11591$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011592fi
11593
Guido van Rossum7f43da71994-08-01 12:15:30 +000011594
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011595# **************************************************
11596# * Check for various properties of floating point *
11597# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011598
Matthias Kloseb9621712010-04-24 17:59:49 +000011599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11600$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
11601if test "${ac_cv_little_endian_double+set}" = set; then :
11602 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011603else
11604
Matthias Kloseb9621712010-04-24 17:59:49 +000011605if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011606 ac_cv_little_endian_double=no
11607else
Matthias Kloseb9621712010-04-24 17:59:49 +000011608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011609/* end confdefs.h. */
11610
11611#include <string.h>
11612int main() {
11613 double x = 9006104071832581.0;
11614 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11615 return 0;
11616 else
11617 return 1;
11618}
11619
11620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011621if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011622 ac_cv_little_endian_double=yes
11623else
Matthias Kloseb9621712010-04-24 17:59:49 +000011624 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011625fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011626rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11627 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011628fi
11629
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011630fi
11631
Matthias Kloseb9621712010-04-24 17:59:49 +000011632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11633$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011634if test "$ac_cv_little_endian_double" = yes
11635then
11636
Matthias Kloseb9621712010-04-24 17:59:49 +000011637$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011638
11639fi
11640
Matthias Kloseb9621712010-04-24 17:59:49 +000011641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11642$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
11643if test "${ac_cv_big_endian_double+set}" = set; then :
11644 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011645else
11646
Matthias Kloseb9621712010-04-24 17:59:49 +000011647if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011648 ac_cv_big_endian_double=no
11649else
Matthias Kloseb9621712010-04-24 17:59:49 +000011650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011651/* end confdefs.h. */
11652
11653#include <string.h>
11654int main() {
11655 double x = 9006104071832581.0;
11656 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11657 return 0;
11658 else
11659 return 1;
11660}
11661
11662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011663if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011664 ac_cv_big_endian_double=yes
11665else
Matthias Kloseb9621712010-04-24 17:59:49 +000011666 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011667fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011668rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11669 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011670fi
11671
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011672fi
11673
Matthias Kloseb9621712010-04-24 17:59:49 +000011674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11675$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011676if test "$ac_cv_big_endian_double" = yes
11677then
11678
Matthias Kloseb9621712010-04-24 17:59:49 +000011679$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011680
11681fi
11682
11683# Some ARM platforms use a mixed-endian representation for doubles.
11684# While Python doesn't currently have full support for these platforms
11685# (see e.g., issue 1762561), we can at least make sure that float <-> string
11686# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11688$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
11689if test "${ac_cv_mixed_endian_double+set}" = set; then :
11690 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011691else
11692
Matthias Kloseb9621712010-04-24 17:59:49 +000011693if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011694 ac_cv_mixed_endian_double=no
11695else
Matthias Kloseb9621712010-04-24 17:59:49 +000011696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011697/* end confdefs.h. */
11698
11699#include <string.h>
11700int main() {
11701 double x = 9006104071832581.0;
11702 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11703 return 0;
11704 else
11705 return 1;
11706}
11707
11708_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011709if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011710 ac_cv_mixed_endian_double=yes
11711else
Matthias Kloseb9621712010-04-24 17:59:49 +000011712 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011713fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011714rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11715 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011716fi
11717
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011718fi
11719
Matthias Kloseb9621712010-04-24 17:59:49 +000011720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11721$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011722if test "$ac_cv_mixed_endian_double" = yes
11723then
11724
Matthias Kloseb9621712010-04-24 17:59:49 +000011725$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011726
11727fi
11728
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011729# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011730# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011731# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011732# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011733# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011734# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011735
11736# This inline assembler syntax may also work for suncc and icc,
11737# so we try it on all platforms.
11738
Matthias Kloseb9621712010-04-24 17:59:49 +000011739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11740$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011742/* end confdefs.h. */
11743
11744int
11745main ()
11746{
11747
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011748 unsigned short cw;
11749 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11750 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011751
11752 ;
11753 return 0;
11754}
11755_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011756if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011757 have_gcc_asm_for_x87=yes
11758else
Matthias Kloseb9621712010-04-24 17:59:49 +000011759 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011760fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11763$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011764if test "$have_gcc_asm_for_x87" = yes
11765then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011766
Matthias Kloseb9621712010-04-24 17:59:49 +000011767$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011768
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011769fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011770
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011771# Detect whether system arithmetic is subject to x87-style double
11772# rounding issues. The result of this test has little meaning on non
11773# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11774# mode is round-to-nearest and double rounding issues are present, and
11775# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11777$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011778# $BASECFLAGS may affect the result
11779ac_save_cc="$CC"
11780CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011781if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011782 ac_cv_x87_double_rounding=no
11783else
Matthias Kloseb9621712010-04-24 17:59:49 +000011784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011785/* end confdefs.h. */
11786
11787#include <stdlib.h>
11788#include <math.h>
11789int main() {
11790 volatile double x, y, z;
11791 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11792 x = 0.99999999999999989; /* 1-2**-53 */
11793 y = 1./x;
11794 if (y != 1.)
11795 exit(0);
11796 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11797 x = 1e16;
11798 y = 2.99999;
11799 z = x + y;
11800 if (z != 1e16+4.)
11801 exit(0);
11802 /* both tests show evidence of double rounding */
11803 exit(1);
11804}
11805
11806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011807if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011808 ac_cv_x87_double_rounding=no
11809else
Matthias Kloseb9621712010-04-24 17:59:49 +000011810 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011811fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011812rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11813 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011814fi
11815
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011816CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11818$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011819if test "$ac_cv_x87_double_rounding" = yes
11820then
11821
Matthias Kloseb9621712010-04-24 17:59:49 +000011822$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011823
11824fi
11825
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011826# ************************************
11827# * Check for mathematical functions *
11828# ************************************
11829
11830LIBS_SAVE=$LIBS
11831LIBS="$LIBS $LIBM"
11832
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011833# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11834# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11836$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
11837if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
11838 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011839else
11840
Matthias Kloseb9621712010-04-24 17:59:49 +000011841if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011842 ac_cv_tanh_preserves_zero_sign=no
11843else
Matthias Kloseb9621712010-04-24 17:59:49 +000011844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011845/* end confdefs.h. */
11846
11847#include <math.h>
11848#include <stdlib.h>
11849int main() {
11850 /* return 0 if either negative zeros don't exist
11851 on this platform or if negative zeros exist
11852 and tanh(-0.) == -0. */
11853 if (atan2(0., -1.) == atan2(-0., -1.) ||
11854 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11855 else exit(1);
11856}
11857
11858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011859if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011860 ac_cv_tanh_preserves_zero_sign=yes
11861else
Matthias Kloseb9621712010-04-24 17:59:49 +000011862 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011863fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011864rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11865 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011866fi
11867
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011868fi
11869
Matthias Kloseb9621712010-04-24 17:59:49 +000011870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11871$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011872if test "$ac_cv_tanh_preserves_zero_sign" = yes
11873then
11874
Matthias Kloseb9621712010-04-24 17:59:49 +000011875$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011876
11877fi
11878
Mark Dickinson9c113362009-09-05 10:36:23 +000011879for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011880do :
11881 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11882ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Barry Warsaw278266f2010-10-14 17:38:46 +000011883if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson9c113362009-09-05 10:36:23 +000011884 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011885#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000011886_ACEOF
11887
11888fi
11889done
11890
Mark Dickinson9c113362009-09-05 10:36:23 +000011891for ac_func in hypot lgamma log1p round tgamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011892do :
11893 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11894ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Barry Warsaw278266f2010-10-14 17:38:46 +000011895if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes99170a52007-12-19 02:07:34 +000011896 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011897#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000011898_ACEOF
11899
11900fi
11901done
11902
Matthias Kloseb9621712010-04-24 17:59:49 +000011903ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11904"
11905if test "x$ac_cv_have_decl_isinf" = x""yes; then :
11906 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011907else
Matthias Kloseb9621712010-04-24 17:59:49 +000011908 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011909fi
11910
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011911cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011912#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011913_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011914ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11915"
11916if test "x$ac_cv_have_decl_isnan" = x""yes; then :
11917 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011918else
Matthias Kloseb9621712010-04-24 17:59:49 +000011919 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011920fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011921
11922cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011923#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011924_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011925ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11926"
11927if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
11928 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011929else
Matthias Kloseb9621712010-04-24 17:59:49 +000011930 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011931fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011932
11933cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011934#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011935_ACEOF
11936
11937
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011938LIBS=$LIBS_SAVE
11939
Mark Dickinsona614f042009-11-28 12:48:43 +000011940# For multiprocessing module, check that sem_open
11941# actually works. For FreeBSD versions <= 7.2,
11942# the kernel module that provides POSIX semaphores
11943# isn't loaded by default, so an attempt to call
11944# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000011945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
11946$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
11947if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
11948 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000011949else
Matthias Kloseb9621712010-04-24 17:59:49 +000011950 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011951 ac_cv_posix_semaphores_enabled=yes
11952else
Matthias Kloseb9621712010-04-24 17:59:49 +000011953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011954/* end confdefs.h. */
11955
11956#include <unistd.h>
11957#include <fcntl.h>
11958#include <stdio.h>
11959#include <semaphore.h>
11960#include <sys/stat.h>
11961
11962int main(void) {
11963 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
11964 if (a == SEM_FAILED) {
11965 perror("sem_open");
11966 return 1;
11967 }
11968 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011969 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000011970 return 0;
11971}
11972
11973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011974if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011975 ac_cv_posix_semaphores_enabled=yes
11976else
Matthias Kloseb9621712010-04-24 17:59:49 +000011977 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000011978fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011979rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11980 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011981fi
11982
11983
Mark Dickinsona614f042009-11-28 12:48:43 +000011984fi
11985
Matthias Kloseb9621712010-04-24 17:59:49 +000011986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
11987$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000011988if test $ac_cv_posix_semaphores_enabled = no
11989then
11990
Matthias Kloseb9621712010-04-24 17:59:49 +000011991$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000011992
11993fi
11994
Mark Dickinson10683072009-04-18 21:18:19 +000011995# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000011996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
11997$as_echo_n "checking for broken sem_getvalue... " >&6; }
11998if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
11999 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012000else
Matthias Kloseb9621712010-04-24 17:59:49 +000012001 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012002 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012003else
Matthias Kloseb9621712010-04-24 17:59:49 +000012004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012005/* end confdefs.h. */
12006
12007#include <unistd.h>
12008#include <fcntl.h>
12009#include <stdio.h>
12010#include <semaphore.h>
12011#include <sys/stat.h>
12012
12013int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012014 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012015 int count;
12016 int res;
12017 if(a==SEM_FAILED){
12018 perror("sem_open");
12019 return 1;
12020
12021 }
12022 res = sem_getvalue(a, &count);
12023 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012024 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012025 return res==-1 ? 1 : 0;
12026}
12027
Mark Dickinson10683072009-04-18 21:18:19 +000012028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012029if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012030 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012031else
Matthias Kloseb9621712010-04-24 17:59:49 +000012032 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012033fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012034rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12035 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012036fi
12037
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012038
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012039fi
12040
Matthias Kloseb9621712010-04-24 17:59:49 +000012041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12042$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012043if test $ac_cv_broken_sem_getvalue = yes
12044then
12045
Matthias Kloseb9621712010-04-24 17:59:49 +000012046$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012047
12048fi
12049
Mark Dickinsonbd792642009-03-18 20:06:12 +000012050# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12052$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012053# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012054if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012055 enableval=$enable_big_digits; case $enable_big_digits in
12056yes)
12057 enable_big_digits=30 ;;
12058no)
12059 enable_big_digits=15 ;;
1206015|30)
12061 ;;
12062*)
Barry Warsaw278266f2010-10-14 17:38:46 +000012063 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 +000012064esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12066$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012067
12068cat >>confdefs.h <<_ACEOF
12069#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12070_ACEOF
12071
12072
12073else
Matthias Kloseb9621712010-04-24 17:59:49 +000012074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12075$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012076fi
12077
12078
Guido van Rossumef2255b2000-03-10 22:30:29 +000012079# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012080ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
12081if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012082
12083
Matthias Kloseb9621712010-04-24 17:59:49 +000012084$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012085
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012086 wchar_h="yes"
12087
Guido van Rossumef2255b2000-03-10 22:30:29 +000012088else
Martin v. Löwis11437992002-04-12 09:54:03 +000012089 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012090
12091fi
12092
Michael W. Hudson54241132001-12-07 15:38:26 +000012093
Martin v. Löwis11437992002-04-12 09:54:03 +000012094
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012095# determine wchar_t size
12096if test "$wchar_h" = yes
12097then
Matthias Kloseb9621712010-04-24 17:59:49 +000012098 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012099# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12100# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12101# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12103$as_echo_n "checking size of wchar_t... " >&6; }
12104if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
12105 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012106else
Matthias Kloseb9621712010-04-24 17:59:49 +000012107 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12108"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012109
Martin v. Löwis11437992002-04-12 09:54:03 +000012110else
Matthias Kloseb9621712010-04-24 17:59:49 +000012111 if test "$ac_cv_type_wchar_t" = yes; then
12112 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12113$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw278266f2010-10-14 17:38:46 +000012114as_fn_error 77 "cannot compute sizeof (wchar_t)
12115See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012116 else
12117 ac_cv_sizeof_wchar_t=0
12118 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012119fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012120
Martin v. Löwis11437992002-04-12 09:54:03 +000012121fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12123$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012124
12125
12126
Martin v. Löwis11437992002-04-12 09:54:03 +000012127cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012128#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012129_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012130
Michael W. Hudson54241132001-12-07 15:38:26 +000012131
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012132fi
12133
Matthias Kloseb9621712010-04-24 17:59:49 +000012134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12135$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012136have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012138/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012139
12140#include <tcl.h>
12141#if TCL_UTF_MAX != 6
12142# error "NOT UCS4_TCL"
12143#endif
12144int
12145main ()
12146{
12147
12148 ;
12149 return 0;
12150}
12151_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012152if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012153
12154
Matthias Kloseb9621712010-04-24 17:59:49 +000012155$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012156
12157 have_ucs4_tcl=yes
12158
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012159fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12162$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012163
Skip Montanaro6dead952003-09-25 14:50:04 +000012164# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012165if test "$wchar_h" = yes
12166then
12167 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12169$as_echo_n "checking whether wchar_t is signed... " >&6; }
12170 if test "${ac_cv_wchar_t_signed+set}" = set; then :
12171 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012172else
12173
Matthias Kloseb9621712010-04-24 17:59:49 +000012174 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012175 ac_cv_wchar_t_signed=yes
12176else
Matthias Kloseb9621712010-04-24 17:59:49 +000012177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012178/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012179
12180 #include <wchar.h>
12181 int main()
12182 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012183 /* Success: exit code 0 */
12184 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012185 }
12186
12187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012188if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012189 ac_cv_wchar_t_signed=yes
12190else
Matthias Kloseb9621712010-04-24 17:59:49 +000012191 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012192fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012193rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12194 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012195fi
12196
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012197fi
12198
Matthias Kloseb9621712010-04-24 17:59:49 +000012199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12200$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012201fi
12202
Matthias Kloseb9621712010-04-24 17:59:49 +000012203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12204$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012205
12206# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012207if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012208 withval=$with_wide_unicode;
12209if test "$withval" != no
12210then unicode_size="4"
12211else unicode_size="2"
12212fi
12213
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012214else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012215
Georg Brandl52d168a2008-01-07 18:10:24 +000012216case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012217 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012218 *) unicode_size="2" ;;
12219esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012220
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012221fi
12222
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012223
12224
Georg Brandl52d168a2008-01-07 18:10:24 +000012225case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012226 4)
12227 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12228
12229 SOABI_QUALIFIERS="${SOABI_QUALIFIERS}u"
12230 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012231 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012232 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012233esac
12234
Michael W. Hudson54241132001-12-07 15:38:26 +000012235
Martin v. Löwis11437992002-04-12 09:54:03 +000012236
Georg Brandl52d168a2008-01-07 18:10:24 +000012237# wchar_t is only usable if it maps to an unsigned type
12238if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012239 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012240then
12241 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012242
Matthias Kloseb9621712010-04-24 17:59:49 +000012243$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012244
Matthias Kloseb9621712010-04-24 17:59:49 +000012245 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012246
Georg Brandl52d168a2008-01-07 18:10:24 +000012247elif test "$ac_cv_sizeof_short" = "$unicode_size"
12248then
12249 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012250 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012251
Georg Brandl52d168a2008-01-07 18:10:24 +000012252elif test "$ac_cv_sizeof_long" = "$unicode_size"
12253then
12254 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012255 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012256
Georg Brandl52d168a2008-01-07 18:10:24 +000012257else
12258 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012259fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12261$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012262
12263# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12265$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12266if test "${ac_cv_c_bigendian+set}" = set; then :
12267 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012268else
Matthias Kloseb9621712010-04-24 17:59:49 +000012269 ac_cv_c_bigendian=unknown
12270 # See if we're dealing with a universal compiler.
12271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12272/* end confdefs.h. */
12273#ifndef __APPLE_CC__
12274 not a universal capable compiler
12275 #endif
12276 typedef int dummy;
12277
Skip Montanaro6dead952003-09-25 14:50:04 +000012278_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012279if ac_fn_c_try_compile "$LINENO"; then :
12280
12281 # Check for potential -arch flags. It is not universal unless
12282 # there are at least two -arch flags with different values.
12283 ac_arch=
12284 ac_prev=
12285 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12286 if test -n "$ac_prev"; then
12287 case $ac_word in
12288 i?86 | x86_64 | ppc | ppc64)
12289 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12290 ac_arch=$ac_word
12291 else
12292 ac_cv_c_bigendian=universal
12293 break
12294 fi
12295 ;;
12296 esac
12297 ac_prev=
12298 elif test "x$ac_word" = "x-arch"; then
12299 ac_prev=arch
12300 fi
12301 done
12302fi
12303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12304 if test $ac_cv_c_bigendian = unknown; then
12305 # See if sys/param.h defines the BYTE_ORDER macro.
12306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012307/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012308#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012309 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012310
Martin v. Löwis11437992002-04-12 09:54:03 +000012311int
12312main ()
12313{
Matthias Kloseb9621712010-04-24 17:59:49 +000012314#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12315 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12316 && LITTLE_ENDIAN)
12317 bogus endian macros
12318 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012319
12320 ;
12321 return 0;
12322}
12323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012324if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012325 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012327/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012328#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012329 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012330
Martin v. Löwis11437992002-04-12 09:54:03 +000012331int
12332main ()
12333{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012334#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012335 not big endian
12336 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012337
12338 ;
12339 return 0;
12340}
12341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012342if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012343 ac_cv_c_bigendian=yes
12344else
Matthias Kloseb9621712010-04-24 17:59:49 +000012345 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012346fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012348fi
12349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12350 fi
12351 if test $ac_cv_c_bigendian = unknown; then
12352 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012354/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012355#include <limits.h>
12356
Martin v. Löwis11437992002-04-12 09:54:03 +000012357int
12358main ()
12359{
Matthias Kloseb9621712010-04-24 17:59:49 +000012360#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12361 bogus endian macros
12362 #endif
12363
Martin v. Löwis11437992002-04-12 09:54:03 +000012364 ;
12365 return 0;
12366}
12367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012368if ac_fn_c_try_compile "$LINENO"; then :
12369 # It does; now see whether it defined to _BIG_ENDIAN or not.
12370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12371/* end confdefs.h. */
12372#include <limits.h>
12373
12374int
12375main ()
12376{
12377#ifndef _BIG_ENDIAN
12378 not big endian
12379 #endif
12380
12381 ;
12382 return 0;
12383}
12384_ACEOF
12385if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012386 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012387else
Matthias Kloseb9621712010-04-24 17:59:49 +000012388 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012389fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12391fi
12392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12393 fi
12394 if test $ac_cv_c_bigendian = unknown; then
12395 # Compile a test program.
12396 if test "$cross_compiling" = yes; then :
12397 # Try to guess by grepping values from an object file.
12398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12399/* end confdefs.h. */
12400short int ascii_mm[] =
12401 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12402 short int ascii_ii[] =
12403 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12404 int use_ascii (int i) {
12405 return ascii_mm[i] + ascii_ii[i];
12406 }
12407 short int ebcdic_ii[] =
12408 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12409 short int ebcdic_mm[] =
12410 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12411 int use_ebcdic (int i) {
12412 return ebcdic_mm[i] + ebcdic_ii[i];
12413 }
12414 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012415
Matthias Kloseb9621712010-04-24 17:59:49 +000012416int
12417main ()
12418{
12419return use_ascii (foo) == use_ebcdic (foo);
12420 ;
12421 return 0;
12422}
12423_ACEOF
12424if ac_fn_c_try_compile "$LINENO"; then :
12425 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12426 ac_cv_c_bigendian=yes
12427 fi
12428 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12429 if test "$ac_cv_c_bigendian" = unknown; then
12430 ac_cv_c_bigendian=no
12431 else
12432 # finding both strings is unlikely to happen, but who knows?
12433 ac_cv_c_bigendian=unknown
12434 fi
12435 fi
12436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012438else
Matthias Kloseb9621712010-04-24 17:59:49 +000012439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012440/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012441$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012442int
12443main ()
12444{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012445
Matthias Kloseb9621712010-04-24 17:59:49 +000012446 /* Are we little or big endian? From Harbison&Steele. */
12447 union
12448 {
12449 long int l;
12450 char c[sizeof (long int)];
12451 } u;
12452 u.l = 1;
12453 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012454
12455 ;
12456 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012457}
Martin v. Löwis11437992002-04-12 09:54:03 +000012458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012459if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012460 ac_cv_c_bigendian=no
12461else
Matthias Kloseb9621712010-04-24 17:59:49 +000012462 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012463fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012464rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12465 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012466fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012467
Matthias Kloseb9621712010-04-24 17:59:49 +000012468 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012469fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12471$as_echo "$ac_cv_c_bigendian" >&6; }
12472 case $ac_cv_c_bigendian in #(
12473 yes)
12474 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12475;; #(
12476 no)
12477 ;; #(
12478 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012479
Matthias Kloseb9621712010-04-24 17:59:49 +000012480$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012481
Matthias Kloseb9621712010-04-24 17:59:49 +000012482 ;; #(
12483 *)
Barry Warsaw278266f2010-10-14 17:38:46 +000012484 as_fn_error $? "unknown endianness
12485 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012486 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012487
Michael W. Hudson54241132001-12-07 15:38:26 +000012488
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012489# ABI version string for Python extension modules. This appears between the
12490# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12491# from the following attributes which affect the ABI of this Python build (in
12492# this order):
12493#
12494# * The Python implementation (always 'cpython-' for us)
12495# * The major and minor version numbers
12496# * --with-pydebug (adds a 'd')
12497# * --with-pymalloc (adds a 'm')
12498# * --with-wide-unicode (adds a 'u')
12499#
12500# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012501# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12502# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012503
12504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12505$as_echo_n "checking SOABI... " >&6; }
12506SOABI='cpython-'`echo $VERSION | tr -d .`${SOABI_QUALIFIERS}
12507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12508$as_echo "$SOABI" >&6; }
12509
12510# SO is the extension of shared libraries `(including the dot!)
12511# -- usually .so, .sl on HP-UX, .dll on Cygwin
12512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12513$as_echo_n "checking SO... " >&6; }
12514if test -z "$SO"
12515then
12516 case $ac_sys_system in
12517 hp*|HP*)
12518 case `uname -m` in
12519 ia64) SO=.so;;
12520 *) SO=.sl;;
12521 esac
12522 ;;
12523 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012524 Linux*|GNU*)
12525 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012526 *) SO=.so;;
12527 esac
12528else
12529 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012530 echo
12531 echo '====================================================================='
12532 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012533 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012534 echo '+ Do you really mean to change the extension for shared libraries? +'
12535 echo '+ Continuing in 10 seconds to let you to ponder. +'
12536 echo '+ +'
12537 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012538 sleep 10
12539fi
12540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12541$as_echo "$SO" >&6; }
12542
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012543# Check whether right shifting a negative integer extends the sign bit
12544# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12546$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
12547if test "${ac_cv_rshift_extends_sign+set}" = set; then :
12548 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012549else
Martin v. Löwis11437992002-04-12 09:54:03 +000012550
Matthias Kloseb9621712010-04-24 17:59:49 +000012551if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012552 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012553else
Matthias Kloseb9621712010-04-24 17:59:49 +000012554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012555/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012556
12557int main()
12558{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012559 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012560}
12561
Martin v. Löwis11437992002-04-12 09:54:03 +000012562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012563if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012564 ac_cv_rshift_extends_sign=yes
12565else
Matthias Kloseb9621712010-04-24 17:59:49 +000012566 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012567fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012568rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12569 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012570fi
12571
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012572fi
12573
Matthias Kloseb9621712010-04-24 17:59:49 +000012574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12575$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012576if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012577then
Martin v. Löwis11437992002-04-12 09:54:03 +000012578
Matthias Kloseb9621712010-04-24 17:59:49 +000012579$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012580
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012581fi
12582
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012583# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12585$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
12586if test "${ac_cv_have_getc_unlocked+set}" = set; then :
12587 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012588else
Martin v. Löwis11437992002-04-12 09:54:03 +000012589
Matthias Kloseb9621712010-04-24 17:59:49 +000012590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012591/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012592#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012593int
12594main ()
12595{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012596
12597 FILE *f = fopen("/dev/null", "r");
12598 flockfile(f);
12599 getc_unlocked(f);
12600 funlockfile(f);
12601
Martin v. Löwis11437992002-04-12 09:54:03 +000012602 ;
12603 return 0;
12604}
12605_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012606if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012607 ac_cv_have_getc_unlocked=yes
12608else
Matthias Kloseb9621712010-04-24 17:59:49 +000012609 ac_cv_have_getc_unlocked=no
12610fi
12611rm -f core conftest.err conftest.$ac_objext \
12612 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012613fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012614
Matthias Kloseb9621712010-04-24 17:59:49 +000012615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12616$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012617if test "$ac_cv_have_getc_unlocked" = yes
12618then
Martin v. Löwis11437992002-04-12 09:54:03 +000012619
Matthias Kloseb9621712010-04-24 17:59:49 +000012620$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012621
12622fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012623
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012624# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012625# save the value of LIBS so we don't actually link Python with readline
12626LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012627
Gregory P. Smith18820942008-09-07 06:24:49 +000012628# On some systems we need to link readline to a termcap compatible
12629# library. NOTE: Keep the precedence of listed libraries synchronised
12630# with setup.py.
12631py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12633$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012634for py_libtermcap in "" ncursesw ncurses curses termcap; do
12635 if test -z "$py_libtermcap"; then
12636 READLINE_LIBS="-lreadline"
12637 else
12638 READLINE_LIBS="-lreadline -l$py_libtermcap"
12639 fi
12640 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012642/* end confdefs.h. */
12643
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012644/* Override any GCC internal prototype to avoid an error.
12645 Use char because int might match the return type of a GCC
12646 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012647#ifdef __cplusplus
12648extern "C"
12649#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012650char readline ();
12651int
12652main ()
12653{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012654return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012655 ;
12656 return 0;
12657}
12658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012659if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012660 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012661fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012662rm -f core conftest.err conftest.$ac_objext \
12663 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012664 if test $py_cv_lib_readline = yes; then
12665 break
12666 fi
12667done
12668# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12669#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012670if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12672$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012673else
Matthias Kloseb9621712010-04-24 17:59:49 +000012674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12675$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012676
Matthias Kloseb9621712010-04-24 17:59:49 +000012677$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012678
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012679fi
12680
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012681# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12683$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
12684if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
12685 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012686else
12687 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012688LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012689cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012690/* end confdefs.h. */
12691
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012692/* Override any GCC internal prototype to avoid an error.
12693 Use char because int might match the return type of a GCC
12694 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012695#ifdef __cplusplus
12696extern "C"
12697#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012698char rl_callback_handler_install ();
12699int
12700main ()
12701{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012702return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012703 ;
12704 return 0;
12705}
12706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012707if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012708 ac_cv_lib_readline_rl_callback_handler_install=yes
12709else
Matthias Kloseb9621712010-04-24 17:59:49 +000012710 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012711fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012712rm -f core conftest.err conftest.$ac_objext \
12713 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012714LIBS=$ac_check_lib_save_LIBS
12715fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12717$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
12718if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012719
Matthias Kloseb9621712010-04-24 17:59:49 +000012720$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012721
12722fi
12723
12724
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012725# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012727/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012728#include <readline/readline.h>
12729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012730if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012731 have_readline=yes
12732else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012733 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012734
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012735fi
Barry Warsaw278266f2010-10-14 17:38:46 +000012736rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012737if test $have_readline = yes
12738then
Matthias Kloseb9621712010-04-24 17:59:49 +000012739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012740/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012741#include <readline/readline.h>
12742
12743_ACEOF
12744if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012745 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012746
Matthias Kloseb9621712010-04-24 17:59:49 +000012747$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012748
12749fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012750rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012751
Matthias Kloseb9621712010-04-24 17:59:49 +000012752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012753/* end confdefs.h. */
12754#include <readline/readline.h>
12755
12756_ACEOF
12757if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012758 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012759
Matthias Kloseb9621712010-04-24 17:59:49 +000012760$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012761
12762fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012763rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012764
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012765fi
12766
Martin v. Löwis0daad592001-09-30 21:09:59 +000012767# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12769$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
12770if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
12771 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012772else
Martin v. Löwis11437992002-04-12 09:54:03 +000012773 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012774LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012776/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012777
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012778/* Override any GCC internal prototype to avoid an error.
12779 Use char because int might match the return type of a GCC
12780 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012781#ifdef __cplusplus
12782extern "C"
12783#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012784char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012785int
12786main ()
12787{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012788return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012789 ;
12790 return 0;
12791}
12792_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012793if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012794 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012795else
Matthias Kloseb9621712010-04-24 17:59:49 +000012796 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012797fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012798rm -f core conftest.err conftest.$ac_objext \
12799 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012800LIBS=$ac_check_lib_save_LIBS
12801fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12803$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
12804if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012805
Matthias Kloseb9621712010-04-24 17:59:49 +000012806$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012807
Martin v. Löwis0daad592001-09-30 21:09:59 +000012808fi
12809
Michael W. Hudson54241132001-12-07 15:38:26 +000012810
Thomas Wouters89d996e2007-09-08 17:39:28 +000012811# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12813$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
12814if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
12815 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012816else
12817 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012818LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012820/* end confdefs.h. */
12821
12822/* Override any GCC internal prototype to avoid an error.
12823 Use char because int might match the return type of a GCC
12824 builtin and then its argument prototype would still apply. */
12825#ifdef __cplusplus
12826extern "C"
12827#endif
12828char rl_completion_display_matches_hook ();
12829int
12830main ()
12831{
12832return rl_completion_display_matches_hook ();
12833 ;
12834 return 0;
12835}
12836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012837if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012838 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12839else
Matthias Kloseb9621712010-04-24 17:59:49 +000012840 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012841fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012842rm -f core conftest.err conftest.$ac_objext \
12843 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012844LIBS=$ac_check_lib_save_LIBS
12845fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12847$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
12848if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012849
Matthias Kloseb9621712010-04-24 17:59:49 +000012850$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012851
12852fi
12853
12854
Martin v. Löwis0daad592001-09-30 21:09:59 +000012855# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12857$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
12858if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
12859 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012860else
Martin v. Löwis11437992002-04-12 09:54:03 +000012861 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012862LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012864/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012865
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012866/* Override any GCC internal prototype to avoid an error.
12867 Use char because int might match the return type of a GCC
12868 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012869#ifdef __cplusplus
12870extern "C"
12871#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012872char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012873int
12874main ()
12875{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012876return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012877 ;
12878 return 0;
12879}
12880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012881if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012882 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012883else
Matthias Kloseb9621712010-04-24 17:59:49 +000012884 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012885fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012886rm -f core conftest.err conftest.$ac_objext \
12887 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012888LIBS=$ac_check_lib_save_LIBS
12889fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12891$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
12892if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012893
Matthias Kloseb9621712010-04-24 17:59:49 +000012894$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012895
Guido van Rossum353ae582001-07-10 16:45:32 +000012896fi
12897
Jack Jansendd19cf82001-12-06 22:36:17 +000012898
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012899# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012901/* end confdefs.h. */
12902#include <readline/readline.h>
12903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012904if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012905 have_readline=yes
12906else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012907 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012908
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012909fi
Barry Warsaw278266f2010-10-14 17:38:46 +000012910rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012911if test $have_readline = yes
12912then
Matthias Kloseb9621712010-04-24 17:59:49 +000012913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012914/* end confdefs.h. */
12915#include <readline/readline.h>
12916
12917_ACEOF
12918if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012919 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012920
Matthias Kloseb9621712010-04-24 17:59:49 +000012921$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012922
12923fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012924rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012925
12926fi
12927
Martin v. Löwis82bca632006-02-10 20:49:30 +000012928# End of readline checks: restore LIBS
12929LIBS=$LIBS_no_readline
12930
Matthias Kloseb9621712010-04-24 17:59:49 +000012931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
12932$as_echo_n "checking for broken nice()... " >&6; }
12933if test "${ac_cv_broken_nice+set}" = set; then :
12934 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012935else
Martin v. Löwis11437992002-04-12 09:54:03 +000012936
Matthias Kloseb9621712010-04-24 17:59:49 +000012937if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012938 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012939else
Matthias Kloseb9621712010-04-24 17:59:49 +000012940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012941/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012942
12943int main()
12944{
12945 int val1 = nice(1);
12946 if (val1 != -1 && val1 == nice(2))
12947 exit(0);
12948 exit(1);
12949}
12950
Martin v. Löwis11437992002-04-12 09:54:03 +000012951_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012952if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012953 ac_cv_broken_nice=yes
12954else
Matthias Kloseb9621712010-04-24 17:59:49 +000012955 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012956fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012957rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12958 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012959fi
12960
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012961fi
12962
Matthias Kloseb9621712010-04-24 17:59:49 +000012963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
12964$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012965if test "$ac_cv_broken_nice" = yes
12966then
Martin v. Löwis11437992002-04-12 09:54:03 +000012967
Matthias Kloseb9621712010-04-24 17:59:49 +000012968$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012969
12970fi
12971
Matthias Kloseb9621712010-04-24 17:59:49 +000012972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
12973$as_echo_n "checking for broken poll()... " >&6; }
12974if test "${ac_cv_broken_poll+set}" = set; then :
12975 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012976else
Matthias Kloseb9621712010-04-24 17:59:49 +000012977 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012978 ac_cv_broken_poll=no
12979else
Matthias Kloseb9621712010-04-24 17:59:49 +000012980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012981/* end confdefs.h. */
12982
12983#include <poll.h>
12984
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012985int main()
12986{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012987 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012988 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012989
12990 close (42);
12991
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012992 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012993 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012994 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012995 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012996 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012997 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012998 return 1;
12999}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013000
13001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013002if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013003 ac_cv_broken_poll=yes
13004else
Matthias Kloseb9621712010-04-24 17:59:49 +000013005 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013006fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013007rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13008 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013010
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013011fi
13012
Matthias Kloseb9621712010-04-24 17:59:49 +000013013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13014$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013015if test "$ac_cv_broken_poll" = yes
13016then
13017
Matthias Kloseb9621712010-04-24 17:59:49 +000013018$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013019
13020fi
13021
Brett Cannon43802422005-02-10 20:48:03 +000013022# 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 +000013023# (which is not required by ISO C or UNIX spec) and/or if we support
13024# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013025ac_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 +000013026#include <$ac_cv_struct_tm>
13027
Matthias Kloseb9621712010-04-24 17:59:49 +000013028"
13029if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013030
13031cat >>confdefs.h <<_ACEOF
13032#define HAVE_STRUCT_TM_TM_ZONE 1
13033_ACEOF
13034
13035
13036fi
13037
13038if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13039
Matthias Kloseb9621712010-04-24 17:59:49 +000013040$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013041
13042else
Matthias Kloseb9621712010-04-24 17:59:49 +000013043 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13044"
13045if test "x$ac_cv_have_decl_tzname" = x""yes; then :
13046 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013047else
Matthias Kloseb9621712010-04-24 17:59:49 +000013048 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013049fi
13050
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013051cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013052#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013053_ACEOF
13054
Matthias Kloseb9621712010-04-24 17:59:49 +000013055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13056$as_echo_n "checking for tzname... " >&6; }
13057if test "${ac_cv_var_tzname+set}" = set; then :
13058 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013059else
Matthias Kloseb9621712010-04-24 17:59:49 +000013060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013061/* end confdefs.h. */
13062#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013063#if !HAVE_DECL_TZNAME
13064extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013065#endif
13066
13067int
13068main ()
13069{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013070return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013071 ;
13072 return 0;
13073}
13074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013075if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013076 ac_cv_var_tzname=yes
13077else
Matthias Kloseb9621712010-04-24 17:59:49 +000013078 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013079fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013080rm -f core conftest.err conftest.$ac_objext \
13081 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013082fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13084$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013085 if test $ac_cv_var_tzname = yes; then
13086
Matthias Kloseb9621712010-04-24 17:59:49 +000013087$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013088
13089 fi
13090fi
13091
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013092
Martin v. Löwis1d459062005-03-14 21:23:33 +000013093# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13095$as_echo_n "checking for working tzset()... " >&6; }
13096if test "${ac_cv_working_tzset+set}" = set; then :
13097 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013098else
13099
Matthias Kloseb9621712010-04-24 17:59:49 +000013100if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013101 ac_cv_working_tzset=no
13102else
Matthias Kloseb9621712010-04-24 17:59:49 +000013103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013104/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013105
13106#include <stdlib.h>
13107#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013108#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013109
13110#if HAVE_TZNAME
13111extern char *tzname[];
13112#endif
13113
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013114int main()
13115{
Brett Cannon18367812003-09-19 00:59:16 +000013116 /* Note that we need to ensure that not only does tzset(3)
13117 do 'something' with localtime, but it works as documented
13118 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013119 This includes making sure that tzname is set properly if
13120 tm->tm_zone does not exist since it is the alternative way
13121 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013122
13123 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013124 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013125 */
13126
Martin v. Löwis1d459062005-03-14 21:23:33 +000013127 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013128 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13129
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013130 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013131 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013132 if (localtime(&groundhogday)->tm_hour != 0)
13133 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013134#if HAVE_TZNAME
13135 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13136 if (strcmp(tzname[0], "UTC") ||
13137 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13138 exit(1);
13139#endif
Brett Cannon18367812003-09-19 00:59:16 +000013140
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013141 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013142 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013143 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013144 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013145#if HAVE_TZNAME
13146 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13147 exit(1);
13148#endif
Brett Cannon18367812003-09-19 00:59:16 +000013149
13150 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13151 tzset();
13152 if (localtime(&groundhogday)->tm_hour != 11)
13153 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013154#if HAVE_TZNAME
13155 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13156 exit(1);
13157#endif
13158
13159#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013160 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13161 exit(1);
13162 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13163 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013164#endif
Brett Cannon18367812003-09-19 00:59:16 +000013165
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013166 exit(0);
13167}
13168
13169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013170if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013171 ac_cv_working_tzset=yes
13172else
Matthias Kloseb9621712010-04-24 17:59:49 +000013173 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013174fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013175rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13176 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013177fi
13178
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013179fi
13180
Matthias Kloseb9621712010-04-24 17:59:49 +000013181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13182$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013183if test "$ac_cv_working_tzset" = yes
13184then
13185
Matthias Kloseb9621712010-04-24 17:59:49 +000013186$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013187
13188fi
13189
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013190# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13192$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
13193if test "${ac_cv_stat_tv_nsec+set}" = set; then :
13194 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013195else
Matthias Kloseb9621712010-04-24 17:59:49 +000013196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013197/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013198#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013199int
13200main ()
13201{
13202
13203struct stat st;
13204st.st_mtim.tv_nsec = 1;
13205
13206 ;
13207 return 0;
13208}
13209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013210if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013211 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013212else
Matthias Kloseb9621712010-04-24 17:59:49 +000013213 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13216fi
13217
Matthias Kloseb9621712010-04-24 17:59:49 +000013218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13219$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013220if test "$ac_cv_stat_tv_nsec" = yes
13221then
13222
Matthias Kloseb9621712010-04-24 17:59:49 +000013223$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013224
13225fi
13226
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013227# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13229$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
13230if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
13231 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013232else
Matthias Kloseb9621712010-04-24 17:59:49 +000013233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013234/* end confdefs.h. */
13235#include <sys/stat.h>
13236int
13237main ()
13238{
13239
13240struct stat st;
13241st.st_mtimespec.tv_nsec = 1;
13242
13243 ;
13244 return 0;
13245}
13246_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013247if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013248 ac_cv_stat_tv_nsec2=yes
13249else
Matthias Kloseb9621712010-04-24 17:59:49 +000013250 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013251fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13253fi
13254
Matthias Kloseb9621712010-04-24 17:59:49 +000013255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13256$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013257if test "$ac_cv_stat_tv_nsec2" = yes
13258then
13259
Matthias Kloseb9621712010-04-24 17:59:49 +000013260$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013261
13262fi
13263
Jack Jansen666b1e72001-10-31 12:11:48 +000013264# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13266$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
13267if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
13268 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013269else
Matthias Kloseb9621712010-04-24 17:59:49 +000013270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013271/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013272#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013273int
13274main ()
13275{
Jack Jansen666b1e72001-10-31 12:11:48 +000013276
13277 int rtn;
13278 rtn = mvwdelch(0,0,0);
13279
Martin v. Löwis11437992002-04-12 09:54:03 +000013280 ;
13281 return 0;
13282}
13283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013284if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013285 ac_cv_mvwdelch_is_expression=yes
13286else
Matthias Kloseb9621712010-04-24 17:59:49 +000013287 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013288fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13290fi
13291
Matthias Kloseb9621712010-04-24 17:59:49 +000013292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13293$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013294
13295if test "$ac_cv_mvwdelch_is_expression" = yes
13296then
Martin v. Löwis11437992002-04-12 09:54:03 +000013297
Matthias Kloseb9621712010-04-24 17:59:49 +000013298$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013299
13300fi
13301
Matthias Kloseb9621712010-04-24 17:59:49 +000013302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13303$as_echo_n "checking whether WINDOW has _flags... " >&6; }
13304if test "${ac_cv_window_has_flags+set}" = set; then :
13305 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013306else
Matthias Kloseb9621712010-04-24 17:59:49 +000013307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013308/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013309#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013310int
13311main ()
13312{
Jack Jansen666b1e72001-10-31 12:11:48 +000013313
13314 WINDOW *w;
13315 w->_flags = 0;
13316
Martin v. Löwis11437992002-04-12 09:54:03 +000013317 ;
13318 return 0;
13319}
13320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013321if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013322 ac_cv_window_has_flags=yes
13323else
Matthias Kloseb9621712010-04-24 17:59:49 +000013324 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13327fi
13328
Matthias Kloseb9621712010-04-24 17:59:49 +000013329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13330$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013331
Jack Jansen666b1e72001-10-31 12:11:48 +000013332
13333if test "$ac_cv_window_has_flags" = yes
13334then
Martin v. Löwis11437992002-04-12 09:54:03 +000013335
Matthias Kloseb9621712010-04-24 17:59:49 +000013336$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013337
13338fi
13339
Matthias Kloseb9621712010-04-24 17:59:49 +000013340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13341$as_echo_n "checking for is_term_resized... " >&6; }
13342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013343/* end confdefs.h. */
13344#include <curses.h>
13345int
13346main ()
13347{
13348void *x=is_term_resized
13349 ;
13350 return 0;
13351}
13352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013353if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013354
Matthias Kloseb9621712010-04-24 17:59:49 +000013355$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013356
Matthias Kloseb159a552010-04-25 21:00:44 +000013357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013358$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013359else
Matthias Kloseb9621712010-04-24 17:59:49 +000013360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13361$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013362
13363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13365
Matthias Kloseb9621712010-04-24 17:59:49 +000013366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13367$as_echo_n "checking for resize_term... " >&6; }
13368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013369/* end confdefs.h. */
13370#include <curses.h>
13371int
13372main ()
13373{
13374void *x=resize_term
13375 ;
13376 return 0;
13377}
13378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013379if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013380
Matthias Kloseb9621712010-04-24 17:59:49 +000013381$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013382
Matthias Kloseb159a552010-04-25 21:00:44 +000013383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013384$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013385else
Matthias Kloseb9621712010-04-24 17:59:49 +000013386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13387$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013388
13389fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13391
Matthias Kloseb9621712010-04-24 17:59:49 +000013392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13393$as_echo_n "checking for resizeterm... " >&6; }
13394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013395/* end confdefs.h. */
13396#include <curses.h>
13397int
13398main ()
13399{
13400void *x=resizeterm
13401 ;
13402 return 0;
13403}
13404_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013405if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013406
Matthias Kloseb9621712010-04-24 17:59:49 +000013407$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013408
Matthias Kloseb159a552010-04-25 21:00:44 +000013409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013410$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013411else
Matthias Kloseb9621712010-04-24 17:59:49 +000013412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13413$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013414
13415fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13417
Matthias Kloseb9621712010-04-24 17:59:49 +000013418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13419$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013420
13421if test -r /dev/ptmx
13422then
Matthias Kloseb9621712010-04-24 17:59:49 +000013423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13424$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013425
Matthias Kloseb9621712010-04-24 17:59:49 +000013426$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013427
Thomas Wouters89f507f2006-12-13 04:49:30 +000013428else
Matthias Kloseb9621712010-04-24 17:59:49 +000013429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13430$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013431fi
13432
Matthias Kloseb9621712010-04-24 17:59:49 +000013433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13434$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013435
13436if test -r /dev/ptc
13437then
Matthias Kloseb9621712010-04-24 17:59:49 +000013438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13439$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013440
Matthias Kloseb9621712010-04-24 17:59:49 +000013441$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013442
Thomas Wouters89f507f2006-12-13 04:49:30 +000013443else
Matthias Kloseb9621712010-04-24 17:59:49 +000013444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13445$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013446fi
13447
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013448if test "$have_long_long" = yes
13449then
Matthias Kloseb9621712010-04-24 17:59:49 +000013450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13451$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
13452 if test "${ac_cv_have_long_long_format+set}" = set; then :
13453 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013454else
Matthias Kloseb9621712010-04-24 17:59:49 +000013455 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013456 ac_cv_have_long_long_format=no
13457else
Matthias Kloseb9621712010-04-24 17:59:49 +000013458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013459/* end confdefs.h. */
13460
13461 #include <stdio.h>
13462 #include <stddef.h>
13463 #include <string.h>
13464
13465 #ifdef HAVE_SYS_TYPES_H
13466 #include <sys/types.h>
13467 #endif
13468
13469 int main()
13470 {
13471 char buffer[256];
13472
13473 if (sprintf(buffer, "%lld", (long long)123) < 0)
13474 return 1;
13475 if (strcmp(buffer, "123"))
13476 return 1;
13477
13478 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13479 return 1;
13480 if (strcmp(buffer, "-123"))
13481 return 1;
13482
13483 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13484 return 1;
13485 if (strcmp(buffer, "123"))
13486 return 1;
13487
13488 return 0;
13489 }
13490
13491_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013492if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013493 ac_cv_have_long_long_format=yes
13494else
Matthias Kloseb9621712010-04-24 17:59:49 +000013495 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013496fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013497rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13498 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013499fi
13500
13501
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013502fi
13503
Matthias Kloseb9621712010-04-24 17:59:49 +000013504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13505$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013506fi
13507
Mark Dickinson89d7d412009-12-31 20:50:59 +000013508if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013509then
13510
Matthias Kloseb9621712010-04-24 17:59:49 +000013511$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013512
13513fi
13514
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013515if test $ac_sys_system = Darwin
13516then
13517 LIBS="$LIBS -framework CoreFoundation"
13518fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013519
Matthias Kloseb9621712010-04-24 17:59:49 +000013520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13521$as_echo_n "checking for %zd printf() format support... " >&6; }
13522if test "${ac_cv_have_size_t_format+set}" = set; then :
13523 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013524else
Matthias Kloseb9621712010-04-24 17:59:49 +000013525 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013526 ac_cv_have_size_t_format="cross -- assuming yes"
13527
Thomas Wouters477c8d52006-05-27 19:21:47 +000013528else
Matthias Kloseb9621712010-04-24 17:59:49 +000013529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013530/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013531
Thomas Wouters477c8d52006-05-27 19:21:47 +000013532#include <stdio.h>
13533#include <stddef.h>
13534#include <string.h>
13535
Christian Heimes2c181612007-12-17 20:04:13 +000013536#ifdef HAVE_SYS_TYPES_H
13537#include <sys/types.h>
13538#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013539
13540#ifdef HAVE_SSIZE_T
13541typedef ssize_t Py_ssize_t;
13542#elif SIZEOF_VOID_P == SIZEOF_LONG
13543typedef long Py_ssize_t;
13544#else
13545typedef int Py_ssize_t;
13546#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013547
Christian Heimes2c181612007-12-17 20:04:13 +000013548int main()
13549{
13550 char buffer[256];
13551
Thomas Wouters477c8d52006-05-27 19:21:47 +000013552 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13553 return 1;
13554
Thomas Wouters89f507f2006-12-13 04:49:30 +000013555 if (strcmp(buffer, "123"))
13556 return 1;
13557
13558 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13559 return 1;
13560
13561 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013562 return 1;
13563
13564 return 0;
13565}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013566
Thomas Wouters477c8d52006-05-27 19:21:47 +000013567_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013568if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013569 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013570else
Matthias Kloseb9621712010-04-24 17:59:49 +000013571 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013572fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013573rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13574 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013575fi
13576
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013577fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13579$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013580if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013581
Matthias Kloseb9621712010-04-24 17:59:49 +000013582$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013583
13584fi
13585
Matthias Kloseb9621712010-04-24 17:59:49 +000013586ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013587#ifdef HAVE_SYS_TYPES_H
13588#include <sys/types.h>
13589#endif
13590#ifdef HAVE_SYS_SOCKET_H
13591#include <sys/socket.h>
13592#endif
13593
Matthias Kloseb9621712010-04-24 17:59:49 +000013594"
13595if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013596
Martin v. Löwis11437992002-04-12 09:54:03 +000013597else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013598
Matthias Kloseb9621712010-04-24 17:59:49 +000013599$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013600
13601fi
13602
Michael W. Hudson54241132001-12-07 15:38:26 +000013603
Matthias Kloseb9621712010-04-24 17:59:49 +000013604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13605$as_echo_n "checking for broken mbstowcs... " >&6; }
13606if test "${ac_cv_broken_mbstowcs+set}" = set; then :
13607 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013608else
Matthias Kloseb9621712010-04-24 17:59:49 +000013609 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013610 ac_cv_broken_mbstowcs=no
13611else
Matthias Kloseb9621712010-04-24 17:59:49 +000013612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013613/* end confdefs.h. */
13614
13615#include<stdlib.h>
13616int main() {
13617 size_t len = -1;
13618 const char *str = "text";
13619 len = mbstowcs(NULL, str, 0);
13620 return (len != 4);
13621}
13622
13623_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013624if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013625 ac_cv_broken_mbstowcs=no
13626else
Matthias Kloseb9621712010-04-24 17:59:49 +000013627 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013628fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013629rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13630 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013631fi
13632
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013633fi
13634
Matthias Kloseb9621712010-04-24 17:59:49 +000013635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13636$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013637if test "$ac_cv_broken_mbstowcs" = yes
13638then
13639
Matthias Kloseb9621712010-04-24 17:59:49 +000013640$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013641
13642fi
13643
Antoine Pitrou042b1282010-08-13 21:15:58 +000013644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13645$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
13646if test "${ac_cv_computed_gotos+set}" = set; then :
13647 $as_echo_n "(cached) " >&6
13648else
13649 if test "$cross_compiling" = yes; then :
13650 ac_cv_computed_gotos=no
13651else
13652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13653/* end confdefs.h. */
13654
13655int main(int argc, char **argv)
13656{
13657 static void *targets[1] = { &&LABEL1 };
13658 goto LABEL2;
13659LABEL1:
13660 return 0;
13661LABEL2:
13662 goto *targets[0];
13663 return 1;
13664}
13665
13666_ACEOF
13667if ac_fn_c_try_run "$LINENO"; then :
13668 ac_cv_computed_gotos=yes
13669else
13670 ac_cv_computed_gotos=no
13671fi
13672rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13673 conftest.$ac_objext conftest.beam conftest.$ac_ext
13674fi
13675
13676fi
13677
13678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13679$as_echo "$ac_cv_computed_gotos" >&6; }
13680if test "$ac_cv_computed_gotos" = yes
13681then
13682
13683$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13684
13685fi
13686
Antoine Pitroub52ec782009-01-25 16:34:23 +000013687# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13689$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013690
13691# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013692if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013693 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013694if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013695then
13696
Matthias Kloseb9621712010-04-24 17:59:49 +000013697$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013698
Matthias Kloseb9621712010-04-24 17:59:49 +000013699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13700$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013701fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013702if test "$withval" = no
13703then
13704
13705$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13706
Matthias Kloseb9621712010-04-24 17:59:49 +000013707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13708$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013709fi
13710
Antoine Pitrou042b1282010-08-13 21:15:58 +000013711else
13712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13713$as_echo "no value specified" >&6; }
13714fi
13715
Antoine Pitroub52ec782009-01-25 16:34:23 +000013716
13717
Michael W. Hudson54241132001-12-07 15:38:26 +000013718
Jesus Cea6a792292010-05-03 21:18:48 +000013719case $ac_sys_system in
Barry Warsaw278266f2010-10-14 17:38:46 +000013720 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 +000013721esac
13722
13723
13724
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013725
13726
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013727for h in `(cd $srcdir;echo Python/thread_*.h)`
13728do
13729 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13730done
13731
Michael W. Hudson54241132001-12-07 15:38:26 +000013732
Neal Norwitzd24499d2005-12-18 21:36:39 +000013733SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13735$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013736for dir in $SRCDIRS; do
13737 if test ! -d $dir; then
13738 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013739 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013740done
Matthias Kloseb9621712010-04-24 17:59:49 +000013741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13742$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013743
Guido van Rossum627b2d71993-12-24 10:39:16 +000013744# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013745ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013746
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013747ac_config_files="$ac_config_files Modules/ld_so_aix"
13748
Martin v. Löwis11437992002-04-12 09:54:03 +000013749cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013750# This file is a shell script that caches the results of configure
13751# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013752# scripts and configure runs, see configure's option --config-cache.
13753# It is not useful on other systems. If it contains results you don't
13754# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013755#
Martin v. Löwis11437992002-04-12 09:54:03 +000013756# config.status only pays attention to the cache file if you give it
13757# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013758#
Skip Montanaro6dead952003-09-25 14:50:04 +000013759# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013760# loading this file, other *unset* `ac_cv_foo' will be assigned the
13761# following values.
13762
13763_ACEOF
13764
Guido van Rossumf78abae1997-01-21 22:02:36 +000013765# The following way of writing the cache mishandles newlines in values,
13766# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013767# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013768# Ultrix sh set writes to stderr and can't be redirected directly,
13769# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013770(
13771 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13772 eval ac_val=\$$ac_var
13773 case $ac_val in #(
13774 *${as_nl}*)
13775 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013776 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13777$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013778 esac
13779 case $ac_var in #(
13780 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013781 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13782 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013783 esac ;;
13784 esac
13785 done
13786
Martin v. Löwis11437992002-04-12 09:54:03 +000013787 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013788 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13789 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013790 # `set' does not quote correctly, so add quotes: double-quote
13791 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013792 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013793 "s/'/'\\\\''/g;
13794 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013795 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013796 *)
13797 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013798 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013799 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013800 esac |
13801 sort
13802) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013803 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013804 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013805 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013806 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013807 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13808 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013809 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13810 :end' >>confcache
13811if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13812 if test -w "$cache_file"; then
13813 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013814 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13815$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000013816 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013817 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013818 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13819$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013820 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013821fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013822rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013823
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013824test "x$prefix" = xNONE && prefix=$ac_default_prefix
13825# Let make expand exec_prefix.
13826test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013827
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013828DEFS=-DHAVE_CONFIG_H
13829
Skip Montanaro6dead952003-09-25 14:50:04 +000013830ac_libobjs=
13831ac_ltlibobjs=
Barry Warsaw278266f2010-10-14 17:38:46 +000013832U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013833for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13834 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013835 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013836 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013837 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13838 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013839 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13840 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013841done
13842LIBOBJS=$ac_libobjs
13843
13844LTLIBOBJS=$ac_ltlibobjs
13845
13846
Martin v. Löwis11437992002-04-12 09:54:03 +000013847
Matthias Kloseb9621712010-04-24 17:59:49 +000013848
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013849: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013850ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013851ac_clean_files_save=$ac_clean_files
13852ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013853{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13854$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13855as_write_fail=0
13856cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013857#! $SHELL
13858# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013859# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013860# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013861# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013862
Martin v. Löwis11437992002-04-12 09:54:03 +000013863debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013864ac_cs_recheck=false
13865ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013866
Matthias Kloseb9621712010-04-24 17:59:49 +000013867SHELL=\${CONFIG_SHELL-$SHELL}
13868export SHELL
13869_ASEOF
13870cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13871## -------------------- ##
13872## M4sh Initialization. ##
13873## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013874
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013875# Be more Bourne compatible
13876DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013877if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013878 emulate sh
13879 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013880 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013881 # is contrary to our usage. Disable this feature.
13882 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013883 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013884else
Matthias Kloseb9621712010-04-24 17:59:49 +000013885 case `(set -o) 2>/dev/null` in #(
13886 *posix*) :
13887 set -o posix ;; #(
13888 *) :
13889 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013890esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013891fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013892
13893
Matthias Kloseb9621712010-04-24 17:59:49 +000013894as_nl='
13895'
13896export as_nl
13897# Printing a long string crashes Solaris 7 /usr/bin/printf.
13898as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13899as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13900as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13901# Prefer a ksh shell builtin over an external printf program on Solaris,
13902# but without wasting forks for bash or zsh.
13903if test -z "$BASH_VERSION$ZSH_VERSION" \
13904 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13905 as_echo='print -r --'
13906 as_echo_n='print -rn --'
13907elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13908 as_echo='printf %s\n'
13909 as_echo_n='printf %s'
13910else
13911 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13912 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13913 as_echo_n='/usr/ucb/echo -n'
13914 else
13915 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13916 as_echo_n_body='eval
13917 arg=$1;
13918 case $arg in #(
13919 *"$as_nl"*)
13920 expr "X$arg" : "X\\(.*\\)$as_nl";
13921 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13922 esac;
13923 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13924 '
13925 export as_echo_n_body
13926 as_echo_n='sh -c $as_echo_n_body as_echo'
13927 fi
13928 export as_echo_body
13929 as_echo='sh -c $as_echo_body as_echo'
13930fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013931
13932# The user is always right.
13933if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013934 PATH_SEPARATOR=:
13935 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13936 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13937 PATH_SEPARATOR=';'
13938 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013939fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013940
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013941
13942# IFS
13943# We need space, tab and new line, in precisely that order. Quoting is
13944# there to prevent editors from complaining about space-tab.
13945# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13946# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013947IFS=" "" $as_nl"
13948
13949# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000013950case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013951 *[\\/]* ) as_myself=$0 ;;
13952 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000013953for as_dir in $PATH
13954do
13955 IFS=$as_save_IFS
13956 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000013957 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13958 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013959IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000013960
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013961 ;;
13962esac
13963# We did not find ourselves, most probably we were run as `sh COMMAND'
13964# in which case we are not to be found in the path.
13965if test "x$as_myself" = x; then
13966 as_myself=$0
13967fi
13968if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013969 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13970 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013971fi
13972
Matthias Kloseb9621712010-04-24 17:59:49 +000013973# Unset variables that we do not need and which cause bugs (e.g. in
13974# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13975# suppresses any "Segmentation fault" message there. '((' could
13976# trigger a bug in pdksh 5.2.14.
13977for as_var in BASH_ENV ENV MAIL MAILPATH
13978do eval test x\${$as_var+set} = xset \
13979 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013980done
13981PS1='$ '
13982PS2='> '
13983PS4='+ '
13984
13985# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000013986LC_ALL=C
13987export LC_ALL
13988LANGUAGE=C
13989export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013990
Matthias Kloseb9621712010-04-24 17:59:49 +000013991# CDPATH.
13992(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13993
13994
Barry Warsaw278266f2010-10-14 17:38:46 +000013995# as_fn_error STATUS ERROR [LINENO LOG_FD]
13996# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000013997# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
13998# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Barry Warsaw278266f2010-10-14 17:38:46 +000013999# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014000as_fn_error ()
14001{
Barry Warsaw278266f2010-10-14 17:38:46 +000014002 as_status=$1; test $as_status -eq 0 && as_status=1
14003 if test "$4"; then
14004 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14005 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014006 fi
Barry Warsaw278266f2010-10-14 17:38:46 +000014007 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014008 as_fn_exit $as_status
14009} # as_fn_error
14010
14011
14012# as_fn_set_status STATUS
14013# -----------------------
14014# Set $? to STATUS, without forking.
14015as_fn_set_status ()
14016{
14017 return $1
14018} # as_fn_set_status
14019
14020# as_fn_exit STATUS
14021# -----------------
14022# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14023as_fn_exit ()
14024{
14025 set +e
14026 as_fn_set_status $1
14027 exit $1
14028} # as_fn_exit
14029
14030# as_fn_unset VAR
14031# ---------------
14032# Portably unset VAR.
14033as_fn_unset ()
14034{
14035 { eval $1=; unset $1;}
14036}
14037as_unset=as_fn_unset
14038# as_fn_append VAR VALUE
14039# ----------------------
14040# Append the text in VALUE to the end of the definition contained in VAR. Take
14041# advantage of any shell optimizations that allow amortized linear growth over
14042# repeated appends, instead of the typical quadratic growth present in naive
14043# implementations.
14044if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14045 eval 'as_fn_append ()
14046 {
14047 eval $1+=\$2
14048 }'
14049else
14050 as_fn_append ()
14051 {
14052 eval $1=\$$1\$2
14053 }
14054fi # as_fn_append
14055
14056# as_fn_arith ARG...
14057# ------------------
14058# Perform arithmetic evaluation on the ARGs, and store the result in the
14059# global $as_val. Take advantage of shells that can avoid forks. The arguments
14060# must be portable across $(()) and expr.
14061if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14062 eval 'as_fn_arith ()
14063 {
14064 as_val=$(( $* ))
14065 }'
14066else
14067 as_fn_arith ()
14068 {
14069 as_val=`expr "$@" || test $? -eq 1`
14070 }
14071fi # as_fn_arith
14072
14073
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014074if expr a : '\(a\)' >/dev/null 2>&1 &&
14075 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14076 as_expr=expr
14077else
14078 as_expr=false
14079fi
14080
14081if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14082 as_basename=basename
14083else
14084 as_basename=false
14085fi
14086
Matthias Kloseb9621712010-04-24 17:59:49 +000014087if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14088 as_dirname=dirname
14089else
14090 as_dirname=false
14091fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014092
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014093as_me=`$as_basename -- "$0" ||
14094$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14095 X"$0" : 'X\(//\)$' \| \
14096 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014097$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014098 sed '/^.*\/\([^/][^/]*\)\/*$/{
14099 s//\1/
14100 q
14101 }
14102 /^X\/\(\/\/\)$/{
14103 s//\1/
14104 q
14105 }
14106 /^X\/\(\/\).*/{
14107 s//\1/
14108 q
14109 }
14110 s/.*/./; q'`
14111
Matthias Kloseb9621712010-04-24 17:59:49 +000014112# Avoid depending upon Character Ranges.
14113as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14114as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14115as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14116as_cr_digits='0123456789'
14117as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014118
14119ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014120case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014121-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014122 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014123 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014124 xy) ECHO_C='\c';;
14125 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14126 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014127 esac;;
14128*)
14129 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014130esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014131
Martin v. Löwis11437992002-04-12 09:54:03 +000014132rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014133if test -d conf$$.dir; then
14134 rm -f conf$$.dir/conf$$.file
14135else
14136 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014137 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014138fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014139if (echo >conf$$.file) 2>/dev/null; then
14140 if ln -s conf$$.file conf$$ 2>/dev/null; then
14141 as_ln_s='ln -s'
14142 # ... but there are two gotchas:
14143 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14144 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14145 # In both cases, we have to default to `cp -p'.
14146 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14147 as_ln_s='cp -p'
14148 elif ln conf$$.file conf$$ 2>/dev/null; then
14149 as_ln_s=ln
14150 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014151 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014152 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014153else
14154 as_ln_s='cp -p'
14155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014156rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14157rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014158
Matthias Kloseb9621712010-04-24 17:59:49 +000014159
14160# as_fn_mkdir_p
14161# -------------
14162# Create "$as_dir" as a directory, including parents if necessary.
14163as_fn_mkdir_p ()
14164{
14165
14166 case $as_dir in #(
14167 -*) as_dir=./$as_dir;;
14168 esac
14169 test -d "$as_dir" || eval $as_mkdir_p || {
14170 as_dirs=
14171 while :; do
14172 case $as_dir in #(
14173 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14174 *) as_qdir=$as_dir;;
14175 esac
14176 as_dirs="'$as_qdir' $as_dirs"
14177 as_dir=`$as_dirname -- "$as_dir" ||
14178$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14179 X"$as_dir" : 'X\(//\)[^/]' \| \
14180 X"$as_dir" : 'X\(//\)$' \| \
14181 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14182$as_echo X"$as_dir" |
14183 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14184 s//\1/
14185 q
14186 }
14187 /^X\(\/\/\)[^/].*/{
14188 s//\1/
14189 q
14190 }
14191 /^X\(\/\/\)$/{
14192 s//\1/
14193 q
14194 }
14195 /^X\(\/\).*/{
14196 s//\1/
14197 q
14198 }
14199 s/.*/./; q'`
14200 test -d "$as_dir" && break
14201 done
14202 test -z "$as_dirs" || eval "mkdir $as_dirs"
Barry Warsaw278266f2010-10-14 17:38:46 +000014203 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014204
14205
14206} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014207if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014208 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014209else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014210 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014211 as_mkdir_p=false
14212fi
14213
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014214if test -x / >/dev/null 2>&1; then
14215 as_test_x='test -x'
14216else
14217 if ls -dL / >/dev/null 2>&1; then
14218 as_ls_L_option=L
14219 else
14220 as_ls_L_option=
14221 fi
14222 as_test_x='
14223 eval sh -c '\''
14224 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014225 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014226 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014227 case $1 in #(
14228 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014229 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014230 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014231 ???[sx]*):;;*)false;;esac;fi
14232 '\'' sh
14233 '
14234fi
14235as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014236
14237# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014238as_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 +000014239
14240# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014241as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014242
14243
Martin v. Löwis11437992002-04-12 09:54:03 +000014244exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014245## ----------------------------------- ##
14246## Main body of $CONFIG_STATUS script. ##
14247## ----------------------------------- ##
14248_ASEOF
14249test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014250
Matthias Kloseb9621712010-04-24 17:59:49 +000014251cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14252# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014253# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014254# values after options handling.
14255ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014256This file was extended by python $as_me 3.2, which was
Barry Warsaw278266f2010-10-14 17:38:46 +000014257generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014258
14259 CONFIG_FILES = $CONFIG_FILES
14260 CONFIG_HEADERS = $CONFIG_HEADERS
14261 CONFIG_LINKS = $CONFIG_LINKS
14262 CONFIG_COMMANDS = $CONFIG_COMMANDS
14263 $ $0 $@
14264
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014265on `(hostname || uname -n) 2>/dev/null | sed 1q`
14266"
14267
Martin v. Löwis11437992002-04-12 09:54:03 +000014268_ACEOF
14269
Matthias Kloseb9621712010-04-24 17:59:49 +000014270case $ac_config_files in *"
14271"*) set x $ac_config_files; shift; ac_config_files=$*;;
14272esac
14273
14274case $ac_config_headers in *"
14275"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14276esac
14277
14278
14279cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014280# Files that config.status was made for.
Barry Warsaw278266f2010-10-14 17:38:46 +000014281config_files="$ac_config_files"
14282config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014283
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014284_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014285
Matthias Kloseb9621712010-04-24 17:59:49 +000014286cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014287ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014288\`$as_me' instantiates files and other configuration actions
14289from templates according to the current configuration. Unless the files
14290and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014291
Matthias Kloseb9621712010-04-24 17:59:49 +000014292Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014293
14294 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014295 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014296 --config print configuration, then exit
14297 -q, --quiet, --silent
14298 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014299 -d, --debug don't remove temporary files
14300 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014301 --file=FILE[:TEMPLATE]
14302 instantiate the configuration file FILE
14303 --header=FILE[:TEMPLATE]
14304 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014305
14306Configuration files:
14307$config_files
14308
14309Configuration headers:
14310$config_headers
14311
Matthias Kloseb9621712010-04-24 17:59:49 +000014312Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014313
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014315cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14316ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014317ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014318python config.status 3.2
Barry Warsaw278266f2010-10-14 17:38:46 +000014319configured by $0, generated by GNU Autoconf 2.67,
Matthias Kloseb9621712010-04-24 17:59:49 +000014320 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014321
Barry Warsaw278266f2010-10-14 17:38:46 +000014322Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014323This config.status script is free software; the Free Software Foundation
14324gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014325
14326ac_pwd='$ac_pwd'
14327srcdir='$srcdir'
14328INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014329test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014330_ACEOF
14331
Matthias Kloseb9621712010-04-24 17:59:49 +000014332cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14333# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014334ac_need_defaults=:
14335while test $# != 0
14336do
14337 case $1 in
Barry Warsaw278266f2010-10-14 17:38:46 +000014338 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014339 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14340 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014341 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014342 ;;
Barry Warsaw278266f2010-10-14 17:38:46 +000014343 --*=)
14344 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14345 ac_optarg=
14346 ac_shift=:
14347 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014348 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014349 ac_option=$1
14350 ac_optarg=$2
14351 ac_shift=shift
14352 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014353 esac
14354
Skip Montanaro6dead952003-09-25 14:50:04 +000014355 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014356 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014357 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14358 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014359 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014360 $as_echo "$ac_cs_version"; exit ;;
14361 --config | --confi | --conf | --con | --co | --c )
14362 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014363 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014364 debug=: ;;
14365 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014366 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014367 case $ac_optarg in
14368 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Barry Warsaw278266f2010-10-14 17:38:46 +000014369 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014370 esac
14371 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014372 ac_need_defaults=false;;
14373 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014374 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014375 case $ac_optarg in
14376 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14377 esac
14378 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014379 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014380 --he | --h)
14381 # Conflict between --help and --header
Barry Warsaw278266f2010-10-14 17:38:46 +000014382 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014383Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014384 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014385 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014386 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14387 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14388 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014389
14390 # This is an error.
Barry Warsaw278266f2010-10-14 17:38:46 +000014391 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014392Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014393
Matthias Kloseb9621712010-04-24 17:59:49 +000014394 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014395 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014396
14397 esac
14398 shift
14399done
14400
Skip Montanaro6dead952003-09-25 14:50:04 +000014401ac_configure_extra_args=
14402
14403if $ac_cs_silent; then
14404 exec 6>/dev/null
14405 ac_configure_extra_args="$ac_configure_extra_args --silent"
14406fi
14407
14408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014409cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014410if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014411 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14412 shift
14413 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14414 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014415 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014416 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014417fi
14418
Martin v. Löwis11437992002-04-12 09:54:03 +000014419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014420cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014421exec 5>>config.log
14422{
14423 echo
14424 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14425## Running $as_me. ##
14426_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014427 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014428} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014429
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014430_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014431cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014432_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014433
Matthias Kloseb9621712010-04-24 17:59:49 +000014434cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014435
14436# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014437for ac_config_target in $ac_config_targets
14438do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014439 case $ac_config_target in
14440 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14441 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14442 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014443 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14444 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014445 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14446 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014447 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014448 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014449
Barry Warsaw278266f2010-10-14 17:38:46 +000014450 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014451 esac
14452done
14453
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014454
Martin v. Löwis11437992002-04-12 09:54:03 +000014455# If the user did not use the arguments to specify the items to instantiate,
14456# then the envvar interface is used. Set only those that are not.
14457# We use the long form for the default assignment because of an extremely
14458# bizarre bug on SunOS 4.1.3.
14459if $ac_need_defaults; then
14460 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14461 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14462fi
14463
Skip Montanaro6dead952003-09-25 14:50:04 +000014464# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014465# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014466# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014467# Hook for its removal unless debugging.
14468# Note that there is a small window in which the directory will not be cleaned:
14469# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014470$debug ||
14471{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014472 tmp=
14473 trap 'exit_status=$?
14474 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14475' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014476 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014477}
Martin v. Löwis11437992002-04-12 09:54:03 +000014478# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014479
Martin v. Löwis11437992002-04-12 09:54:03 +000014480{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014481 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014482 test -n "$tmp" && test -d "$tmp"
14483} ||
14484{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014485 tmp=./conf$$-$RANDOM
14486 (umask 077 && mkdir "$tmp")
Barry Warsaw278266f2010-10-14 17:38:46 +000014487} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014488
Matthias Kloseb9621712010-04-24 17:59:49 +000014489# Set up the scripts for CONFIG_FILES section.
14490# No need to generate them if there are no CONFIG_FILES.
14491# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014492if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014493
Matthias Kloseb9621712010-04-24 17:59:49 +000014494
14495ac_cr=`echo X | tr X '\015'`
14496# On cygwin, bash can eat \r inside `` if the user requested igncr.
14497# But we know of no other shell where ac_cr would be empty at this
14498# point, so we can use a bashism as a fallback.
14499if test "x$ac_cr" = x; then
14500 eval ac_cr=\$\'\\r\'
14501fi
14502ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14503if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Barry Warsaw278266f2010-10-14 17:38:46 +000014504 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014505else
14506 ac_cs_awk_cr=$ac_cr
14507fi
14508
14509echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014510_ACEOF
14511
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014512
Matthias Kloseb9621712010-04-24 17:59:49 +000014513{
14514 echo "cat >conf$$subs.awk <<_ACEOF" &&
14515 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14516 echo "_ACEOF"
14517} >conf$$subs.sh ||
Barry Warsaw278266f2010-10-14 17:38:46 +000014518 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14519ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014520ac_delim='%!_!# '
14521for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014522 . ./conf$$subs.sh ||
Barry Warsaw278266f2010-10-14 17:38:46 +000014523 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014524
Matthias Kloseb9621712010-04-24 17:59:49 +000014525 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14526 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014527 break
14528 elif $ac_last_try; then
Barry Warsaw278266f2010-10-14 17:38:46 +000014529 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014530 else
14531 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014532 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014533done
Matthias Kloseb9621712010-04-24 17:59:49 +000014534rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014535
Matthias Kloseb9621712010-04-24 17:59:49 +000014536cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14537cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014539sed -n '
14540h
14541s/^/S["/; s/!.*/"]=/
14542p
14543g
14544s/^[^!]*!//
14545:repl
14546t repl
14547s/'"$ac_delim"'$//
14548t delim
14549:nl
14550h
14551s/\(.\{148\}\)..*/\1/
14552t more1
14553s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14554p
14555n
14556b repl
14557:more1
14558s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14559p
14560g
14561s/.\{148\}//
14562t nl
14563:delim
14564h
14565s/\(.\{148\}\)..*/\1/
14566t more2
14567s/["\\]/\\&/g; s/^/"/; s/$/"/
14568p
14569b
14570:more2
14571s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14572p
14573g
14574s/.\{148\}//
14575t delim
14576' <conf$$subs.awk | sed '
14577/^[^""]/{
14578 N
14579 s/\n//
14580}
14581' >>$CONFIG_STATUS || ac_write_fail=1
14582rm -f conf$$subs.awk
14583cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14584_ACAWK
14585cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14586 for (key in S) S_is_set[key] = 1
14587 FS = ""
14588
14589}
14590{
14591 line = $ 0
14592 nfields = split(line, field, "@")
14593 substed = 0
14594 len = length(field[1])
14595 for (i = 2; i < nfields; i++) {
14596 key = field[i]
14597 keylen = length(key)
14598 if (S_is_set[key]) {
14599 value = S[key]
14600 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14601 len += length(value) + length(field[++i])
14602 substed = 1
14603 } else
14604 len += 1 + keylen
14605 }
14606
14607 print line
14608}
14609
14610_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014611_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014612cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14613if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14614 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14615else
14616 cat
14617fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
Barry Warsaw278266f2010-10-14 17:38:46 +000014618 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014619_ACEOF
14620
Barry Warsaw278266f2010-10-14 17:38:46 +000014621# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14622# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014623# trailing colons and then remove the whole line if VPATH becomes empty
14624# (actually we leave an empty line to preserve line numbers).
14625if test "x$srcdir" = x.; then
Barry Warsaw278266f2010-10-14 17:38:46 +000014626 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14627h
14628s///
14629s/^/:/
14630s/[ ]*$/:/
14631s/:\$(srcdir):/:/g
14632s/:\${srcdir}:/:/g
14633s/:@srcdir@:/:/g
14634s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014635s/:*$//
Barry Warsaw278266f2010-10-14 17:38:46 +000014636x
14637s/\(=[ ]*\).*/\1/
14638G
14639s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014640s/^[^=]*=[ ]*$//
14641}'
14642fi
14643
Matthias Kloseb9621712010-04-24 17:59:49 +000014644cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014645fi # test -n "$CONFIG_FILES"
14646
Matthias Kloseb9621712010-04-24 17:59:49 +000014647# Set up the scripts for CONFIG_HEADERS section.
14648# No need to generate them if there are no CONFIG_HEADERS.
14649# This happens for instance with `./config.status Makefile'.
14650if test -n "$CONFIG_HEADERS"; then
14651cat >"$tmp/defines.awk" <<\_ACAWK ||
14652BEGIN {
14653_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014654
Matthias Kloseb9621712010-04-24 17:59:49 +000014655# Transform confdefs.h into an awk script `defines.awk', embedded as
14656# here-document in config.status, that substitutes the proper values into
14657# config.h.in to produce config.h.
14658
14659# Create a delimiter string that does not exist in confdefs.h, to ease
14660# handling of long lines.
14661ac_delim='%!_!# '
14662for ac_last_try in false false :; do
14663 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14664 if test -z "$ac_t"; then
14665 break
14666 elif $ac_last_try; then
Barry Warsaw278266f2010-10-14 17:38:46 +000014667 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014668 else
14669 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14670 fi
14671done
14672
14673# For the awk script, D is an array of macro values keyed by name,
14674# likewise P contains macro parameters if any. Preserve backslash
14675# newline sequences.
14676
14677ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14678sed -n '
14679s/.\{148\}/&'"$ac_delim"'/g
14680t rset
14681:rset
14682s/^[ ]*#[ ]*define[ ][ ]*/ /
14683t def
14684d
14685:def
14686s/\\$//
14687t bsnl
14688s/["\\]/\\&/g
14689s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14690D["\1"]=" \3"/p
14691s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14692d
14693:bsnl
14694s/["\\]/\\&/g
14695s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14696D["\1"]=" \3\\\\\\n"\\/p
14697t cont
14698s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14699t cont
14700d
14701:cont
14702n
14703s/.\{148\}/&'"$ac_delim"'/g
14704t clear
14705:clear
14706s/\\$//
14707t bsnlc
14708s/["\\]/\\&/g; s/^/"/; s/$/"/p
14709d
14710:bsnlc
14711s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14712b cont
14713' <confdefs.h | sed '
14714s/'"$ac_delim"'/"\\\
14715"/g' >>$CONFIG_STATUS || ac_write_fail=1
14716
14717cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14718 for (key in D) D_is_set[key] = 1
14719 FS = ""
14720}
14721/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14722 line = \$ 0
14723 split(line, arg, " ")
14724 if (arg[1] == "#") {
14725 defundef = arg[2]
14726 mac1 = arg[3]
14727 } else {
14728 defundef = substr(arg[1], 2)
14729 mac1 = arg[2]
14730 }
14731 split(mac1, mac2, "(") #)
14732 macro = mac2[1]
14733 prefix = substr(line, 1, index(line, defundef) - 1)
14734 if (D_is_set[macro]) {
14735 # Preserve the white space surrounding the "#".
14736 print prefix "define", macro P[macro] D[macro]
14737 next
14738 } else {
14739 # Replace #undef with comments. This is necessary, for example,
14740 # in the case of _POSIX_SOURCE, which is predefined and required
14741 # on some systems where configure will not decide to define it.
14742 if (defundef == "undef") {
14743 print "/*", prefix defundef, macro, "*/"
14744 next
14745 }
14746 }
14747}
14748{ print }
14749_ACAWK
14750_ACEOF
14751cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Barry Warsaw278266f2010-10-14 17:38:46 +000014752 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014753fi # test -n "$CONFIG_HEADERS"
14754
14755
14756eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14757shift
14758for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014759do
14760 case $ac_tag in
14761 :[FHLC]) ac_mode=$ac_tag; continue;;
14762 esac
14763 case $ac_mode$ac_tag in
14764 :[FHL]*:*);;
Barry Warsaw278266f2010-10-14 17:38:46 +000014765 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014766 :[FH]-) ac_tag=-:-;;
14767 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14768 esac
14769 ac_save_IFS=$IFS
14770 IFS=:
14771 set x $ac_tag
14772 IFS=$ac_save_IFS
14773 shift
14774 ac_file=$1
14775 shift
14776
14777 case $ac_mode in
14778 :L) ac_source=$1;;
14779 :[FH])
14780 ac_file_inputs=
14781 for ac_f
14782 do
14783 case $ac_f in
14784 -) ac_f="$tmp/stdin";;
14785 *) # Look for the file first in the build tree, then in the source tree
14786 # (if the path is not absolute). The absolute path cannot be DOS-style,
14787 # because $ac_f cannot contain `:'.
14788 test -f "$ac_f" ||
14789 case $ac_f in
14790 [\\/$]*) false;;
14791 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14792 esac ||
Barry Warsaw278266f2010-10-14 17:38:46 +000014793 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014794 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014795 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14796 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014797 done
14798
14799 # Let's still pretend it is `configure' which instantiates (i.e., don't
14800 # use $as_me), people would be surprised to read:
14801 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014802 configure_input='Generated from '`
14803 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14804 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014805 if test x"$ac_file" != x-; then
14806 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014807 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14808$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014809 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014810 # Neutralize special characters interpreted by sed in replacement strings.
14811 case $configure_input in #(
14812 *\&* | *\|* | *\\* )
14813 ac_sed_conf_input=`$as_echo "$configure_input" |
14814 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14815 *) ac_sed_conf_input=$configure_input;;
14816 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014817
14818 case $ac_tag in
Matthias Kloseb9621712010-04-24 17:59:49 +000014819 *:-:* | *:-) cat >"$tmp/stdin" \
Barry Warsaw278266f2010-10-14 17:38:46 +000014820 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014821 esac
14822 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014823 esac
14824
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014825 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014826$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014827 X"$ac_file" : 'X\(//\)[^/]' \| \
14828 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014829 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014830$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014831 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14832 s//\1/
14833 q
14834 }
14835 /^X\(\/\/\)[^/].*/{
14836 s//\1/
14837 q
14838 }
14839 /^X\(\/\/\)$/{
14840 s//\1/
14841 q
14842 }
14843 /^X\(\/\).*/{
14844 s//\1/
14845 q
14846 }
14847 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014848 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014849 ac_builddir=.
14850
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014851case "$ac_dir" in
14852.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14853*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014854 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014855 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014856 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014857 case $ac_top_builddir_sub in
14858 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14859 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14860 esac ;;
14861esac
14862ac_abs_top_builddir=$ac_pwd
14863ac_abs_builddir=$ac_pwd$ac_dir_suffix
14864# for backward compatibility:
14865ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014866
14867case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014868 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014869 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014870 ac_top_srcdir=$ac_top_builddir_sub
14871 ac_abs_top_srcdir=$ac_pwd ;;
14872 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014873 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014874 ac_top_srcdir=$srcdir
14875 ac_abs_top_srcdir=$srcdir ;;
14876 *) # Relative name.
14877 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14878 ac_top_srcdir=$ac_top_build_prefix$srcdir
14879 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014880esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014881ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014882
Martin v. Löwis11437992002-04-12 09:54:03 +000014883
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014884 case $ac_mode in
14885 :F)
14886 #
14887 # CONFIG_FILE
14888 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014889
14890 case $INSTALL in
14891 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014892 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014893 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014894_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014895
Matthias Kloseb9621712010-04-24 17:59:49 +000014896cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014897# If the template does not know about datarootdir, expand it.
14898# FIXME: This hack should be removed a few years after 2.60.
14899ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014900ac_sed_dataroot='
14901/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014902 p
14903 q
14904}
14905/@datadir@/p
14906/@docdir@/p
14907/@infodir@/p
14908/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014909/@mandir@/p'
14910case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014911*datarootdir*) ac_datarootdir_seen=yes;;
14912*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014913 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14914$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014916cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014917 ac_datarootdir_hack='
14918 s&@datadir@&$datadir&g
14919 s&@docdir@&$docdir&g
14920 s&@infodir@&$infodir&g
14921 s&@localedir@&$localedir&g
14922 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000014923 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014924esac
14925_ACEOF
14926
14927# Neutralize VPATH when `$srcdir' = `.'.
14928# Shell code in configure.ac might set extrasub.
14929# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000014930cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14931ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014932$extrasub
14933_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014934cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014935:t
14936/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000014937s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014938s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000014939s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014940s&@srcdir@&$ac_srcdir&;t t
14941s&@abs_srcdir@&$ac_abs_srcdir&;t t
14942s&@top_srcdir@&$ac_top_srcdir&;t t
14943s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14944s&@builddir@&$ac_builddir&;t t
14945s&@abs_builddir@&$ac_abs_builddir&;t t
14946s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14947s&@INSTALL@&$ac_INSTALL&;t t
14948$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000014949"
14950eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
Barry Warsaw278266f2010-10-14 17:38:46 +000014951 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014952
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014953test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14954 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14955 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014956 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Barry Warsaw278266f2010-10-14 17:38:46 +000014957which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014958$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Barry Warsaw278266f2010-10-14 17:38:46 +000014959which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014960
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014961 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000014962 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +000014963 -) cat "$tmp/out" && rm -f "$tmp/out";;
14964 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
14965 esac \
Barry Warsaw278266f2010-10-14 17:38:46 +000014966 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014967 ;;
14968 :H)
14969 #
14970 # CONFIG_HEADER
14971 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014972 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014973 {
14974 $as_echo "/* $configure_input */" \
14975 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14976 } >"$tmp/config.h" \
Barry Warsaw278266f2010-10-14 17:38:46 +000014977 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014978 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
14979 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14980$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014981 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014982 rm -f "$ac_file"
14983 mv "$tmp/config.h" "$ac_file" \
Barry Warsaw278266f2010-10-14 17:38:46 +000014984 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014985 fi
14986 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014987 $as_echo "/* $configure_input */" \
14988 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
Barry Warsaw278266f2010-10-14 17:38:46 +000014989 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014990 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014991 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014992
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014993
14994 esac
14995
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014996
14997 case $ac_file$ac_mode in
14998 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
14999
15000 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015001done # for ac_tag
15002
Guido van Rossum627b2d71993-12-24 10:39:16 +000015003
Matthias Kloseb9621712010-04-24 17:59:49 +000015004as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015005_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015006ac_clean_files=$ac_clean_files_save
15007
Matthias Kloseb9621712010-04-24 17:59:49 +000015008test $ac_write_fail = 0 ||
Barry Warsaw278266f2010-10-14 17:38:46 +000015009 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015010
Martin v. Löwis11437992002-04-12 09:54:03 +000015011
15012# configure is writing to config.log, and then calls config.status.
15013# config.status does its own redirection, appending to config.log.
15014# Unfortunately, on DOS this fails, as config.log is still kept open
15015# by configure, so config.status won't be able to write to it; its
15016# output is simply discarded. So we exec the FD to /dev/null,
15017# effectively closing config.log, so it can be properly (re)opened and
15018# appended to by config.status. When coming back to configure, we
15019# need to make the FD available again.
15020if test "$no_create" != yes; then
15021 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015022 ac_config_status_args=
15023 test "$silent" = yes &&
15024 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015025 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015026 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015027 exec 5>>config.log
15028 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15029 # would make configure fail if this is the last instruction.
Barry Warsaw278266f2010-10-14 17:38:46 +000015030 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015031fi
15032if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15033 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15034$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015035fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015036
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015037
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015038echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015039if test ! -f Modules/Setup
15040then
15041 cp $srcdir/Modules/Setup.dist Modules/Setup
15042fi
15043
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015044echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015045if test ! -f Modules/Setup.local
15046then
15047 echo "# Edit this file for local setup changes" >Modules/Setup.local
15048fi
15049
15050echo "creating Makefile"
15051$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15052 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015053 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015054mv config.c Modules