blob: 83dc72736a3925ed1e66c14f0cf507fcfa12f8b1 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Benjamin Petersond4694ed2010-11-01 01:44:30 +00002# From configure.in Revision: 86045 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Benjamin Peterson79263252010-10-31 16:50:44 +00004# Generated by GNU Autoconf 2.65 for python 3.2.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Kloseb9621712010-04-24 17:59:49 +00008#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Benjamin Peterson79263252010-10-31 16:50:44 +000010# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
11# 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"
Benjamin Peterson79263252010-10-31 16:50:44 +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
Benjamin Peterson79263252010-10-31 16:50:44 +0000363# as_fn_error 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
Benjamin Peterson79263252010-10-31 16:50:44 +0000367# script with status $?, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000368as_fn_error ()
369{
Benjamin Peterson79263252010-10-31 16:50:44 +0000370 as_status=$?; test $as_status -eq 0 && as_status=1
371 if test "$3"; then
372 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
373 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
Matthias Kloseb9621712010-04-24 17:59:49 +0000374 fi
Benjamin Peterson79263252010-10-31 16:50:44 +0000375 $as_echo "$as_me: error: $1" >&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.
Benjamin Peterson79263252010-10-31 16:50:44 +0000537# hostname on some systems (SVR3.2, 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
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000634ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000635LN
636INSTALL_DATA
637INSTALL_SCRIPT
638INSTALL_PROGRAM
639SVNVERSION
640ARFLAGS
641AR
642RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000643USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000644GNULD
645LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000646LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000647RUNSHARED
648INSTSONAME
649LDLIBRARYDIR
650BLDLIBRARY
651DLLLIBRARY
652LDLIBRARY
653LIBRARY
654BUILDEXEEXT
655EGREP
656GREP
657CPP
658MAINCC
659CXX
660OBJEXT
661EXEEXT
662ac_ct_CC
663CPPFLAGS
664LDFLAGS
665CFLAGS
666CC
667EXPORT_MACOSX_DEPLOYMENT_TARGET
668CONFIGURE_MACOSX_DEPLOYMENT_TARGET
669SGI_ABI
670MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000671FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000672FRAMEWORKUNIXTOOLSPREFIX
673FRAMEWORKALTINSTALLLAST
674FRAMEWORKALTINSTALLFIRST
675FRAMEWORKINSTALLLAST
676FRAMEWORKINSTALLFIRST
677PYTHONFRAMEWORKINSTALLDIR
678PYTHONFRAMEWORKPREFIX
679PYTHONFRAMEWORKDIR
680PYTHONFRAMEWORKIDENTIFIER
681PYTHONFRAMEWORK
682LIPO_32BIT_FLAGS
683ARCH_RUN_32BIT
684UNIVERSALSDK
685CONFIG_ARGS
686SOVERSION
687VERSION
688target_alias
689host_alias
690build_alias
691LIBS
692ECHO_T
693ECHO_N
694ECHO_C
695DEFS
696mandir
697localedir
698libdir
699psdir
700pdfdir
701dvidir
702htmldir
703infodir
704docdir
705oldincludedir
706includedir
707localstatedir
708sharedstatedir
709sysconfdir
710datadir
711datarootdir
712libexecdir
713sbindir
714bindir
715program_transform_name
716prefix
717exec_prefix
718PACKAGE_URL
719PACKAGE_BUGREPORT
720PACKAGE_STRING
721PACKAGE_VERSION
722PACKAGE_TARNAME
723PACKAGE_NAME
724PATH_SEPARATOR
725SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000726ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000727ac_user_opts='
728enable_option_checking
729enable_universalsdk
730with_universal_archs
731with_framework_name
732enable_framework
733with_gcc
734with_cxx_main
735with_suffix
736enable_shared
737enable_profiling
738with_pydebug
739with_libs
740with_system_expat
741with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000742enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000743with_dbmliborder
744with_signal_module
745with_dec_threads
746with_threads
747with_thread
748enable_ipv6
749with_doc_strings
750with_tsc
751with_pymalloc
752with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000753with_fpectl
754with_libm
755with_libc
756enable_big_digits
757with_wide_unicode
758with_computed_gotos
759'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000760 ac_precious_vars='build_alias
761host_alias
762target_alias
763CC
764CFLAGS
765LDFLAGS
766LIBS
767CPPFLAGS
768CPP'
769
Guido van Rossum627b2d71993-12-24 10:39:16 +0000770
Guido van Rossum7f43da71994-08-01 12:15:30 +0000771# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000772ac_init_help=
773ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000774ac_unrecognized_opts=
775ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000776# The variables have the same names as the options, with
777# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000778cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000779exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000780no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000781no_recursion=
782prefix=NONE
783program_prefix=NONE
784program_suffix=NONE
785program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000786silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000787site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000788srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000789verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000790x_includes=NONE
791x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000792
793# Installation directory options.
794# These are left unexpanded so users can "make install exec_prefix=/foo"
795# and all the variables that are supposed to be based on exec_prefix
796# by default will actually change.
797# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000798# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000799bindir='${exec_prefix}/bin'
800sbindir='${exec_prefix}/sbin'
801libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000802datarootdir='${prefix}/share'
803datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000804sysconfdir='${prefix}/etc'
805sharedstatedir='${prefix}/com'
806localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000807includedir='${prefix}/include'
808oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000809docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
810infodir='${datarootdir}/info'
811htmldir='${docdir}'
812dvidir='${docdir}'
813pdfdir='${docdir}'
814psdir='${docdir}'
815libdir='${exec_prefix}/lib'
816localedir='${datarootdir}/locale'
817mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000818
Guido van Rossum7f43da71994-08-01 12:15:30 +0000819ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000820ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000821for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000822do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000823 # If the previous option needs an argument, assign it.
824 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000825 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000826 ac_prev=
827 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000828 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000830 case $ac_option in
Benjamin Peterson79263252010-10-31 16:50:44 +0000831 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
832 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000833 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000834
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000835 # Accept the important Cygnus configure options, so we can diagnose typos.
836
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000837 case $ac_dashdash$ac_option in
838 --)
839 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000840
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841 -bindir | --bindir | --bindi | --bind | --bin | --bi)
842 ac_prev=bindir ;;
843 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000844 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000845
846 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000847 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000848 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000849 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000851 -cache-file | --cache-file | --cache-fil | --cache-fi \
852 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
853 ac_prev=cache_file ;;
854 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
855 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000856 cache_file=$ac_optarg ;;
857
858 --config-cache | -C)
859 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000860
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000861 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000862 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000863 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000864 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000865
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000866 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
867 | --dataroo | --dataro | --datar)
868 ac_prev=datarootdir ;;
869 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
870 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
871 datarootdir=$ac_optarg ;;
872
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000874 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000875 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000876 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson79263252010-10-31 16:50:44 +0000877 as_fn_error "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000878 ac_useropt_orig=$ac_useropt
879 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
880 case $ac_user_opts in
881 *"
882"enable_$ac_useropt"
883"*) ;;
884 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
885 ac_unrecognized_sep=', ';;
886 esac
887 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888
889 -docdir | --docdir | --docdi | --doc | --do)
890 ac_prev=docdir ;;
891 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
892 docdir=$ac_optarg ;;
893
894 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
895 ac_prev=dvidir ;;
896 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
897 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898
899 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000900 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000901 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000902 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson79263252010-10-31 16:50:44 +0000903 as_fn_error "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000904 ac_useropt_orig=$ac_useropt
905 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
906 case $ac_user_opts in
907 *"
908"enable_$ac_useropt"
909"*) ;;
910 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
911 ac_unrecognized_sep=', ';;
912 esac
913 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
916 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
917 | --exec | --exe | --ex)
918 ac_prev=exec_prefix ;;
919 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
920 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
921 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000922 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
924 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000925 # Obsolete; use --with-gas.
926 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 -help | --help | --hel | --he | -h)
929 ac_init_help=long ;;
930 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
931 ac_init_help=recursive ;;
932 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
933 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934
935 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000939
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000940 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
941 ac_prev=htmldir ;;
942 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
943 | --ht=*)
944 htmldir=$ac_optarg ;;
945
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946 -includedir | --includedir | --includedi | --included | --include \
947 | --includ | --inclu | --incl | --inc)
948 ac_prev=includedir ;;
949 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
950 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000952
953 -infodir | --infodir | --infodi | --infod | --info | --inf)
954 ac_prev=infodir ;;
955 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000957
958 -libdir | --libdir | --libdi | --libd)
959 ac_prev=libdir ;;
960 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000961 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000962
963 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
964 | --libexe | --libex | --libe)
965 ac_prev=libexecdir ;;
966 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
967 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000968 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000969
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000970 -localedir | --localedir | --localedi | --localed | --locale)
971 ac_prev=localedir ;;
972 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
973 localedir=$ac_optarg ;;
974
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000975 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000976 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000977 ac_prev=localstatedir ;;
978 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000979 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000981
982 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
983 ac_prev=mandir ;;
984 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000985 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000986
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000988 # Obsolete; use --without-fp.
989 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990
991 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000992 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993 no_create=yes ;;
994
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000995 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
996 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
997 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000999 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1000 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1001 | --oldin | --oldi | --old | --ol | --o)
1002 ac_prev=oldincludedir ;;
1003 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1004 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1005 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001007
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1009 ac_prev=prefix ;;
1010 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012
1013 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1014 | --program-pre | --program-pr | --program-p)
1015 ac_prev=program_prefix ;;
1016 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1017 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001018 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019
1020 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1021 | --program-suf | --program-su | --program-s)
1022 ac_prev=program_suffix ;;
1023 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1024 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026
1027 -program-transform-name | --program-transform-name \
1028 | --program-transform-nam | --program-transform-na \
1029 | --program-transform-n | --program-transform- \
1030 | --program-transform | --program-transfor \
1031 | --program-transfo | --program-transf \
1032 | --program-trans | --program-tran \
1033 | --progr-tra | --program-tr | --program-t)
1034 ac_prev=program_transform_name ;;
1035 -program-transform-name=* | --program-transform-name=* \
1036 | --program-transform-nam=* | --program-transform-na=* \
1037 | --program-transform-n=* | --program-transform-=* \
1038 | --program-transform=* | --program-transfor=* \
1039 | --program-transfo=* | --program-transf=* \
1040 | --program-trans=* | --program-tran=* \
1041 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001043
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001044 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1045 ac_prev=pdfdir ;;
1046 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1047 pdfdir=$ac_optarg ;;
1048
1049 -psdir | --psdir | --psdi | --psd | --ps)
1050 ac_prev=psdir ;;
1051 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1052 psdir=$ac_optarg ;;
1053
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1055 | -silent | --silent | --silen | --sile | --sil)
1056 silent=yes ;;
1057
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1059 ac_prev=sbindir ;;
1060 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1061 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063
1064 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1065 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1066 | --sharedst | --shareds | --shared | --share | --shar \
1067 | --sha | --sh)
1068 ac_prev=sharedstatedir ;;
1069 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1070 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1071 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1072 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001074
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001075 -site | --site | --sit)
1076 ac_prev=site ;;
1077 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1081 ac_prev=srcdir ;;
1082 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001085 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1086 | --syscon | --sysco | --sysc | --sys | --sy)
1087 ac_prev=sysconfdir ;;
1088 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1089 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
1097 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1098 verbose=yes ;;
1099
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 -version | --version | --versio | --versi | --vers | -V)
1101 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102
1103 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001104 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001105 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001106 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson79263252010-10-31 16:50:44 +00001107 as_fn_error "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001108 ac_useropt_orig=$ac_useropt
1109 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1110 case $ac_user_opts in
1111 *"
1112"with_$ac_useropt"
1113"*) ;;
1114 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1115 ac_unrecognized_sep=', ';;
1116 esac
1117 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001118
1119 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001120 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001121 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001122 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson79263252010-10-31 16:50:44 +00001123 as_fn_error "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001124 ac_useropt_orig=$ac_useropt
1125 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1126 case $ac_user_opts in
1127 *"
1128"with_$ac_useropt"
1129"*) ;;
1130 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1131 ac_unrecognized_sep=', ';;
1132 esac
1133 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001135 --x)
1136 # Obsolete; use --with-x.
1137 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001138
1139 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1140 | --x-incl | --x-inc | --x-in | --x-i)
1141 ac_prev=x_includes ;;
1142 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1143 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001144 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145
1146 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1147 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1148 ac_prev=x_libraries ;;
1149 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1150 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001151 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001152
Benjamin Peterson79263252010-10-31 16:50:44 +00001153 -*) as_fn_error "unrecognized option: \`$ac_option'
1154Try \`$0 --help' for more information."
Guido van Rossum7f43da71994-08-01 12:15:30 +00001155 ;;
1156
Martin v. Löwis11437992002-04-12 09:54:03 +00001157 *=*)
1158 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1159 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001160 case $ac_envvar in #(
1161 '' | [0-9]* | *[!_$as_cr_alnum]* )
Benjamin Peterson79263252010-10-31 16:50:44 +00001162 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001163 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001164 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 export $ac_envvar ;;
1166
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001167 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001168 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001169 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001171 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001172 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173 ;;
1174
1175 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001176done
1177
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Benjamin Peterson79263252010-10-31 16:50:44 +00001180 as_fn_error "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181fi
1182
Matthias Kloseb9621712010-04-24 17:59:49 +00001183if test -n "$ac_unrecognized_opts"; then
1184 case $enable_option_checking in
1185 no) ;;
Benjamin Peterson79263252010-10-31 16:50:44 +00001186 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001187 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1188 esac
1189fi
1190
1191# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001192for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1193 datadir sysconfdir sharedstatedir localstatedir includedir \
1194 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1195 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001196do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001197 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001198 # Remove trailing slashes.
1199 case $ac_val in
1200 */ )
1201 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1202 eval $ac_var=\$ac_val;;
1203 esac
1204 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001205 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001206 [\\/$]* | ?:[\\/]* ) continue;;
1207 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208 esac
Benjamin Peterson79263252010-10-31 16:50:44 +00001209 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001210done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001211
Martin v. Löwis11437992002-04-12 09:54:03 +00001212# There might be people who depend on the old broken behavior: `$host'
1213# used to hold the argument of --host etc.
1214# FIXME: To remove some day.
1215build=$build_alias
1216host=$host_alias
1217target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001218
Martin v. Löwis11437992002-04-12 09:54:03 +00001219# FIXME: To remove some day.
1220if test "x$host_alias" != x; then
1221 if test "x$build_alias" = x; then
1222 cross_compiling=maybe
Benjamin Peterson79263252010-10-31 16:50:44 +00001223 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1224 If a cross compiler is detected then cross compile mode will be used." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001225 elif test "x$build_alias" != "x$host_alias"; then
1226 cross_compiling=yes
1227 fi
1228fi
1229
1230ac_tool_prefix=
1231test -n "$host_alias" && ac_tool_prefix=$host_alias-
1232
1233test "$silent" = yes && exec 6>/dev/null
1234
Guido van Rossum627b2d71993-12-24 10:39:16 +00001235
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001236ac_pwd=`pwd` && test -n "$ac_pwd" &&
1237ac_ls_di=`ls -di .` &&
1238ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Benjamin Peterson79263252010-10-31 16:50:44 +00001239 as_fn_error "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001240test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Benjamin Peterson79263252010-10-31 16:50:44 +00001241 as_fn_error "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001242
1243
Guido van Rossum627b2d71993-12-24 10:39:16 +00001244# Find the source files, if location was not specified.
1245if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001247 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001248 ac_confdir=`$as_dirname -- "$as_myself" ||
1249$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1250 X"$as_myself" : 'X\(//\)[^/]' \| \
1251 X"$as_myself" : 'X\(//\)$' \| \
1252 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1253$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001254 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1255 s//\1/
1256 q
1257 }
1258 /^X\(\/\/\)[^/].*/{
1259 s//\1/
1260 q
1261 }
1262 /^X\(\/\/\)$/{
1263 s//\1/
1264 q
1265 }
1266 /^X\(\/\).*/{
1267 s//\1/
1268 q
1269 }
1270 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001272 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001273 srcdir=..
1274 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001275else
1276 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001278if test ! -r "$srcdir/$ac_unique_file"; then
1279 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Benjamin Peterson79263252010-10-31 16:50:44 +00001280 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001281fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001282ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1283ac_abs_confdir=`(
Benjamin Peterson79263252010-10-31 16:50:44 +00001284 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001285 pwd)`
1286# When building in place, set srcdir=.
1287if test "$ac_abs_confdir" = "$ac_pwd"; then
1288 srcdir=.
1289fi
1290# Remove unnecessary trailing slashes from srcdir.
1291# Double slashes in file names in object file debugging info
1292# mess up M-x gdb in Emacs.
1293case $srcdir in
1294*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1295esac
1296for ac_var in $ac_precious_vars; do
1297 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1298 eval ac_env_${ac_var}_value=\$${ac_var}
1299 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1300 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1301done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001302
Martin v. Löwis11437992002-04-12 09:54:03 +00001303#
1304# Report the --help message.
1305#
1306if test "$ac_init_help" = "long"; then
1307 # Omit some internal or obsolete options to make the list less imposing.
1308 # This message is too long to be a string in the A/UX 3.1 sh.
1309 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001310\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001311
1312Usage: $0 [OPTION]... [VAR=VALUE]...
1313
1314To assign environment variables (e.g., CC, CFLAGS...), specify them as
1315VAR=VALUE. See below for descriptions of some of the useful variables.
1316
1317Defaults for the options are specified in brackets.
1318
1319Configuration:
1320 -h, --help display this help and exit
1321 --help=short display options specific to this package
1322 --help=recursive display the short help of all the included packages
1323 -V, --version display version information and exit
Benjamin Peterson79263252010-10-31 16:50:44 +00001324 -q, --quiet, --silent do not print \`checking...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001325 --cache-file=FILE cache test results in FILE [disabled]
1326 -C, --config-cache alias for \`--cache-file=config.cache'
1327 -n, --no-create do not create output files
1328 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1329
Martin v. Löwis11437992002-04-12 09:54:03 +00001330Installation directories:
1331 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001332 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001333 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001334 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001335
1336By default, \`make install' will install all the files in
1337\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1338an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1339for instance \`--prefix=\$HOME'.
1340
1341For better control, use the options below.
1342
1343Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001344 --bindir=DIR user executables [EPREFIX/bin]
1345 --sbindir=DIR system admin executables [EPREFIX/sbin]
1346 --libexecdir=DIR program executables [EPREFIX/libexec]
1347 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1348 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1349 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1350 --libdir=DIR object code libraries [EPREFIX/lib]
1351 --includedir=DIR C header files [PREFIX/include]
1352 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1353 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1354 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1355 --infodir=DIR info documentation [DATAROOTDIR/info]
1356 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1357 --mandir=DIR man documentation [DATAROOTDIR/man]
1358 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1359 --htmldir=DIR html documentation [DOCDIR]
1360 --dvidir=DIR dvi documentation [DOCDIR]
1361 --pdfdir=DIR pdf documentation [DOCDIR]
1362 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001363_ACEOF
1364
1365 cat <<\_ACEOF
1366_ACEOF
1367fi
1368
1369if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001370 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001371 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001372 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001373 cat <<\_ACEOF
1374
1375Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001376 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001377 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1378 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001379 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001380 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001381 --enable-framework[=INSTALLDIR]
1382 Build (MacOSX|Darwin) framework
1383 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001384 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001385 --enable-loadable-sqlite-extensions
1386 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001387 --enable-ipv6 Enable ipv6 (with ipv4) support
1388 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001389 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001390 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001391
1392Optional Packages:
1393 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1394 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001395 --with-universal-archs=ARCH
1396 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001397 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001398 --with-framework-name=FRAMEWORK
1399 specify an alternate name of the framework built
1400 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001401 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001402 --with-cxx-main=<compiler>
1403 compile main() and link python executable with C++
1404 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001405 --with-suffix=.exe set executable suffix
1406 --with-pydebug build with Py_DEBUG defined
1407 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001408 --with-system-expat build pyexpat module using an installed expat
1409 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001410 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001411 --with-dbmliborder=db1:db2:...
1412 order to check db backends for dbm. Valid value is a
1413 colon separated string with the backend names
1414 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001415 --with-signal-module disable/enable signal module
1416 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1417 --with(out)-threads[=DIRECTORY]
1418 disable/enable thread support
1419 --with(out)-thread[=DIRECTORY]
1420 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001421 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001422 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001423 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001424 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001425 --with-fpectl enable SIGFPE catching
1426 --with-libm=STRING math library
1427 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001428 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001429 --with(out)-computed-gotos
1430 Use computed gotos in evaluation loop (enabled by
1431 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001432
1433Some influential environment variables:
1434 CC C compiler command
1435 CFLAGS C compiler flags
1436 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1437 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001438 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001439 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001440 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001441 CPP C preprocessor
1442
1443Use these variables to override the choices made by `configure' or to help
1444it to find libraries and programs with nonstandard names/locations.
1445
Georg Brandle2e15612009-05-20 18:25:10 +00001446Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001447_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001448ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001449fi
1450
1451if test "$ac_init_help" = "recursive"; then
1452 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001453 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001454 test -d "$ac_dir" ||
1455 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1456 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001457 ac_builddir=.
1458
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001459case "$ac_dir" in
1460.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1461*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001462 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001463 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001464 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001465 case $ac_top_builddir_sub in
1466 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1467 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1468 esac ;;
1469esac
1470ac_abs_top_builddir=$ac_pwd
1471ac_abs_builddir=$ac_pwd$ac_dir_suffix
1472# for backward compatibility:
1473ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001474
1475case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001476 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001477 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001478 ac_top_srcdir=$ac_top_builddir_sub
1479 ac_abs_top_srcdir=$ac_pwd ;;
1480 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001481 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001482 ac_top_srcdir=$srcdir
1483 ac_abs_top_srcdir=$srcdir ;;
1484 *) # Relative name.
1485 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1486 ac_top_srcdir=$ac_top_build_prefix$srcdir
1487 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001488esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001489ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001490
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001491 cd "$ac_dir" || { ac_status=$?; continue; }
1492 # Check for guested configure.
1493 if test -f "$ac_srcdir/configure.gnu"; then
1494 echo &&
1495 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1496 elif test -f "$ac_srcdir/configure"; then
1497 echo &&
1498 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001499 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001500 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001501 fi || ac_status=$?
1502 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001503 done
1504fi
1505
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001506test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001507if $ac_init_version; then
1508 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001509python configure 3.2
Benjamin Peterson79263252010-10-31 16:50:44 +00001510generated by GNU Autoconf 2.65
Martin v. Löwis11437992002-04-12 09:54:03 +00001511
Benjamin Peterson79263252010-10-31 16:50:44 +00001512Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001513This configure script is free software; the Free Software Foundation
1514gives unlimited permission to copy, distribute and modify it.
1515_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001516 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001517fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001518
1519## ------------------------ ##
1520## Autoconf initialization. ##
1521## ------------------------ ##
1522
1523# ac_fn_c_try_compile LINENO
1524# --------------------------
1525# Try to compile conftest.$ac_ext, and return whether this succeeded.
1526ac_fn_c_try_compile ()
1527{
1528 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1529 rm -f conftest.$ac_objext
1530 if { { ac_try="$ac_compile"
1531case "(($ac_try" in
1532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1533 *) ac_try_echo=$ac_try;;
1534esac
1535eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1536$as_echo "$ac_try_echo"; } >&5
1537 (eval "$ac_compile") 2>conftest.err
1538 ac_status=$?
1539 if test -s conftest.err; then
1540 grep -v '^ *+' conftest.err >conftest.er1
1541 cat conftest.er1 >&5
1542 mv -f conftest.er1 conftest.err
1543 fi
1544 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1545 test $ac_status = 0; } && {
1546 test -z "$ac_c_werror_flag" ||
1547 test ! -s conftest.err
1548 } && test -s conftest.$ac_objext; then :
1549 ac_retval=0
1550else
1551 $as_echo "$as_me: failed program was:" >&5
1552sed 's/^/| /' conftest.$ac_ext >&5
1553
1554 ac_retval=1
1555fi
1556 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1557 as_fn_set_status $ac_retval
1558
1559} # ac_fn_c_try_compile
1560
1561# ac_fn_c_try_cpp LINENO
1562# ----------------------
1563# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1564ac_fn_c_try_cpp ()
1565{
1566 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1567 if { { ac_try="$ac_cpp conftest.$ac_ext"
1568case "(($ac_try" in
1569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1570 *) ac_try_echo=$ac_try;;
1571esac
1572eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1573$as_echo "$ac_try_echo"; } >&5
1574 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1575 ac_status=$?
1576 if test -s conftest.err; then
1577 grep -v '^ *+' conftest.err >conftest.er1
1578 cat conftest.er1 >&5
1579 mv -f conftest.er1 conftest.err
1580 fi
1581 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Benjamin Peterson79263252010-10-31 16:50:44 +00001582 test $ac_status = 0; } >/dev/null && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001583 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1584 test ! -s conftest.err
1585 }; then :
1586 ac_retval=0
1587else
1588 $as_echo "$as_me: failed program was:" >&5
1589sed 's/^/| /' conftest.$ac_ext >&5
1590
1591 ac_retval=1
1592fi
1593 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1594 as_fn_set_status $ac_retval
1595
1596} # ac_fn_c_try_cpp
1597
1598# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1599# -------------------------------------------------------
1600# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1601# the include files in INCLUDES and setting the cache variable VAR
1602# accordingly.
1603ac_fn_c_check_header_mongrel ()
1604{
1605 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Benjamin Peterson79263252010-10-31 16:50:44 +00001606 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1608$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +00001609if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001610 $as_echo_n "(cached) " >&6
1611fi
1612eval ac_res=\$$3
1613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1614$as_echo "$ac_res" >&6; }
1615else
1616 # Is the header compilable?
1617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1618$as_echo_n "checking $2 usability... " >&6; }
1619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1620/* end confdefs.h. */
1621$4
1622#include <$2>
1623_ACEOF
1624if ac_fn_c_try_compile "$LINENO"; then :
1625 ac_header_compiler=yes
1626else
1627 ac_header_compiler=no
1628fi
1629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1631$as_echo "$ac_header_compiler" >&6; }
1632
1633# Is the header present?
1634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1635$as_echo_n "checking $2 presence... " >&6; }
1636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1637/* end confdefs.h. */
1638#include <$2>
1639_ACEOF
1640if ac_fn_c_try_cpp "$LINENO"; then :
1641 ac_header_preproc=yes
1642else
1643 ac_header_preproc=no
1644fi
Benjamin Peterson79263252010-10-31 16:50:44 +00001645rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1647$as_echo "$ac_header_preproc" >&6; }
1648
1649# So? What about this header?
1650case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1651 yes:no: )
1652 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1653$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1654 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1655$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1656 ;;
1657 no:yes:* )
1658 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1659$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1660 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1661$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1662 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1663$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1664 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1665$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1666 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1667$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00001668( cat <<\_ASBOX
1669## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001670## Report this to http://bugs.python.org/ ##
Benjamin Peterson79263252010-10-31 16:50:44 +00001671## -------------------------------------- ##
1672_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +00001673 ) | sed "s/^/$as_me: WARNING: /" >&2
1674 ;;
1675esac
1676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1677$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +00001678if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001679 $as_echo_n "(cached) " >&6
1680else
1681 eval "$3=\$ac_header_compiler"
1682fi
1683eval ac_res=\$$3
1684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1685$as_echo "$ac_res" >&6; }
1686fi
1687 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1688
1689} # ac_fn_c_check_header_mongrel
1690
1691# ac_fn_c_try_run LINENO
1692# ----------------------
1693# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1694# that executables *can* be run.
1695ac_fn_c_try_run ()
1696{
1697 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1698 if { { ac_try="$ac_link"
1699case "(($ac_try" in
1700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1701 *) ac_try_echo=$ac_try;;
1702esac
1703eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1704$as_echo "$ac_try_echo"; } >&5
1705 (eval "$ac_link") 2>&5
1706 ac_status=$?
1707 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1708 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1709 { { case "(($ac_try" in
1710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1711 *) ac_try_echo=$ac_try;;
1712esac
1713eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1714$as_echo "$ac_try_echo"; } >&5
1715 (eval "$ac_try") 2>&5
1716 ac_status=$?
1717 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1718 test $ac_status = 0; }; }; then :
1719 ac_retval=0
1720else
1721 $as_echo "$as_me: program exited with status $ac_status" >&5
1722 $as_echo "$as_me: failed program was:" >&5
1723sed 's/^/| /' conftest.$ac_ext >&5
1724
1725 ac_retval=$ac_status
1726fi
1727 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1728 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1729 as_fn_set_status $ac_retval
1730
1731} # ac_fn_c_try_run
1732
1733# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1734# -------------------------------------------------------
1735# Tests whether HEADER exists and can be compiled using the include files in
1736# INCLUDES, setting the cache variable VAR accordingly.
1737ac_fn_c_check_header_compile ()
1738{
1739 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1741$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +00001742if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001743 $as_echo_n "(cached) " >&6
1744else
1745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1746/* end confdefs.h. */
1747$4
1748#include <$2>
1749_ACEOF
1750if ac_fn_c_try_compile "$LINENO"; then :
1751 eval "$3=yes"
1752else
1753 eval "$3=no"
1754fi
1755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1756fi
1757eval ac_res=\$$3
1758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1759$as_echo "$ac_res" >&6; }
1760 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1761
1762} # ac_fn_c_check_header_compile
1763
1764# ac_fn_c_try_link LINENO
1765# -----------------------
1766# Try to link conftest.$ac_ext, and return whether this succeeded.
1767ac_fn_c_try_link ()
1768{
1769 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1770 rm -f conftest.$ac_objext conftest$ac_exeext
1771 if { { ac_try="$ac_link"
1772case "(($ac_try" in
1773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1774 *) ac_try_echo=$ac_try;;
1775esac
1776eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1777$as_echo "$ac_try_echo"; } >&5
1778 (eval "$ac_link") 2>conftest.err
1779 ac_status=$?
1780 if test -s conftest.err; then
1781 grep -v '^ *+' conftest.err >conftest.er1
1782 cat conftest.er1 >&5
1783 mv -f conftest.er1 conftest.err
1784 fi
1785 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1786 test $ac_status = 0; } && {
1787 test -z "$ac_c_werror_flag" ||
1788 test ! -s conftest.err
1789 } && test -s conftest$ac_exeext && {
1790 test "$cross_compiling" = yes ||
1791 $as_test_x conftest$ac_exeext
1792 }; then :
1793 ac_retval=0
1794else
1795 $as_echo "$as_me: failed program was:" >&5
1796sed 's/^/| /' conftest.$ac_ext >&5
1797
1798 ac_retval=1
1799fi
1800 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1801 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1802 # interfere with the next link command; also delete a directory that is
1803 # left behind by Apple's compiler. We do this before executing the actions.
1804 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1805 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1806 as_fn_set_status $ac_retval
1807
1808} # ac_fn_c_try_link
1809
1810# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1811# -------------------------------------------
1812# Tests whether TYPE exists after having included INCLUDES, setting cache
1813# variable VAR accordingly.
1814ac_fn_c_check_type ()
1815{
1816 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1818$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +00001819if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001820 $as_echo_n "(cached) " >&6
1821else
1822 eval "$3=no"
1823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1824/* end confdefs.h. */
1825$4
1826int
1827main ()
1828{
1829if (sizeof ($2))
1830 return 0;
1831 ;
1832 return 0;
1833}
1834_ACEOF
1835if ac_fn_c_try_compile "$LINENO"; then :
1836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1837/* end confdefs.h. */
1838$4
1839int
1840main ()
1841{
1842if (sizeof (($2)))
1843 return 0;
1844 ;
1845 return 0;
1846}
1847_ACEOF
1848if ac_fn_c_try_compile "$LINENO"; then :
1849
1850else
1851 eval "$3=yes"
1852fi
1853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1854fi
1855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1856fi
1857eval ac_res=\$$3
1858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1859$as_echo "$ac_res" >&6; }
1860 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1861
1862} # ac_fn_c_check_type
1863
1864# ac_fn_c_find_uintX_t LINENO BITS VAR
1865# ------------------------------------
1866# Finds an unsigned integer type with width BITS, setting cache variable VAR
1867# accordingly.
1868ac_fn_c_find_uintX_t ()
1869{
1870 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1872$as_echo_n "checking for uint$2_t... " >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +00001873if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001874 $as_echo_n "(cached) " >&6
1875else
1876 eval "$3=no"
1877 # Order is important - never check a type that is potentially smaller
1878 # than half of the expected target width.
1879 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1880 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1882/* end confdefs.h. */
1883$ac_includes_default
1884int
1885main ()
1886{
1887static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1888test_array [0] = 0
1889
1890 ;
1891 return 0;
1892}
1893_ACEOF
1894if ac_fn_c_try_compile "$LINENO"; then :
1895 case $ac_type in #(
1896 uint$2_t) :
1897 eval "$3=yes" ;; #(
1898 *) :
1899 eval "$3=\$ac_type" ;;
1900esac
1901fi
1902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson79263252010-10-31 16:50:44 +00001903 eval as_val=\$$3
1904 if test "x$as_val" = x""no; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001905
1906else
1907 break
1908fi
1909 done
1910fi
1911eval ac_res=\$$3
1912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1913$as_echo "$ac_res" >&6; }
1914 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1915
1916} # ac_fn_c_find_uintX_t
1917
1918# ac_fn_c_find_intX_t LINENO BITS VAR
1919# -----------------------------------
1920# Finds a signed integer type with width BITS, setting cache variable VAR
1921# accordingly.
1922ac_fn_c_find_intX_t ()
1923{
1924 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1926$as_echo_n "checking for int$2_t... " >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +00001927if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001928 $as_echo_n "(cached) " >&6
1929else
1930 eval "$3=no"
1931 # Order is important - never check a type that is potentially smaller
1932 # than half of the expected target width.
1933 for ac_type in int$2_t 'int' 'long int' \
1934 'long long int' 'short int' 'signed char'; do
1935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1936/* end confdefs.h. */
1937$ac_includes_default
Barry Warsaw278266f2010-10-14 17:38:46 +00001938 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001939int
1940main ()
1941{
Barry Warsaw278266f2010-10-14 17:38:46 +00001942static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001943test_array [0] = 0
1944
1945 ;
1946 return 0;
1947}
1948_ACEOF
1949if ac_fn_c_try_compile "$LINENO"; then :
1950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1951/* end confdefs.h. */
1952$ac_includes_default
Barry Warsaw278266f2010-10-14 17:38:46 +00001953 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001954int
1955main ()
1956{
Barry Warsaw278266f2010-10-14 17:38:46 +00001957static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001958 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1959test_array [0] = 0
1960
1961 ;
1962 return 0;
1963}
1964_ACEOF
1965if ac_fn_c_try_compile "$LINENO"; then :
1966
1967else
1968 case $ac_type in #(
1969 int$2_t) :
1970 eval "$3=yes" ;; #(
1971 *) :
1972 eval "$3=\$ac_type" ;;
1973esac
1974fi
1975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1976fi
1977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson79263252010-10-31 16:50:44 +00001978 eval as_val=\$$3
1979 if test "x$as_val" = x""no; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001980
1981else
1982 break
1983fi
1984 done
1985fi
1986eval ac_res=\$$3
1987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1988$as_echo "$ac_res" >&6; }
1989 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1990
1991} # ac_fn_c_find_intX_t
1992
1993# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1994# --------------------------------------------
1995# Tries to find the compile-time value of EXPR in a program that includes
1996# INCLUDES, setting VAR accordingly. Returns whether the value could be
1997# computed
1998ac_fn_c_compute_int ()
1999{
2000 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2001 if test "$cross_compiling" = yes; then
2002 # Depending upon the size, compute the lo and hi bounds.
2003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2004/* end confdefs.h. */
2005$4
2006int
2007main ()
2008{
2009static int test_array [1 - 2 * !(($2) >= 0)];
2010test_array [0] = 0
2011
2012 ;
2013 return 0;
2014}
2015_ACEOF
2016if ac_fn_c_try_compile "$LINENO"; then :
2017 ac_lo=0 ac_mid=0
2018 while :; do
2019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2020/* end confdefs.h. */
2021$4
2022int
2023main ()
2024{
2025static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2026test_array [0] = 0
2027
2028 ;
2029 return 0;
2030}
2031_ACEOF
2032if ac_fn_c_try_compile "$LINENO"; then :
2033 ac_hi=$ac_mid; break
2034else
2035 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2036 if test $ac_lo -le $ac_mid; then
2037 ac_lo= ac_hi=
2038 break
2039 fi
2040 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2041fi
2042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2043 done
2044else
2045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2046/* end confdefs.h. */
2047$4
2048int
2049main ()
2050{
2051static int test_array [1 - 2 * !(($2) < 0)];
2052test_array [0] = 0
2053
2054 ;
2055 return 0;
2056}
2057_ACEOF
2058if ac_fn_c_try_compile "$LINENO"; then :
2059 ac_hi=-1 ac_mid=-1
2060 while :; do
2061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2062/* end confdefs.h. */
2063$4
2064int
2065main ()
2066{
2067static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2068test_array [0] = 0
2069
2070 ;
2071 return 0;
2072}
2073_ACEOF
2074if ac_fn_c_try_compile "$LINENO"; then :
2075 ac_lo=$ac_mid; break
2076else
2077 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2078 if test $ac_mid -le $ac_hi; then
2079 ac_lo= ac_hi=
2080 break
2081 fi
2082 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2083fi
2084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2085 done
2086else
2087 ac_lo= ac_hi=
2088fi
2089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2090fi
2091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2092# Binary search between lo and hi bounds.
2093while test "x$ac_lo" != "x$ac_hi"; do
2094 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2096/* end confdefs.h. */
2097$4
2098int
2099main ()
2100{
2101static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2102test_array [0] = 0
2103
2104 ;
2105 return 0;
2106}
2107_ACEOF
2108if ac_fn_c_try_compile "$LINENO"; then :
2109 ac_hi=$ac_mid
2110else
2111 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2112fi
2113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2114done
2115case $ac_lo in #((
2116?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2117'') ac_retval=1 ;;
2118esac
2119 else
2120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121/* end confdefs.h. */
2122$4
2123static long int longval () { return $2; }
2124static unsigned long int ulongval () { return $2; }
2125#include <stdio.h>
2126#include <stdlib.h>
2127int
2128main ()
2129{
2130
2131 FILE *f = fopen ("conftest.val", "w");
2132 if (! f)
2133 return 1;
2134 if (($2) < 0)
2135 {
2136 long int i = longval ();
2137 if (i != ($2))
2138 return 1;
2139 fprintf (f, "%ld", i);
2140 }
2141 else
2142 {
2143 unsigned long int i = ulongval ();
2144 if (i != ($2))
2145 return 1;
2146 fprintf (f, "%lu", i);
2147 }
2148 /* Do not output a trailing newline, as this causes \r\n confusion
2149 on some platforms. */
2150 return ferror (f) || fclose (f) != 0;
2151
2152 ;
2153 return 0;
2154}
2155_ACEOF
2156if ac_fn_c_try_run "$LINENO"; then :
2157 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2158else
2159 ac_retval=1
2160fi
2161rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2162 conftest.$ac_objext conftest.beam conftest.$ac_ext
2163rm -f conftest.val
2164
2165 fi
2166 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2167 as_fn_set_status $ac_retval
2168
2169} # ac_fn_c_compute_int
2170
2171# ac_fn_c_check_func LINENO FUNC VAR
2172# ----------------------------------
2173# Tests whether FUNC exists, setting the cache variable VAR accordingly
2174ac_fn_c_check_func ()
2175{
2176 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2178$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +00002179if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002180 $as_echo_n "(cached) " >&6
2181else
2182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2183/* end confdefs.h. */
2184/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2185 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2186#define $2 innocuous_$2
2187
2188/* System header to define __stub macros and hopefully few prototypes,
2189 which can conflict with char $2 (); below.
2190 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2191 <limits.h> exists even on freestanding compilers. */
2192
2193#ifdef __STDC__
2194# include <limits.h>
2195#else
2196# include <assert.h>
2197#endif
2198
2199#undef $2
2200
2201/* Override any GCC internal prototype to avoid an error.
2202 Use char because int might match the return type of a GCC
2203 builtin and then its argument prototype would still apply. */
2204#ifdef __cplusplus
2205extern "C"
2206#endif
2207char $2 ();
2208/* The GNU C library defines this for functions which it implements
2209 to always fail with ENOSYS. Some functions are actually named
2210 something starting with __ and the normal name is an alias. */
2211#if defined __stub_$2 || defined __stub___$2
2212choke me
2213#endif
2214
2215int
2216main ()
2217{
2218return $2 ();
2219 ;
2220 return 0;
2221}
2222_ACEOF
2223if ac_fn_c_try_link "$LINENO"; then :
2224 eval "$3=yes"
2225else
2226 eval "$3=no"
2227fi
2228rm -f core conftest.err conftest.$ac_objext \
2229 conftest$ac_exeext conftest.$ac_ext
2230fi
2231eval ac_res=\$$3
2232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2233$as_echo "$ac_res" >&6; }
2234 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2235
2236} # ac_fn_c_check_func
2237
2238# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2239# ----------------------------------------------------
2240# Tries to find if the field MEMBER exists in type AGGR, after including
2241# INCLUDES, setting cache variable VAR accordingly.
2242ac_fn_c_check_member ()
2243{
2244 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2246$as_echo_n "checking for $2.$3... " >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +00002247if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002248 $as_echo_n "(cached) " >&6
2249else
2250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2251/* end confdefs.h. */
2252$5
2253int
2254main ()
2255{
2256static $2 ac_aggr;
2257if (ac_aggr.$3)
2258return 0;
2259 ;
2260 return 0;
2261}
2262_ACEOF
2263if ac_fn_c_try_compile "$LINENO"; then :
2264 eval "$4=yes"
2265else
2266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2267/* end confdefs.h. */
2268$5
2269int
2270main ()
2271{
2272static $2 ac_aggr;
2273if (sizeof ac_aggr.$3)
2274return 0;
2275 ;
2276 return 0;
2277}
2278_ACEOF
2279if ac_fn_c_try_compile "$LINENO"; then :
2280 eval "$4=yes"
2281else
2282 eval "$4=no"
2283fi
2284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2285fi
2286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2287fi
2288eval ac_res=\$$4
2289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2290$as_echo "$ac_res" >&6; }
2291 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2292
2293} # ac_fn_c_check_member
2294
Benjamin Peterson79263252010-10-31 16:50:44 +00002295# ac_fn_c_check_decl LINENO SYMBOL VAR
2296# ------------------------------------
2297# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002298ac_fn_c_check_decl ()
2299{
2300 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Benjamin Peterson79263252010-10-31 16:50:44 +00002301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2302$as_echo_n "checking whether $2 is declared... " >&6; }
2303if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002304 $as_echo_n "(cached) " >&6
2305else
2306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2307/* end confdefs.h. */
2308$4
2309int
2310main ()
2311{
Benjamin Peterson79263252010-10-31 16:50:44 +00002312#ifndef $2
2313 (void) $2;
Matthias Kloseb9621712010-04-24 17:59:49 +00002314#endif
2315
2316 ;
2317 return 0;
2318}
2319_ACEOF
2320if ac_fn_c_try_compile "$LINENO"; then :
2321 eval "$3=yes"
2322else
2323 eval "$3=no"
2324fi
2325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2326fi
2327eval ac_res=\$$3
2328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2329$as_echo "$ac_res" >&6; }
2330 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2331
2332} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002333cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002334This file contains any messages produced by compilers while
2335running configure, to aid debugging if configure makes a mistake.
2336
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002337It was created by python $as_me 3.2, which was
Benjamin Peterson79263252010-10-31 16:50:44 +00002338generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002339
2340 $ $0 $@
2341
2342_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002343exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002344{
2345cat <<_ASUNAME
2346## --------- ##
2347## Platform. ##
2348## --------- ##
2349
2350hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2351uname -m = `(uname -m) 2>/dev/null || echo unknown`
2352uname -r = `(uname -r) 2>/dev/null || echo unknown`
2353uname -s = `(uname -s) 2>/dev/null || echo unknown`
2354uname -v = `(uname -v) 2>/dev/null || echo unknown`
2355
2356/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2357/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2358
2359/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2360/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2361/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002362/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002363/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2364/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2365/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2366
2367_ASUNAME
2368
2369as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2370for as_dir in $PATH
2371do
2372 IFS=$as_save_IFS
2373 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002374 $as_echo "PATH: $as_dir"
2375 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002376IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002377
2378} >&5
2379
2380cat >&5 <<_ACEOF
2381
2382
2383## ----------- ##
2384## Core tests. ##
2385## ----------- ##
2386
2387_ACEOF
2388
2389
2390# Keep a trace of the command line.
2391# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002392# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002393# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002394# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002395ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002396ac_configure_args0=
2397ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002398ac_must_keep_next=false
2399for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002400do
Skip Montanaro6dead952003-09-25 14:50:04 +00002401 for ac_arg
2402 do
2403 case $ac_arg in
2404 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2405 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2406 | -silent | --silent | --silen | --sile | --sil)
2407 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002408 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002409 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002410 esac
2411 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002412 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002413 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002414 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002415 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002416 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002417 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002418 case $ac_arg in
2419 *=* | --config-cache | -C | -disable-* | --disable-* \
2420 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2421 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2422 | -with-* | --with-* | -without-* | --without-* | --x)
2423 case "$ac_configure_args0 " in
2424 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2425 esac
2426 ;;
2427 -* ) ac_must_keep_next=true ;;
2428 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002429 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002430 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002431 ;;
2432 esac
2433 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002434done
Matthias Kloseb9621712010-04-24 17:59:49 +00002435{ ac_configure_args0=; unset ac_configure_args0;}
2436{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002437
2438# When interrupted or exit'd, cleanup temporary files, and complete
2439# config.log. We remove comments because anyway the quotes in there
2440# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002441# WARNING: Use '\'' to represent an apostrophe within the trap.
2442# 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 +00002443trap 'exit_status=$?
2444 # Save into config.log some information that might help in debugging.
2445 {
2446 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002447
Benjamin Peterson79263252010-10-31 16:50:44 +00002448 cat <<\_ASBOX
2449## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002450## Cache variables. ##
Benjamin Peterson79263252010-10-31 16:50:44 +00002451## ---------------- ##
2452_ASBOX
Martin v. Löwis11437992002-04-12 09:54:03 +00002453 echo
2454 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002455(
2456 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2457 eval ac_val=\$$ac_var
2458 case $ac_val in #(
2459 *${as_nl}*)
2460 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002461 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2462$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002463 esac
2464 case $ac_var in #(
2465 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002466 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2467 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468 esac ;;
2469 esac
2470 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002471 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2473 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002474 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 "s/'\''/'\''\\\\'\'''\''/g;
2476 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2477 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002478 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002479 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002480 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002481 esac |
2482 sort
2483)
Martin v. Löwis11437992002-04-12 09:54:03 +00002484 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002485
Benjamin Peterson79263252010-10-31 16:50:44 +00002486 cat <<\_ASBOX
2487## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002488## Output variables. ##
Benjamin Peterson79263252010-10-31 16:50:44 +00002489## ----------------- ##
2490_ASBOX
Skip Montanaro6dead952003-09-25 14:50:04 +00002491 echo
2492 for ac_var in $ac_subst_vars
2493 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 eval ac_val=\$$ac_var
2495 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002496 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002498 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002499 done | sort
2500 echo
2501
2502 if test -n "$ac_subst_files"; then
Benjamin Peterson79263252010-10-31 16:50:44 +00002503 cat <<\_ASBOX
2504## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002505## File substitutions. ##
Benjamin Peterson79263252010-10-31 16:50:44 +00002506## ------------------- ##
2507_ASBOX
Skip Montanaro6dead952003-09-25 14:50:04 +00002508 echo
2509 for ac_var in $ac_subst_files
2510 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002511 eval ac_val=\$$ac_var
2512 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002513 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002515 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002516 done | sort
2517 echo
2518 fi
2519
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 if test -s confdefs.h; then
Benjamin Peterson79263252010-10-31 16:50:44 +00002521 cat <<\_ASBOX
2522## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002523## confdefs.h. ##
Benjamin Peterson79263252010-10-31 16:50:44 +00002524## ----------- ##
2525_ASBOX
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 echo
2529 fi
2530 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002531 $as_echo "$as_me: caught signal $ac_signal"
2532 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002534 rm -f core *.core core.conftest.* &&
2535 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002538for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002539 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002540done
2541ac_signal=0
2542
2543# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002544rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002545
Matthias Kloseb9621712010-04-24 17:59:49 +00002546$as_echo "/* confdefs.h */" > confdefs.h
2547
Martin v. Löwis11437992002-04-12 09:54:03 +00002548# Predefined preprocessor variables.
2549
2550cat >>confdefs.h <<_ACEOF
2551#define PACKAGE_NAME "$PACKAGE_NAME"
2552_ACEOF
2553
Martin v. Löwis11437992002-04-12 09:54:03 +00002554cat >>confdefs.h <<_ACEOF
2555#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2556_ACEOF
2557
Martin v. Löwis11437992002-04-12 09:54:03 +00002558cat >>confdefs.h <<_ACEOF
2559#define PACKAGE_VERSION "$PACKAGE_VERSION"
2560_ACEOF
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562cat >>confdefs.h <<_ACEOF
2563#define PACKAGE_STRING "$PACKAGE_STRING"
2564_ACEOF
2565
Martin v. Löwis11437992002-04-12 09:54:03 +00002566cat >>confdefs.h <<_ACEOF
2567#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2568_ACEOF
2569
Matthias Kloseb9621712010-04-24 17:59:49 +00002570cat >>confdefs.h <<_ACEOF
2571#define PACKAGE_URL "$PACKAGE_URL"
2572_ACEOF
2573
Martin v. Löwis11437992002-04-12 09:54:03 +00002574
2575# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002576# Prefer an explicitly selected file to automatically selected ones.
2577ac_site_file1=NONE
2578ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579if test -n "$CONFIG_SITE"; then
Benjamin Peterson79263252010-10-31 16:50:44 +00002580 ac_site_file1=$CONFIG_SITE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002581elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002582 ac_site_file1=$prefix/share/config.site
2583 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584else
Matthias Kloseb9621712010-04-24 17:59:49 +00002585 ac_site_file1=$ac_default_prefix/share/config.site
2586 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002587fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002588for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589do
Matthias Kloseb9621712010-04-24 17:59:49 +00002590 test "x$ac_site_file" = xNONE && continue
2591 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2592 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2593$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002594 sed 's/^/| /' "$ac_site_file" >&5
Benjamin Peterson79263252010-10-31 16:50:44 +00002595 . "$ac_site_file"
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;}
Benjamin Peterson79263252010-10-31 16:50:44 +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
Benjamin Peterson79263252010-10-31 16:50:44 +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
Benjamin Peterson79263252010-10-31 16:50:44 +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;}
Benjamin Peterson79263252010-10-31 16:50:44 +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;}
Benjamin Peterson79263252010-10-31 16:50:44 +00003589{ as_fn_set_status 77
3590as_fn_error "C compiler cannot create executables
3591See \`config.log' for more details." "$LINENO" 5; }; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003592else
3593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3594$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003595fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3597$as_echo_n "checking for C compiler default output file name... " >&6; }
3598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3599$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003600ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003601
Matthias Kloseb9621712010-04-24 17:59:49 +00003602rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003603ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3605$as_echo_n "checking for suffix of executables... " >&6; }
3606if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003607case "(($ac_try" in
3608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3609 *) ac_try_echo=$ac_try;;
3610esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003611eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3612$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003613 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003614 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003615 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3616 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003617 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3618# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3619# work properly (i.e., refer to `conftest.exe'), while it won't with
3620# `rm'.
3621for ac_file in conftest.exe conftest conftest.*; do
3622 test -f "$ac_file" || continue
3623 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003625 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3626 break;;
3627 * ) break;;
3628 esac
3629done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003630else
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3632$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00003633as_fn_error "cannot compute suffix of executables: cannot compile and link
3634See \`config.log' for more details." "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003635fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003636rm -f conftest conftest$ac_cv_exeext
3637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3638$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003639
3640rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003641EXEEXT=$ac_cv_exeext
3642ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3644/* end confdefs.h. */
3645#include <stdio.h>
3646int
3647main ()
3648{
3649FILE *f = fopen ("conftest.out", "w");
3650 return ferror (f) || fclose (f) != 0;
3651
3652 ;
3653 return 0;
3654}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003655_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003656ac_clean_files="$ac_clean_files conftest.out"
3657# Check that the compiler produces executables we can run. If not, either
3658# the compiler is broken, or we cross compile.
3659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3660$as_echo_n "checking whether we are cross compiling... " >&6; }
3661if test "$cross_compiling" != yes; then
3662 { { ac_try="$ac_link"
3663case "(($ac_try" in
3664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3665 *) ac_try_echo=$ac_try;;
3666esac
3667eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3668$as_echo "$ac_try_echo"; } >&5
3669 (eval "$ac_link") 2>&5
3670 ac_status=$?
3671 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3672 test $ac_status = 0; }
3673 if { ac_try='./conftest$ac_cv_exeext'
3674 { { case "(($ac_try" in
3675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3676 *) ac_try_echo=$ac_try;;
3677esac
3678eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3679$as_echo "$ac_try_echo"; } >&5
3680 (eval "$ac_try") 2>&5
3681 ac_status=$?
3682 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3683 test $ac_status = 0; }; }; then
3684 cross_compiling=no
3685 else
3686 if test "$cross_compiling" = maybe; then
3687 cross_compiling=yes
3688 else
3689 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3690$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00003691as_fn_error "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003692If you meant to cross compile, use \`--host'.
Benjamin Peterson79263252010-10-31 16:50:44 +00003693See \`config.log' for more details." "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003694 fi
3695 fi
3696fi
3697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3698$as_echo "$cross_compiling" >&6; }
3699
3700rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3701ac_clean_files=$ac_clean_files_save
3702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3703$as_echo_n "checking for suffix of object files... " >&6; }
3704if test "${ac_cv_objext+set}" = set; then :
3705 $as_echo_n "(cached) " >&6
3706else
3707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003708/* end confdefs.h. */
3709
3710int
3711main ()
3712{
3713
3714 ;
3715 return 0;
3716}
3717_ACEOF
3718rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003719if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003720case "(($ac_try" in
3721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3722 *) ac_try_echo=$ac_try;;
3723esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003724eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3725$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003726 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003727 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003728 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3729 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003730 for ac_file in conftest.o conftest.obj conftest.*; do
3731 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003732 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003733 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003734 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3735 break;;
3736 esac
3737done
3738else
Matthias Kloseb9621712010-04-24 17:59:49 +00003739 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003740sed 's/^/| /' conftest.$ac_ext >&5
3741
Matthias Kloseb9621712010-04-24 17:59:49 +00003742{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3743$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00003744as_fn_error "cannot compute suffix of object files: cannot compile
3745See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003746fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003747rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003748fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3750$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003751OBJEXT=$ac_cv_objext
3752ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3754$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3755if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3756 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003757else
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003759/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003760
Martin v. Löwis11437992002-04-12 09:54:03 +00003761int
3762main ()
3763{
3764#ifndef __GNUC__
3765 choke me
3766#endif
3767
3768 ;
3769 return 0;
3770}
3771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003772if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003773 ac_compiler_gnu=yes
3774else
Matthias Kloseb9621712010-04-24 17:59:49 +00003775 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003776fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003778ac_cv_c_compiler_gnu=$ac_compiler_gnu
3779
3780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3782$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3783if test $ac_compiler_gnu = yes; then
3784 GCC=yes
3785else
3786 GCC=
3787fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003788ac_test_CFLAGS=${CFLAGS+set}
3789ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3791$as_echo_n "checking whether $CC accepts -g... " >&6; }
3792if test "${ac_cv_prog_cc_g+set}" = set; then :
3793 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003794else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003795 ac_save_c_werror_flag=$ac_c_werror_flag
3796 ac_c_werror_flag=yes
3797 ac_cv_prog_cc_g=no
3798 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003800/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003801
Martin v. Löwis11437992002-04-12 09:54:03 +00003802int
3803main ()
3804{
3805
3806 ;
3807 return 0;
3808}
3809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003810if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003811 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003812else
Matthias Kloseb9621712010-04-24 17:59:49 +00003813 CFLAGS=""
3814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003815/* end confdefs.h. */
3816
3817int
3818main ()
3819{
3820
3821 ;
3822 return 0;
3823}
3824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003825if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003826
Matthias Kloseb9621712010-04-24 17:59:49 +00003827else
3828 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003829 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003831/* end confdefs.h. */
3832
3833int
3834main ()
3835{
3836
3837 ;
3838 return 0;
3839}
3840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003841if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003842 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003845fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3847fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3849 ac_c_werror_flag=$ac_save_c_werror_flag
3850fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3852$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003853if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003854 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003855elif test $ac_cv_prog_cc_g = yes; then
3856 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003857 CFLAGS="-g -O2"
3858 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003859 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003860 fi
3861else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003862 if test "$GCC" = yes; then
3863 CFLAGS="-O2"
3864 else
3865 CFLAGS=
3866 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003867fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3869$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3870if test "${ac_cv_prog_cc_c89+set}" = set; then :
3871 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003872else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003873 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003874ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003876/* end confdefs.h. */
3877#include <stdarg.h>
3878#include <stdio.h>
3879#include <sys/types.h>
3880#include <sys/stat.h>
3881/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3882struct buf { int x; };
3883FILE * (*rcsopen) (struct buf *, struct stat *, int);
3884static char *e (p, i)
3885 char **p;
3886 int i;
3887{
3888 return p[i];
3889}
3890static char *f (char * (*g) (char **, int), char **p, ...)
3891{
3892 char *s;
3893 va_list v;
3894 va_start (v,p);
3895 s = g (p, va_arg (v,int));
3896 va_end (v);
3897 return s;
3898}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003899
3900/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3901 function prototypes and stuff, but not '\xHH' hex character constants.
3902 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003903 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003904 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3905 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003906 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003907int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3908
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003909/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3910 inside strings and character constants. */
3911#define FOO(x) 'x'
3912int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3913
Skip Montanaro6dead952003-09-25 14:50:04 +00003914int test (int i, double x);
3915struct s1 {int (*f) (int a);};
3916struct s2 {int (*f) (double a);};
3917int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3918int argc;
3919char **argv;
3920int
3921main ()
3922{
3923return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3924 ;
3925 return 0;
3926}
3927_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003928for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3929 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003930do
3931 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003932 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003933 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003934fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003935rm -f core conftest.err conftest.$ac_objext
3936 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003937done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003938rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003939CC=$ac_save_CC
3940
3941fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003942# AC_CACHE_VAL
3943case "x$ac_cv_prog_cc_c89" in
3944 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3946$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003947 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3949$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003950 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3953$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003954esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003955if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003956
Matthias Kloseb9621712010-04-24 17:59:49 +00003957fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003958
Martin v. Löwis11437992002-04-12 09:54:03 +00003959ac_ext=c
3960ac_cpp='$CPP $CPPFLAGS'
3961ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3962ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3963ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003964
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003965
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003966
3967
Matthias Kloseb9621712010-04-24 17:59:49 +00003968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3969$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003970
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003971# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003972if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003973 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003974
3975 case $withval in
3976 no) with_cxx_main=no
3977 MAINCC='$(CC)';;
3978 yes) with_cxx_main=yes
3979 MAINCC='$(CXX)';;
3980 *) with_cxx_main=yes
3981 MAINCC=$withval
3982 if test -z "$CXX"
3983 then
3984 CXX=$withval
3985 fi;;
3986 esac
3987else
3988
3989 with_cxx_main=no
3990 MAINCC='$(CC)'
3991
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003992fi
3993
Matthias Kloseb9621712010-04-24 17:59:49 +00003994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
3995$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003996
3997preset_cxx="$CXX"
3998if test -z "$CXX"
3999then
4000 case "$CC" in
4001 gcc) # Extract the first word of "g++", so it can be a program name with args.
4002set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4004$as_echo_n "checking for $ac_word... " >&6; }
4005if test "${ac_cv_path_CXX+set}" = set; then :
4006 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004007else
4008 case $CXX in
4009 [\\/]* | ?:[\\/]*)
4010 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4011 ;;
4012 *)
4013 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4014for as_dir in notfound
4015do
4016 IFS=$as_save_IFS
4017 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004018 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004019 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 +00004020 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004021 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004022 break 2
4023 fi
4024done
Matthias Kloseb9621712010-04-24 17:59:49 +00004025 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004026IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004027
4028 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4029 ;;
4030esac
4031fi
4032CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004033if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4035$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004036else
Matthias Kloseb9621712010-04-24 17:59:49 +00004037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4038$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004039fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004040
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004041 ;;
4042 cc) # Extract the first word of "c++", so it can be a program name with args.
4043set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4045$as_echo_n "checking for $ac_word... " >&6; }
4046if test "${ac_cv_path_CXX+set}" = set; then :
4047 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004048else
4049 case $CXX in
4050 [\\/]* | ?:[\\/]*)
4051 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4052 ;;
4053 *)
4054 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4055for as_dir in notfound
4056do
4057 IFS=$as_save_IFS
4058 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004059 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004060 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 +00004061 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004062 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004063 break 2
4064 fi
4065done
Matthias Kloseb9621712010-04-24 17:59:49 +00004066 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004067IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004068
4069 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4070 ;;
4071esac
4072fi
4073CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004074if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4076$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004077else
Matthias Kloseb9621712010-04-24 17:59:49 +00004078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4079$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004081
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004082 ;;
4083 esac
4084 if test "$CXX" = "notfound"
4085 then
4086 CXX=""
4087 fi
4088fi
4089if test -z "$CXX"
4090then
4091 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4092do
4093 # Extract the first word of "$ac_prog", so it can be a program name with args.
4094set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4096$as_echo_n "checking for $ac_word... " >&6; }
4097if test "${ac_cv_prog_CXX+set}" = set; then :
4098 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004099else
4100 if test -n "$CXX"; then
4101 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4102else
4103as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4104for as_dir in $PATH
4105do
4106 IFS=$as_save_IFS
4107 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004108 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004109 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 +00004110 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004111 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004112 break 2
4113 fi
4114done
Matthias Kloseb9621712010-04-24 17:59:49 +00004115 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004116IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004117
4118fi
4119fi
4120CXX=$ac_cv_prog_CXX
4121if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4123$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004124else
Matthias Kloseb9621712010-04-24 17:59:49 +00004125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4126$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004127fi
4128
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004129
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004130 test -n "$CXX" && break
4131done
4132test -n "$CXX" || CXX="notfound"
4133
4134 if test "$CXX" = "notfound"
4135 then
4136 CXX=""
4137 fi
4138fi
4139if test "$preset_cxx" != "$CXX"
4140then
Matthias Kloseb9621712010-04-24 17:59:49 +00004141 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004142
4143 By default, distutils will build C++ extension modules with \"$CXX\".
4144 If this is not intended, then set CXX on the configure command line.
4145 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004146$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004147
4148 By default, distutils will build C++ extension modules with \"$CXX\".
4149 If this is not intended, then set CXX on the configure command line.
4150 " >&2;}
4151fi
4152
4153
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004154# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004155
4156ac_ext=c
4157ac_cpp='$CPP $CPPFLAGS'
4158ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4159ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4160ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4162$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004163# On Suns, sometimes $CPP names a directory.
4164if test -n "$CPP" && test -d "$CPP"; then
4165 CPP=
4166fi
4167if test -z "$CPP"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004168 if test "${ac_cv_prog_CPP+set}" = set; then :
4169 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004170else
Martin v. Löwis11437992002-04-12 09:54:03 +00004171 # Double quotes because CPP needs to be expanded
4172 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4173 do
4174 ac_preproc_ok=false
4175for ac_c_preproc_warn_flag in '' yes
4176do
4177 # Use a header file that comes with gcc, so configuring glibc
4178 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004179 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4180 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004181 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004182 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004184/* end confdefs.h. */
4185#ifdef __STDC__
4186# include <limits.h>
4187#else
4188# include <assert.h>
4189#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004190 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004192if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004193
Matthias Kloseb9621712010-04-24 17:59:49 +00004194else
Martin v. Löwis11437992002-04-12 09:54:03 +00004195 # Broken: fails on valid input.
4196continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004197fi
Benjamin Peterson79263252010-10-31 16:50:44 +00004198rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004199
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004200 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004201 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004203/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004204#include <ac_nonexistent.h>
4205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004206if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004207 # Broken: success on invalid input.
4208continue
4209else
Martin v. Löwis11437992002-04-12 09:54:03 +00004210 # Passes both tests.
4211ac_preproc_ok=:
4212break
4213fi
Benjamin Peterson79263252010-10-31 16:50:44 +00004214rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004215
4216done
4217# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Benjamin Peterson79263252010-10-31 16:50:44 +00004218rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004219if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004220 break
4221fi
4222
4223 done
4224 ac_cv_prog_CPP=$CPP
4225
4226fi
4227 CPP=$ac_cv_prog_CPP
4228else
4229 ac_cv_prog_CPP=$CPP
4230fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4232$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004233ac_preproc_ok=false
4234for ac_c_preproc_warn_flag in '' yes
4235do
4236 # Use a header file that comes with gcc, so configuring glibc
4237 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004238 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4239 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004240 # On the NeXT, cc -E runs the code through the compiler's parser,
4241 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004243/* end confdefs.h. */
4244#ifdef __STDC__
4245# include <limits.h>
4246#else
4247# include <assert.h>
4248#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004249 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004250_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004251if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004252
Matthias Kloseb9621712010-04-24 17:59:49 +00004253else
Martin v. Löwis11437992002-04-12 09:54:03 +00004254 # Broken: fails on valid input.
4255continue
4256fi
Benjamin Peterson79263252010-10-31 16:50:44 +00004257rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004258
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004260 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004262/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004263#include <ac_nonexistent.h>
4264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004265if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004266 # Broken: success on invalid input.
4267continue
4268else
Martin v. Löwis11437992002-04-12 09:54:03 +00004269 # Passes both tests.
4270ac_preproc_ok=:
4271break
4272fi
Benjamin Peterson79263252010-10-31 16:50:44 +00004273rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004274
4275done
4276# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Benjamin Peterson79263252010-10-31 16:50:44 +00004277rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004278if $ac_preproc_ok; then :
4279
Martin v. Löwis11437992002-04-12 09:54:03 +00004280else
Matthias Kloseb9621712010-04-24 17:59:49 +00004281 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4282$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00004283as_fn_error "C preprocessor \"$CPP\" fails sanity check
4284See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004285fi
4286
4287ac_ext=c
4288ac_cpp='$CPP $CPPFLAGS'
4289ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4290ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4291ac_compiler_gnu=$ac_cv_c_compiler_gnu
4292
4293
Matthias Kloseb9621712010-04-24 17:59:49 +00004294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4295$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4296if test "${ac_cv_path_GREP+set}" = set; then :
4297 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004298else
Matthias Kloseb9621712010-04-24 17:59:49 +00004299 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004300 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004301 # Loop through the user's path and test for each of PROGNAME-LIST
4302 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004303for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4304do
4305 IFS=$as_save_IFS
4306 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004307 for ac_prog in grep ggrep; do
4308 for ac_exec_ext in '' $ac_executable_extensions; do
4309 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4310 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4311# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004312 # Check for GNU $ac_path_GREP
4313case `"$ac_path_GREP" --version 2>&1` in
4314*GNU*)
4315 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4316*)
4317 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004318 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004319 while :
4320 do
4321 cat "conftest.in" "conftest.in" >"conftest.tmp"
4322 mv "conftest.tmp" "conftest.in"
4323 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004324 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004325 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4326 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004327 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004328 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4329 # Best one so far, save it but keep looking for a better one
4330 ac_cv_path_GREP="$ac_path_GREP"
4331 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004332 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004333 # 10*(2^10) chars as input seems more than enough
4334 test $ac_count -gt 10 && break
4335 done
4336 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4337esac
4338
Matthias Kloseb9621712010-04-24 17:59:49 +00004339 $ac_path_GREP_found && break 3
4340 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004341 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004342 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004343IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004344 if test -z "$ac_cv_path_GREP"; then
Benjamin Peterson79263252010-10-31 16:50:44 +00004345 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 +00004346 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004347else
4348 ac_cv_path_GREP=$GREP
4349fi
4350
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004351fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4353$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004354 GREP="$ac_cv_path_GREP"
4355
4356
Matthias Kloseb9621712010-04-24 17:59:49 +00004357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4358$as_echo_n "checking for egrep... " >&6; }
4359if test "${ac_cv_path_EGREP+set}" = set; then :
4360 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004361else
4362 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4363 then ac_cv_path_EGREP="$GREP -E"
4364 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004365 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004366 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004367 # Loop through the user's path and test for each of PROGNAME-LIST
4368 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004369for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4370do
4371 IFS=$as_save_IFS
4372 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004373 for ac_prog in egrep; do
4374 for ac_exec_ext in '' $ac_executable_extensions; do
4375 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4376 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4377# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378 # Check for GNU $ac_path_EGREP
4379case `"$ac_path_EGREP" --version 2>&1` in
4380*GNU*)
4381 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4382*)
4383 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004384 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004385 while :
4386 do
4387 cat "conftest.in" "conftest.in" >"conftest.tmp"
4388 mv "conftest.tmp" "conftest.in"
4389 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004390 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004391 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4392 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004393 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004394 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4395 # Best one so far, save it but keep looking for a better one
4396 ac_cv_path_EGREP="$ac_path_EGREP"
4397 ac_path_EGREP_max=$ac_count
4398 fi
4399 # 10*(2^10) chars as input seems more than enough
4400 test $ac_count -gt 10 && break
4401 done
4402 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4403esac
4404
Matthias Kloseb9621712010-04-24 17:59:49 +00004405 $ac_path_EGREP_found && break 3
4406 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004407 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004408 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004409IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004410 if test -z "$ac_cv_path_EGREP"; then
Benjamin Peterson79263252010-10-31 16:50:44 +00004411 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 +00004412 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004413else
4414 ac_cv_path_EGREP=$EGREP
4415fi
4416
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004417 fi
4418fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4420$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004421 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004422
4423
Matthias Kloseb9621712010-04-24 17:59:49 +00004424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4425$as_echo_n "checking for ANSI C header files... " >&6; }
4426if test "${ac_cv_header_stdc+set}" = set; then :
4427 $as_echo_n "(cached) " >&6
4428else
4429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004430/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004431#include <stdlib.h>
4432#include <stdarg.h>
4433#include <string.h>
4434#include <float.h>
4435
4436int
4437main ()
4438{
4439
4440 ;
4441 return 0;
4442}
4443_ACEOF
4444if ac_fn_c_try_compile "$LINENO"; then :
4445 ac_cv_header_stdc=yes
4446else
4447 ac_cv_header_stdc=no
4448fi
4449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4450
4451if test $ac_cv_header_stdc = yes; then
4452 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4454/* end confdefs.h. */
4455#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004456
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004457_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004458if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004459 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004460
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004461else
Matthias Kloseb9621712010-04-24 17:59:49 +00004462 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004463fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004464rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004465
Matthias Kloseb9621712010-04-24 17:59:49 +00004466fi
4467
4468if test $ac_cv_header_stdc = yes; then
4469 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4471/* end confdefs.h. */
4472#include <stdlib.h>
4473
4474_ACEOF
4475if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4476 $EGREP "free" >/dev/null 2>&1; then :
4477
4478else
4479 ac_cv_header_stdc=no
4480fi
4481rm -f conftest*
4482
4483fi
4484
4485if test $ac_cv_header_stdc = yes; then
4486 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4487 if test "$cross_compiling" = yes; then :
4488 :
4489else
4490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4491/* end confdefs.h. */
4492#include <ctype.h>
4493#include <stdlib.h>
4494#if ((' ' & 0x0FF) == 0x020)
4495# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4496# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4497#else
4498# define ISLOWER(c) \
4499 (('a' <= (c) && (c) <= 'i') \
4500 || ('j' <= (c) && (c) <= 'r') \
4501 || ('s' <= (c) && (c) <= 'z'))
4502# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4503#endif
4504
4505#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4506int
4507main ()
4508{
4509 int i;
4510 for (i = 0; i < 256; i++)
4511 if (XOR (islower (i), ISLOWER (i))
4512 || toupper (i) != TOUPPER (i))
4513 return 2;
4514 return 0;
4515}
4516_ACEOF
4517if ac_fn_c_try_run "$LINENO"; then :
4518
4519else
4520 ac_cv_header_stdc=no
4521fi
4522rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4523 conftest.$ac_objext conftest.beam conftest.$ac_ext
4524fi
4525
4526fi
4527fi
4528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4529$as_echo "$ac_cv_header_stdc" >&6; }
4530if test $ac_cv_header_stdc = yes; then
4531
4532$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4533
4534fi
4535
4536# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4537for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4538 inttypes.h stdint.h unistd.h
4539do :
4540 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4541ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4542"
Benjamin Peterson79263252010-10-31 16:50:44 +00004543eval as_val=\$$as_ac_Header
4544 if test "x$as_val" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004545 cat >>confdefs.h <<_ACEOF
4546#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4547_ACEOF
4548
4549fi
4550
4551done
4552
4553
4554
4555 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4556if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4557 MINIX=yes
4558else
4559 MINIX=
4560fi
4561
4562
4563 if test "$MINIX" = yes; then
4564
4565$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4566
4567
4568$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4569
4570
4571$as_echo "#define _MINIX 1" >>confdefs.h
4572
4573 fi
4574
4575
4576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4577$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4578if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4579 $as_echo_n "(cached) " >&6
4580else
4581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4582/* end confdefs.h. */
4583
4584# define __EXTENSIONS__ 1
4585 $ac_includes_default
4586int
4587main ()
4588{
4589
4590 ;
4591 return 0;
4592}
4593_ACEOF
4594if ac_fn_c_try_compile "$LINENO"; then :
4595 ac_cv_safe_to_define___extensions__=yes
4596else
4597 ac_cv_safe_to_define___extensions__=no
4598fi
4599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4600fi
4601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4602$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4603 test $ac_cv_safe_to_define___extensions__ = yes &&
4604 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4605
4606 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4607
4608 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4609
4610 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4611
4612 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4613
4614
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004615
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004616# Check for unsupported systems
4617case $ac_sys_system/$ac_sys_release in
4618atheos*|Linux*/1*)
4619 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4620 echo See README for details.
4621 exit 1;;
4622esac
4623
4624
Matthias Kloseb9621712010-04-24 17:59:49 +00004625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4626$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004627
4628# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004629if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004630 withval=$with_suffix;
4631 case $withval in
4632 no) EXEEXT=;;
4633 yes) EXEEXT=.exe;;
4634 *) EXEEXT=$withval;;
4635 esac
4636fi
4637
Matthias Kloseb9621712010-04-24 17:59:49 +00004638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4639$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004640
4641# Test whether we're running on a non-case-sensitive system, in which
4642# case we give a warning if no ext is given
4643
Matthias Kloseb9621712010-04-24 17:59:49 +00004644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4645$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004646if test ! -d CaseSensitiveTestDir; then
4647mkdir CaseSensitiveTestDir
4648fi
4649
4650if test -d casesensitivetestdir
4651then
Matthias Kloseb9621712010-04-24 17:59:49 +00004652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4653$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004654 BUILDEXEEXT=.exe
4655else
Matthias Kloseb9621712010-04-24 17:59:49 +00004656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4657$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004658 BUILDEXEEXT=$EXEEXT
4659fi
4660rmdir CaseSensitiveTestDir
4661
4662case $MACHDEP in
4663bsdos*)
4664 case $CC in
4665 gcc) CC="$CC -D_HAVE_BSDI";;
4666 esac;;
4667esac
4668
4669case $ac_sys_system in
4670hp*|HP*)
4671 case $CC in
4672 cc|*/cc) CC="$CC -Ae";;
4673 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004674esac
4675
4676
4677
Matthias Kloseb9621712010-04-24 17:59:49 +00004678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4679$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004680if test -z "$LIBRARY"
4681then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004682 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4685$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004686
4687# LDLIBRARY is the name of the library to link against (as opposed to the
4688# name of the library into which to insert object files). BLDLIBRARY is also
4689# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4690# is blank as the main program is not linked directly against LDLIBRARY.
4691# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4692# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4693# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4694# DLLLIBRARY is the shared (i.e., DLL) library.
4695#
4696# RUNSHARED is used to run shared python without installed libraries
4697#
4698# INSTSONAME is the name of the shared library that will be use to install
4699# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004700#
4701# LDVERSION is the shared library version number, normally the Python version
4702# with the ABI build flags appended.
4703
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004704
4705
4706
4707
4708
4709
4710LDLIBRARY="$LIBRARY"
4711BLDLIBRARY='$(LDLIBRARY)'
4712INSTSONAME='$(LDLIBRARY)'
4713DLLLIBRARY=''
4714LDLIBRARYDIR=''
4715RUNSHARED=''
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004716LDVERSION="$(VERSION)"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004717
4718# LINKCC is the command that links the python executable -- default is $(CC).
4719# If CXX is set, and if it is needed to link a main function that was
4720# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4721# python might then depend on the C++ runtime
4722# This is altered for AIX in order to build the export list before
4723# linking.
4724
Matthias Kloseb9621712010-04-24 17:59:49 +00004725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4726$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004727if test -z "$LINKCC"
4728then
4729 LINKCC='$(PURIFY) $(MAINCC)'
4730 case $ac_sys_system in
4731 AIX*)
4732 exp_extra="\"\""
4733 if test $ac_sys_release -ge 5 -o \
4734 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4735 exp_extra="."
4736 fi
4737 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004738 QNX*)
4739 # qcc must be used because the other compilers do not
4740 # support -N.
4741 LINKCC=qcc;;
4742 esac
4743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4745$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004746
4747# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4748# make sure we default having it set to "no": this is used by
4749# distutils.unixccompiler to know if it should add --enable-new-dtags
4750# to linker command lines, and failing to detect GNU ld simply results
4751# in the same bahaviour as before.
4752
Matthias Kloseb9621712010-04-24 17:59:49 +00004753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4754$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004755ac_prog=ld
4756if test "$GCC" = yes; then
4757 ac_prog=`$CC -print-prog-name=ld`
4758fi
4759case `"$ac_prog" -V 2>&1 < /dev/null` in
4760 *GNU*)
4761 GNULD=yes;;
4762 *)
4763 GNULD=no;;
4764esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4766$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004767
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4769$as_echo_n "checking for inline... " >&6; }
4770if test "${ac_cv_c_inline+set}" = set; then :
4771 $as_echo_n "(cached) " >&6
4772else
4773 ac_cv_c_inline=no
4774for ac_kw in inline __inline__ __inline; do
4775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4776/* end confdefs.h. */
4777#ifndef __cplusplus
4778typedef int foo_t;
4779static $ac_kw foo_t static_foo () {return 0; }
4780$ac_kw foo_t foo () {return 0; }
4781#endif
4782
4783_ACEOF
4784if ac_fn_c_try_compile "$LINENO"; then :
4785 ac_cv_c_inline=$ac_kw
4786fi
4787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4788 test "$ac_cv_c_inline" != no && break
4789done
4790
4791fi
4792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4793$as_echo "$ac_cv_c_inline" >&6; }
4794
4795case $ac_cv_c_inline in
4796 inline | yes) ;;
4797 *)
4798 case $ac_cv_c_inline in
4799 no) ac_val=;;
4800 *) ac_val=$ac_cv_c_inline;;
4801 esac
4802 cat >>confdefs.h <<_ACEOF
4803#ifndef __cplusplus
4804#define inline $ac_val
4805#endif
4806_ACEOF
4807 ;;
4808esac
4809
4810if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004811
4812$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004813
4814
4815fi
4816
4817
Matthias Kloseb9621712010-04-24 17:59:49 +00004818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4819$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004820# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004821if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004822 enableval=$enable_shared;
4823fi
4824
4825
4826if test -z "$enable_shared"
4827then
4828 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004829 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004830 enable_shared="yes";;
4831 *)
4832 enable_shared="no";;
4833 esac
4834fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4836$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004837
Matthias Kloseb9621712010-04-24 17:59:49 +00004838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4839$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004840# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004841if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004842 enableval=$enable_profiling; ac_save_cc="$CC"
4843 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004844 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004845 ac_enable_profiling="no"
4846else
Matthias Kloseb9621712010-04-24 17:59:49 +00004847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004848/* end confdefs.h. */
4849int main() { return 0; }
4850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004851if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004852 ac_enable_profiling="yes"
4853else
Matthias Kloseb9621712010-04-24 17:59:49 +00004854 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004856rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4857 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004858fi
4859
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004860 CC="$ac_save_cc"
4861fi
4862
Matthias Kloseb9621712010-04-24 17:59:49 +00004863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4864$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004865
4866case "$ac_enable_profiling" in
4867 "yes")
4868 BASECFLAGS="-pg $BASECFLAGS"
4869 LDFLAGS="-pg $LDFLAGS"
4870 ;;
4871esac
4872
Matthias Kloseb9621712010-04-24 17:59:49 +00004873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4874$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004875
4876# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4877# library that we build, but we do not want to link against it (we
4878# will find it with a -framework option). For this reason there is an
4879# extra variable BLDLIBRARY against which Python and the extension
4880# modules are linked, BLDLIBRARY. This is normally the same as
4881# LDLIBRARY, but empty for MacOSX framework builds.
4882if test "$enable_framework"
4883then
4884 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4885 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4886 BLDLIBRARY=''
4887else
4888 BLDLIBRARY='$(LDLIBRARY)'
4889fi
4890
4891# Other platforms follow
4892if test $enable_shared = "yes"; then
4893
Matthias Kloseb9621712010-04-24 17:59:49 +00004894$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004895
4896 case $ac_sys_system in
4897 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004898 LDLIBRARY='libpython$(LDVERSION).dll.a'
4899 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004900 ;;
4901 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004902 LDLIBRARY='libpython$(LDVERSION).so'
4903 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004904 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4905 INSTSONAME="$LDLIBRARY".$SOVERSION
4906 ;;
4907 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004908 LDLIBRARY='libpython$(LDVERSION).so'
4909 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004910 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4911 case $ac_sys_system in
4912 FreeBSD*)
4913 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4914 ;;
4915 esac
4916 INSTSONAME="$LDLIBRARY".$SOVERSION
4917 ;;
4918 hp*|HP*)
4919 case `uname -m` in
4920 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004921 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004922 ;;
4923 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004924 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004925 ;;
4926 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004927 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004928 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4929 ;;
4930 OSF*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004931 LDLIBRARY='libpython$(LDVERSION).so'
4932 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004933 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4934 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004935 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004936 LDLIBRARY='libpython$(LDVERSION).dylib'
4937 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004938 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4939 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004940 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004941 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004942 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4943 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004944
4945 esac
4946else # shared is disabled
4947 case $ac_sys_system in
4948 CYGWIN*)
4949 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004950 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004951 ;;
4952 esac
4953fi
4954
Matthias Kloseb9621712010-04-24 17:59:49 +00004955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4956$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004957
4958if test -n "$ac_tool_prefix"; then
4959 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4960set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4962$as_echo_n "checking for $ac_word... " >&6; }
4963if test "${ac_cv_prog_RANLIB+set}" = set; then :
4964 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004965else
4966 if test -n "$RANLIB"; then
4967 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4968else
4969as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4970for as_dir in $PATH
4971do
4972 IFS=$as_save_IFS
4973 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004974 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004975 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4976 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004977 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004978 break 2
4979 fi
4980done
Matthias Kloseb9621712010-04-24 17:59:49 +00004981 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004982IFS=$as_save_IFS
4983
4984fi
4985fi
4986RANLIB=$ac_cv_prog_RANLIB
4987if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4989$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004990else
Matthias Kloseb9621712010-04-24 17:59:49 +00004991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4992$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004993fi
4994
4995
4996fi
4997if test -z "$ac_cv_prog_RANLIB"; then
4998 ac_ct_RANLIB=$RANLIB
4999 # Extract the first word of "ranlib", so it can be a program name with args.
5000set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5002$as_echo_n "checking for $ac_word... " >&6; }
5003if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5004 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005005else
5006 if test -n "$ac_ct_RANLIB"; then
5007 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5008else
5009as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5010for as_dir in $PATH
5011do
5012 IFS=$as_save_IFS
5013 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005014 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005015 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5016 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005017 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005018 break 2
5019 fi
5020done
Matthias Kloseb9621712010-04-24 17:59:49 +00005021 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005022IFS=$as_save_IFS
5023
5024fi
5025fi
5026ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5027if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5029$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005030else
Matthias Kloseb9621712010-04-24 17:59:49 +00005031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5032$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005033fi
5034
5035 if test "x$ac_ct_RANLIB" = x; then
5036 RANLIB=":"
5037 else
5038 case $cross_compiling:$ac_tool_warned in
5039yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005040{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5041$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005042ac_tool_warned=yes ;;
5043esac
5044 RANLIB=$ac_ct_RANLIB
5045 fi
5046else
5047 RANLIB="$ac_cv_prog_RANLIB"
5048fi
5049
5050
5051for ac_prog in ar aal
5052do
5053 # Extract the first word of "$ac_prog", so it can be a program name with args.
5054set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5056$as_echo_n "checking for $ac_word... " >&6; }
5057if test "${ac_cv_prog_AR+set}" = set; then :
5058 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005059else
5060 if test -n "$AR"; then
5061 ac_cv_prog_AR="$AR" # Let the user override the test.
5062else
5063as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5064for as_dir in $PATH
5065do
5066 IFS=$as_save_IFS
5067 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005069 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5070 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005071 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005072 break 2
5073 fi
5074done
Matthias Kloseb9621712010-04-24 17:59:49 +00005075 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005076IFS=$as_save_IFS
5077
5078fi
5079fi
5080AR=$ac_cv_prog_AR
5081if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5083$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005084else
Matthias Kloseb9621712010-04-24 17:59:49 +00005085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5086$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005087fi
5088
5089
5090 test -n "$AR" && break
5091done
5092test -n "$AR" || AR="ar"
5093
5094
5095# tweak ARFLAGS only if the user didn't set it on the command line
5096
5097if test -z "$ARFLAGS"
5098then
5099 ARFLAGS="rc"
5100fi
5101
5102
5103# Extract the first word of "svnversion", so it can be a program name with args.
5104set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5106$as_echo_n "checking for $ac_word... " >&6; }
5107if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
5108 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005109else
5110 if test -n "$SVNVERSION"; then
5111 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5112else
5113as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5114for as_dir in $PATH
5115do
5116 IFS=$as_save_IFS
5117 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005118 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005119 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5120 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005121 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005122 break 2
5123 fi
5124done
Matthias Kloseb9621712010-04-24 17:59:49 +00005125 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005126IFS=$as_save_IFS
5127
5128 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5129fi
5130fi
5131SVNVERSION=$ac_cv_prog_SVNVERSION
5132if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5134$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005135else
Matthias Kloseb9621712010-04-24 17:59:49 +00005136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5137$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005138fi
5139
5140
5141if test $SVNVERSION = found
5142then
5143 SVNVERSION="svnversion \$(srcdir)"
5144else
5145 SVNVERSION="echo Unversioned directory"
5146fi
5147
5148case $MACHDEP in
5149bsdos*|hp*|HP*)
5150 # install -d does not work on BSDI or HP-UX
5151 if test -z "$INSTALL"
5152 then
5153 INSTALL="${srcdir}/install-sh -c"
5154 fi
5155esac
5156ac_aux_dir=
5157for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Benjamin Peterson79263252010-10-31 16:50:44 +00005158 for ac_t in install-sh install.sh shtool; do
5159 if test -f "$ac_dir/$ac_t"; then
5160 ac_aux_dir=$ac_dir
5161 ac_install_sh="$ac_aux_dir/$ac_t -c"
5162 break 2
5163 fi
5164 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005165done
5166if test -z "$ac_aux_dir"; then
Benjamin Peterson79263252010-10-31 16:50:44 +00005167 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005168fi
5169
5170# These three variables are undocumented and unsupported,
5171# and are intended to be withdrawn in a future Autoconf release.
5172# They can cause serious problems if a builder's source tree is in a directory
5173# whose full name contains unusual characters.
5174ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5175ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5176ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5177
5178
5179# Find a good install program. We prefer a C program (faster),
5180# so one script is as good as another. But avoid the broken or
5181# incompatible versions:
5182# SysV /etc/install, /usr/sbin/install
5183# SunOS /usr/etc/install
5184# IRIX /sbin/install
5185# AIX /bin/install
5186# AmigaOS /C/install, which installs bootblocks on floppy discs
5187# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5188# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5189# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5190# OS/2's system install, which has a completely different semantic
5191# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005192# Reject install programs that cannot install multiple files.
5193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5194$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005195if test -z "$INSTALL"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005196if test "${ac_cv_path_install+set}" = set; then :
5197 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005198else
5199 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5200for as_dir in $PATH
5201do
5202 IFS=$as_save_IFS
5203 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005204 # Account for people who put trailing slashes in PATH elements.
5205case $as_dir/ in #((
5206 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005207 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005208 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005209 /usr/ucb/* ) ;;
5210 *)
5211 # OSF1 and SCO ODT 3.0 have their own names for install.
5212 # Don't use installbsd from OSF since it installs stuff as root
5213 # by default.
5214 for ac_prog in ginstall scoinst install; do
5215 for ac_exec_ext in '' $ac_executable_extensions; do
5216 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5217 if test $ac_prog = install &&
5218 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5219 # AIX install. It has an incompatible calling convention.
5220 :
5221 elif test $ac_prog = install &&
5222 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5223 # program-specific install script used by HP pwplus--don't use.
5224 :
5225 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005226 rm -rf conftest.one conftest.two conftest.dir
5227 echo one > conftest.one
5228 echo two > conftest.two
5229 mkdir conftest.dir
5230 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5231 test -s conftest.one && test -s conftest.two &&
5232 test -s conftest.dir/conftest.one &&
5233 test -s conftest.dir/conftest.two
5234 then
5235 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5236 break 3
5237 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005238 fi
5239 fi
5240 done
5241 done
5242 ;;
5243esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005244
5245 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005246IFS=$as_save_IFS
5247
Matthias Kloseb9621712010-04-24 17:59:49 +00005248rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005249
5250fi
5251 if test "${ac_cv_path_install+set}" = set; then
5252 INSTALL=$ac_cv_path_install
5253 else
5254 # As a last resort, use the slow shell script. Don't cache a
5255 # value for INSTALL within a source directory, because that will
5256 # break other packages using the cache if that directory is
5257 # removed, or if the value is a relative name.
5258 INSTALL=$ac_install_sh
5259 fi
5260fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5262$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005263
5264# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5265# It thinks the first close brace ends the variable substitution.
5266test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5267
5268test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5269
5270test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5271
5272
5273# Not every filesystem supports hard links
5274
5275if test -z "$LN" ; then
5276 case $ac_sys_system in
5277 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005278 *) LN=ln;;
5279 esac
5280fi
5281
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005282# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005283
5284ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005285
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005286# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5288$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005289
5290# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005291if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005292 withval=$with_pydebug;
5293if test "$withval" != no
5294then
5295
Matthias Kloseb9621712010-04-24 17:59:49 +00005296$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005297
Matthias Kloseb9621712010-04-24 17:59:49 +00005298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5299$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005300 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005301 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005302else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5303$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005304fi
5305else
Matthias Kloseb9621712010-04-24 17:59:49 +00005306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5307$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005308fi
5309
5310
5311# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5312# merged with this chunk of code?
5313
5314# Optimizer/debugger flags
5315# ------------------------
5316# (The following bit of code is complicated enough - please keep things
5317# indented properly. Just pretend you're editing Python code. ;-)
5318
5319# There are two parallel sets of case statements below, one that checks to
5320# see if OPT was set and one that does BASECFLAGS setting based upon
5321# compiler and platform. BASECFLAGS tweaks need to be made even if the
5322# user set OPT.
5323
5324# tweak OPT based on compiler and platform, only if the user didn't set
5325# it on the command line
5326
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005327if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005328then
5329 case $GCC in
5330 yes)
5331 if test "$CC" != 'g++' ; then
5332 STRICT_PROTO="-Wstrict-prototypes"
5333 fi
5334 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5335 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5336 WRAP="-fwrapv"
5337 fi
5338 case $ac_cv_prog_cc_g in
5339 yes)
5340 if test "$Py_DEBUG" = 'true' ; then
5341 # Optimization messes up debuggers, so turn it off for
5342 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005343 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005344 else
5345 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5346 fi
5347 ;;
5348 *)
5349 OPT="-O3 -Wall $STRICT_PROTO"
5350 ;;
5351 esac
5352 case $ac_sys_system in
5353 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5354 ;;
5355 esac
5356 ;;
5357
5358 *)
5359 OPT="-O"
5360 ;;
5361 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005362fi
5363
5364
5365
5366# The -arch flags for universal builds on OSX
5367UNIVERSAL_ARCH_FLAGS=
5368
5369
5370# tweak BASECFLAGS based on compiler and platform
5371case $GCC in
5372yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005373 # Python doesn't violate C99 aliasing rules, but older versions of
5374 # GCC produce warnings for legal Python code. Enable
5375 # -fno-strict-aliasing on versions of GCC that support but produce
5376 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5378$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005379 ac_save_cc="$CC"
5380 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005381 save_CFLAGS="$CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +00005382 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
5383 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005384else
Matthias Kloseb9621712010-04-24 17:59:49 +00005385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005386/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005387
Matthias Kloseb159a552010-04-25 21:00:44 +00005388
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005389int
5390main ()
5391{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005392
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005393 ;
5394 return 0;
5395}
Matthias Kloseb159a552010-04-25 21:00:44 +00005396
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005398if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005399
5400 CC="$ac_save_cc -fstrict-aliasing"
5401 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005403/* end confdefs.h. */
5404
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005405 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005406int
5407main ()
5408{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005409double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005410 ;
5411 return 0;
5412}
Matthias Kloseb159a552010-04-25 21:00:44 +00005413
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005414_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005415if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005416
5417 ac_cv_no_strict_aliasing=no
5418
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005419else
Matthias Kloseb159a552010-04-25 21:00:44 +00005420
5421 ac_cv_no_strict_aliasing=yes
5422
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005423fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005425
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005426else
Matthias Kloseb159a552010-04-25 21:00:44 +00005427
5428 ac_cv_no_strict_aliasing=no
5429
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005430fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005432fi
5433
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005434 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005435 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5437$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005438 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005439 then
5440 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5441 fi
5442
5443 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5444 # support. Without this, treatment of subnormals doesn't follow
5445 # the standard.
5446 case $ac_sys_machine in
5447 alpha*)
5448 BASECFLAGS="$BASECFLAGS -mieee"
5449 ;;
5450 esac
5451
5452 case $ac_sys_system in
5453 SCO_SV*)
5454 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5455 ;;
5456 # is there any other compiler on Darwin besides gcc?
5457 Darwin*)
5458 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5459 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005460 if test "${CC}" = gcc
5461 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5463$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005464 case "${UNIVERSALSDK}" in
5465 */MacOSX10.4u.sdk)
5466 # Build using 10.4 SDK, force usage of gcc when the
5467 # compiler is gcc, otherwise the user will get very
5468 # confusing error messages when building on OSX 10.6
5469 CC=gcc-4.0
5470 CPP=cpp-4.0
5471 ;;
5472 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5474$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005475 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005476
5477
5478 if test "${enable_universalsdk}"; then
5479 UNIVERSAL_ARCH_FLAGS=""
5480 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5481 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5482 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005483 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005484 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5485 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005486 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005487 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005488
5489 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5490 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005491 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005492 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005493
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005494 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5495 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005496 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005497 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005498
5499 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5500 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005501 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005502 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005503
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005504 else
Benjamin Peterson79263252010-10-31 16:50:44 +00005505 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 +00005506
5507 fi
5508
5509
Ronald Oussoren666028b2010-04-18 19:07:43 +00005510 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5511 if test "${UNIVERSALSDK}" != "/"
5512 then
5513 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5514 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005515 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005516 fi
5517 fi
5518
5519 # Calculate the right deployment target for this build.
5520 #
5521 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5522 if test ${cur_target} '>' 10.2; then
5523 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005524 if test ${enable_universalsdk}; then
5525 if test "${UNIVERSAL_ARCHS}" = "all"; then
5526 # Ensure that the default platform for a
5527 # 4-way universal build is OSX 10.5,
5528 # that's the first OS release where
5529 # 4-way builds make sense.
5530 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005531
5532 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5533 cur_target='10.5'
5534
5535 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5536 cur_target='10.5'
5537
5538 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5539 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005540 fi
5541 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005542 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005543 # On Intel macs default to a deployment
5544 # target of 10.4, that's the first OSX
5545 # release with Intel support.
5546 cur_target="10.4"
5547 fi
5548 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005549 fi
5550 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5551
5552 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5553 # environment with a value that is the same as what we'll use
5554 # in the Makefile to ensure that we'll get the same compiler
5555 # environment during configure and build time.
5556 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5557 export MACOSX_DEPLOYMENT_TARGET
5558 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5559
5560 ;;
5561 OSF*)
5562 BASECFLAGS="$BASECFLAGS -mieee"
5563 ;;
5564 esac
5565 ;;
5566
5567*)
5568 case $ac_sys_system in
5569 OpenUNIX*|UnixWare*)
5570 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5571 ;;
5572 OSF*)
5573 BASECFLAGS="$BASECFLAGS -ieee -std"
5574 ;;
5575 SCO_SV*)
5576 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5577 ;;
5578 esac
5579 ;;
5580esac
5581
5582if test "$Py_DEBUG" = 'true'; then
5583 :
5584else
5585 OPT="-DNDEBUG $OPT"
5586fi
5587
5588if test "$ac_arch_flags"
5589then
5590 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5591fi
5592
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005593# Check whether GCC supports PyArg_ParseTuple format
5594if test "$GCC" = "yes"
5595then
Matthias Kloseb9621712010-04-24 17:59:49 +00005596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5597$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005598 save_CFLAGS=$CFLAGS
5599 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005601/* end confdefs.h. */
5602
5603 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005604int
5605main ()
5606{
5607
5608 ;
5609 return 0;
5610}
Matthias Kloseb159a552010-04-25 21:00:44 +00005611
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005613if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005614
Matthias Kloseb159a552010-04-25 21:00:44 +00005615
Matthias Kloseb9621712010-04-24 17:59:49 +00005616$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005617
Matthias Kloseb159a552010-04-25 21:00:44 +00005618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005619$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005620
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005621else
Matthias Kloseb159a552010-04-25 21:00:44 +00005622
5623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005624$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005625
5626fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5628 CFLAGS=$save_CFLAGS
5629fi
5630
5631# On some compilers, pthreads are available without further options
5632# (e.g. MacOS X). On some of these systems, the compiler will not
5633# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5634# So we have to see first whether pthreads are available without
5635# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5637$as_echo_n "checking whether pthreads are available without options... " >&6; }
5638if test "${ac_cv_pthread_is_default+set}" = set; then :
5639 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005640else
Matthias Kloseb9621712010-04-24 17:59:49 +00005641 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005642 ac_cv_pthread_is_default=no
5643else
Matthias Kloseb9621712010-04-24 17:59:49 +00005644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005645/* end confdefs.h. */
5646
5647#include <pthread.h>
5648
5649void* routine(void* p){return NULL;}
5650
5651int main(){
5652 pthread_t p;
5653 if(pthread_create(&p,NULL,routine,NULL)!=0)
5654 return 1;
5655 (void)pthread_detach(p);
5656 return 0;
5657}
5658
5659_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005660if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005661
5662 ac_cv_pthread_is_default=yes
5663 ac_cv_kthread=no
5664 ac_cv_pthread=no
5665
5666else
Matthias Kloseb9621712010-04-24 17:59:49 +00005667 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005668fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005669rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5670 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671fi
5672
5673
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005674fi
5675
Matthias Kloseb9621712010-04-24 17:59:49 +00005676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5677$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005678
5679
5680if test $ac_cv_pthread_is_default = yes
5681then
5682 ac_cv_kpthread=no
5683else
5684# -Kpthread, if available, provides the right #defines
5685# and linker options to make pthread_create available
5686# Some compilers won't report that they do not support -Kpthread,
5687# so we need to run a program to see whether it really made the
5688# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5690$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
5691if test "${ac_cv_kpthread+set}" = set; then :
5692 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693else
5694 ac_save_cc="$CC"
5695CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005696if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697 ac_cv_kpthread=no
5698else
Matthias Kloseb9621712010-04-24 17:59:49 +00005699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700/* end confdefs.h. */
5701
5702#include <pthread.h>
5703
5704void* routine(void* p){return NULL;}
5705
5706int main(){
5707 pthread_t p;
5708 if(pthread_create(&p,NULL,routine,NULL)!=0)
5709 return 1;
5710 (void)pthread_detach(p);
5711 return 0;
5712}
5713
5714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005715if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716 ac_cv_kpthread=yes
5717else
Matthias Kloseb9621712010-04-24 17:59:49 +00005718 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005720rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5721 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005722fi
5723
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005724CC="$ac_save_cc"
5725fi
5726
Matthias Kloseb9621712010-04-24 17:59:49 +00005727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5728$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729fi
5730
5731if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5732then
5733# -Kthread, if available, provides the right #defines
5734# and linker options to make pthread_create available
5735# Some compilers won't report that they do not support -Kthread,
5736# so we need to run a program to see whether it really made the
5737# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5739$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
5740if test "${ac_cv_kthread+set}" = set; then :
5741 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742else
5743 ac_save_cc="$CC"
5744CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005745if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746 ac_cv_kthread=no
5747else
Matthias Kloseb9621712010-04-24 17:59:49 +00005748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749/* end confdefs.h. */
5750
5751#include <pthread.h>
5752
5753void* routine(void* p){return NULL;}
5754
5755int main(){
5756 pthread_t p;
5757 if(pthread_create(&p,NULL,routine,NULL)!=0)
5758 return 1;
5759 (void)pthread_detach(p);
5760 return 0;
5761}
5762
5763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005764if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765 ac_cv_kthread=yes
5766else
Matthias Kloseb9621712010-04-24 17:59:49 +00005767 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005769rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5770 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005771fi
5772
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005773CC="$ac_save_cc"
5774fi
5775
Matthias Kloseb9621712010-04-24 17:59:49 +00005776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5777$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778fi
5779
5780if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5781then
5782# -pthread, if available, provides the right #defines
5783# and linker options to make pthread_create available
5784# Some compilers won't report that they do not support -pthread,
5785# so we need to run a program to see whether it really made the
5786# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5788$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
5789if test "${ac_cv_thread+set}" = set; then :
5790 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791else
5792 ac_save_cc="$CC"
5793CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005794if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005795 ac_cv_pthread=no
5796else
Matthias Kloseb9621712010-04-24 17:59:49 +00005797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005798/* end confdefs.h. */
5799
5800#include <pthread.h>
5801
5802void* routine(void* p){return NULL;}
5803
5804int main(){
5805 pthread_t p;
5806 if(pthread_create(&p,NULL,routine,NULL)!=0)
5807 return 1;
5808 (void)pthread_detach(p);
5809 return 0;
5810}
5811
5812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005813if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814 ac_cv_pthread=yes
5815else
Matthias Kloseb9621712010-04-24 17:59:49 +00005816 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005818rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5819 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005820fi
5821
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822CC="$ac_save_cc"
5823fi
5824
Matthias Kloseb9621712010-04-24 17:59:49 +00005825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5826$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827fi
5828
5829# If we have set a CC compiler flag for thread support then
5830# check if it works for CXX, too.
5831ac_cv_cxx_thread=no
5832if test ! -z "$CXX"
5833then
Matthias Kloseb9621712010-04-24 17:59:49 +00005834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5835$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005836ac_save_cxx="$CXX"
5837
5838if test "$ac_cv_kpthread" = "yes"
5839then
5840 CXX="$CXX -Kpthread"
5841 ac_cv_cxx_thread=yes
5842elif test "$ac_cv_kthread" = "yes"
5843then
5844 CXX="$CXX -Kthread"
5845 ac_cv_cxx_thread=yes
5846elif test "$ac_cv_pthread" = "yes"
5847then
5848 CXX="$CXX -pthread"
5849 ac_cv_cxx_thread=yes
5850fi
5851
5852if test $ac_cv_cxx_thread = yes
5853then
5854 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5855 $CXX -c conftest.$ac_ext 2>&5
5856 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5857 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5858 then
5859 ac_cv_cxx_thread=yes
5860 else
5861 ac_cv_cxx_thread=no
5862 fi
5863 rm -fr conftest*
5864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5866$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867fi
5868CXX="$ac_save_cxx"
5869
5870
5871# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5873$as_echo_n "checking for ANSI C header files... " >&6; }
5874if test "${ac_cv_header_stdc+set}" = set; then :
5875 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876else
Matthias Kloseb9621712010-04-24 17:59:49 +00005877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878/* end confdefs.h. */
5879#include <stdlib.h>
5880#include <stdarg.h>
5881#include <string.h>
5882#include <float.h>
5883
5884int
5885main ()
5886{
5887
5888 ;
5889 return 0;
5890}
5891_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005892if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893 ac_cv_header_stdc=yes
5894else
Matthias Kloseb9621712010-04-24 17:59:49 +00005895 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5898
5899if test $ac_cv_header_stdc = yes; then
5900 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902/* end confdefs.h. */
5903#include <string.h>
5904
5905_ACEOF
5906if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005907 $EGREP "memchr" >/dev/null 2>&1; then :
5908
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005909else
5910 ac_cv_header_stdc=no
5911fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005912rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913
5914fi
5915
5916if test $ac_cv_header_stdc = yes; then
5917 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919/* end confdefs.h. */
5920#include <stdlib.h>
5921
5922_ACEOF
5923if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005924 $EGREP "free" >/dev/null 2>&1; then :
5925
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926else
5927 ac_cv_header_stdc=no
5928fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005929rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005930
5931fi
5932
5933if test $ac_cv_header_stdc = yes; then
5934 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00005935 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936 :
5937else
Matthias Kloseb9621712010-04-24 17:59:49 +00005938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939/* end confdefs.h. */
5940#include <ctype.h>
5941#include <stdlib.h>
5942#if ((' ' & 0x0FF) == 0x020)
5943# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5944# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5945#else
5946# define ISLOWER(c) \
5947 (('a' <= (c) && (c) <= 'i') \
5948 || ('j' <= (c) && (c) <= 'r') \
5949 || ('s' <= (c) && (c) <= 'z'))
5950# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5951#endif
5952
5953#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5954int
5955main ()
5956{
5957 int i;
5958 for (i = 0; i < 256; i++)
5959 if (XOR (islower (i), ISLOWER (i))
5960 || toupper (i) != TOUPPER (i))
5961 return 2;
5962 return 0;
5963}
5964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005965if ac_fn_c_try_run "$LINENO"; then :
5966
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005967else
Matthias Kloseb9621712010-04-24 17:59:49 +00005968 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005969fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005970rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5971 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972fi
5973
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005974fi
5975fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5977$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005978if test $ac_cv_header_stdc = yes; then
5979
Matthias Kloseb9621712010-04-24 17:59:49 +00005980$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981
5982fi
5983
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005984for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5985fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005986ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005987shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005988unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005989sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5990sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005991sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005992sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005993sys/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 +00005994sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00005995bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005996do :
5997 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5998ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Benjamin Peterson79263252010-10-31 16:50:44 +00005999eval as_val=\$$as_ac_Header
6000 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006001 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006002#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006003_ACEOF
6004
6005fi
6006
Guido van Rossum627b2d71993-12-24 10:39:16 +00006007done
6008
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006009ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006010for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006011 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6013$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +00006014if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006015 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006016else
Matthias Kloseb9621712010-04-24 17:59:49 +00006017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006018/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006019#include <sys/types.h>
6020#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006021
Martin v. Löwis11437992002-04-12 09:54:03 +00006022int
6023main ()
6024{
6025if ((DIR *) 0)
6026return 0;
6027 ;
6028 return 0;
6029}
6030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006031if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006032 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006033else
Matthias Kloseb9621712010-04-24 17:59:49 +00006034 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006035fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006037fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006038eval ac_res=\$$as_ac_Header
6039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6040$as_echo "$ac_res" >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +00006041eval as_val=\$$as_ac_Header
6042 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006043 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006044#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006045_ACEOF
6046
6047ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006048fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006049
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006050done
6051# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6052if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6054$as_echo_n "checking for library containing opendir... " >&6; }
6055if test "${ac_cv_search_opendir+set}" = set; then :
6056 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006057else
Martin v. Löwis11437992002-04-12 09:54:03 +00006058 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006060/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006061
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006062/* Override any GCC internal prototype to avoid an error.
6063 Use char because int might match the return type of a GCC
6064 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006065#ifdef __cplusplus
6066extern "C"
6067#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006068char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006069int
6070main ()
6071{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006072return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006073 ;
6074 return 0;
6075}
6076_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006077for ac_lib in '' dir; do
6078 if test -z "$ac_lib"; then
6079 ac_res="none required"
6080 else
6081 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006082 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006083 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006084 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006085 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006086fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006087rm -f core conftest.err conftest.$ac_objext \
6088 conftest$ac_exeext
6089 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006090 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006091fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006092done
Matthias Kloseb9621712010-04-24 17:59:49 +00006093if test "${ac_cv_search_opendir+set}" = set; then :
6094
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006095else
6096 ac_cv_search_opendir=no
6097fi
6098rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006099LIBS=$ac_func_search_save_LIBS
6100fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6102$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006103ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006104if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006105 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006106
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006107fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006108
Michael W. Hudson54241132001-12-07 15:38:26 +00006109else
Matthias Kloseb9621712010-04-24 17:59:49 +00006110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6111$as_echo_n "checking for library containing opendir... " >&6; }
6112if test "${ac_cv_search_opendir+set}" = set; then :
6113 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006114else
6115 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006116cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006117/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006118
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006119/* Override any GCC internal prototype to avoid an error.
6120 Use char because int might match the return type of a GCC
6121 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006122#ifdef __cplusplus
6123extern "C"
6124#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006125char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006126int
6127main ()
6128{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006129return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006130 ;
6131 return 0;
6132}
6133_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006134for ac_lib in '' x; do
6135 if test -z "$ac_lib"; then
6136 ac_res="none required"
6137 else
6138 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006139 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006140 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006141 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006142 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006143fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006144rm -f core conftest.err conftest.$ac_objext \
6145 conftest$ac_exeext
6146 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006147 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006148fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006149done
Matthias Kloseb9621712010-04-24 17:59:49 +00006150if test "${ac_cv_search_opendir+set}" = set; then :
6151
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006152else
6153 ac_cv_search_opendir=no
6154fi
6155rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006156LIBS=$ac_func_search_save_LIBS
6157fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6159$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006160ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006161if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006162 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006163
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006164fi
6165
6166fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006167
Matthias Kloseb9621712010-04-24 17:59:49 +00006168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6169$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
6170if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
6171 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006172else
Matthias Kloseb9621712010-04-24 17:59:49 +00006173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006174/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006175#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006176int
6177main ()
6178{
6179return makedev(0, 0);
6180 ;
6181 return 0;
6182}
6183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006184if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006185 ac_cv_header_sys_types_h_makedev=yes
6186else
Matthias Kloseb9621712010-04-24 17:59:49 +00006187 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006188fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006189rm -f core conftest.err conftest.$ac_objext \
6190 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006191
6192fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6194$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006195
6196if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006197ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
6198if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006199
Matthias Kloseb9621712010-04-24 17:59:49 +00006200$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006201
6202fi
6203
6204
6205
6206 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006207 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
6208if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006209
Matthias Kloseb9621712010-04-24 17:59:49 +00006210$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006211
6212fi
6213
6214
6215 fi
6216fi
6217
Michael W. Hudson54241132001-12-07 15:38:26 +00006218
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006219# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006220for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006221do :
6222 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006223#ifdef HAVE_CURSES_H
6224#include <curses.h>
6225#endif
6226
Matthias Kloseb9621712010-04-24 17:59:49 +00006227"
6228if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006229 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006230#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006231_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006232
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006233fi
6234
6235done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006236
6237
Martin v. Löwis11017b12006-01-14 18:12:57 +00006238# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006239for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006240do :
6241 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 +00006242#ifdef HAVE_ASM_TYPES_H
6243#include <asm/types.h>
6244#endif
6245#ifdef HAVE_SYS_SOCKET_H
6246#include <sys/socket.h>
6247#endif
6248
Matthias Kloseb9621712010-04-24 17:59:49 +00006249"
6250if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006251 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006252#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006253_ACEOF
6254
6255fi
6256
6257done
6258
6259
Guido van Rossum627b2d71993-12-24 10:39:16 +00006260# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006261was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6263$as_echo_n "checking for clock_t in time.h... " >&6; }
6264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006265/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006266#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006267
6268_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006269if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006270 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006271 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006272else
Martin v. Löwis11437992002-04-12 09:54:03 +00006273
6274
Matthias Kloseb9621712010-04-24 17:59:49 +00006275$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006276
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006277
Guido van Rossum627b2d71993-12-24 10:39:16 +00006278fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006279rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006280
Matthias Kloseb9621712010-04-24 17:59:49 +00006281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6282$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006283
Neal Norwitz11690112002-07-30 01:08:28 +00006284# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6286$as_echo_n "checking for makedev... " >&6; }
6287cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006288/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006289
Jesus Cea740f53a2010-04-28 11:35:30 +00006290#if defined(MAJOR_IN_MKDEV)
6291#include <sys/mkdev.h>
6292#elif defined(MAJOR_IN_SYSMACROS)
6293#include <sys/sysmacros.h>
6294#else
6295#include <sys/types.h>
6296#endif
6297
Neal Norwitz11690112002-07-30 01:08:28 +00006298int
6299main ()
6300{
Jesus Cea740f53a2010-04-28 11:35:30 +00006301
6302 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006303 ;
6304 return 0;
6305}
Matthias Kloseb159a552010-04-25 21:00:44 +00006306
Neal Norwitz11690112002-07-30 01:08:28 +00006307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006308if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006309 ac_cv_has_makedev=yes
6310else
Matthias Kloseb9621712010-04-24 17:59:49 +00006311 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006312fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006313rm -f core conftest.err conftest.$ac_objext \
6314 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006315if test "$ac_cv_has_makedev" = "no"; then
6316 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006318/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006319
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006320#define _OSF_SOURCE 1
6321#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006322
Neal Norwitz11690112002-07-30 01:08:28 +00006323int
6324main ()
6325{
6326 makedev(0, 0)
6327 ;
6328 return 0;
6329}
6330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006331if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006332 ac_cv_has_makedev=yes
6333else
Matthias Kloseb9621712010-04-24 17:59:49 +00006334 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006335fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006336rm -f core conftest.err conftest.$ac_objext \
6337 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006338 if test "$ac_cv_has_makedev" = "yes"; then
6339
Matthias Kloseb9621712010-04-24 17:59:49 +00006340$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006341
6342 fi
6343fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6345$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006346if test "$ac_cv_has_makedev" = "yes"; then
6347
Matthias Kloseb9621712010-04-24 17:59:49 +00006348$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006349
6350fi
6351
Martin v. Löwis399a6892002-10-04 10:22:02 +00006352# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6353# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6354# defined, but the compiler does not support pragma redefine_extname,
6355# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6356# structures (such as rlimit64) without declaring them. As a
6357# work-around, disable LFS on such configurations
6358
6359use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6361$as_echo_n "checking Solaris LFS bug... " >&6; }
6362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006363/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006364
6365#define _LARGEFILE_SOURCE 1
6366#define _FILE_OFFSET_BITS 64
6367#include <sys/resource.h>
6368
Martin v. Löwis399a6892002-10-04 10:22:02 +00006369int
6370main ()
6371{
6372struct rlimit foo;
6373 ;
6374 return 0;
6375}
6376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006377if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006378 sol_lfs_bug=no
6379else
Matthias Kloseb9621712010-04-24 17:59:49 +00006380 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6384$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006385if test "$sol_lfs_bug" = "yes"; then
6386 use_lfs=no
6387fi
6388
6389if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006390# Two defines needed to enable largefile support on various platforms
6391# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006392
Matthias Kloseb9621712010-04-24 17:59:49 +00006393$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006394
6395
Matthias Kloseb9621712010-04-24 17:59:49 +00006396$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006397
Martin v. Löwis399a6892002-10-04 10:22:02 +00006398fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006399
Guido van Rossum84e7b241996-08-19 21:59:00 +00006400# Add some code to confdefs.h so that the test for off_t works on SCO
6401cat >> confdefs.h <<\EOF
6402#if defined(SCO_DS)
6403#undef _OFF_T
6404#endif
6405EOF
6406
Guido van Rossumef2255b2000-03-10 22:30:29 +00006407# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006408ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
6409if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006410
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006411else
Martin v. Löwis11437992002-04-12 09:54:03 +00006412
6413cat >>confdefs.h <<_ACEOF
6414#define mode_t int
6415_ACEOF
6416
6417fi
6418
Matthias Kloseb9621712010-04-24 17:59:49 +00006419ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
6420if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006421
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006422else
Martin v. Löwis11437992002-04-12 09:54:03 +00006423
6424cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006425#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006426_ACEOF
6427
6428fi
6429
Matthias Kloseb9621712010-04-24 17:59:49 +00006430ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6431if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006432
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006433else
Martin v. Löwis11437992002-04-12 09:54:03 +00006434
6435cat >>confdefs.h <<_ACEOF
6436#define pid_t int
6437_ACEOF
6438
6439fi
6440
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006441
Martin v. Löwis11437992002-04-12 09:54:03 +00006442cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006443#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006444_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006445
Matthias Kloseb9621712010-04-24 17:59:49 +00006446ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6447if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006448
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006449else
Martin v. Löwis11437992002-04-12 09:54:03 +00006450
6451cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006452#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006453_ACEOF
6454
6455fi
6456
Matthias Kloseb9621712010-04-24 17:59:49 +00006457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6458$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
6459if test "${ac_cv_type_uid_t+set}" = set; then :
6460 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006461else
Matthias Kloseb9621712010-04-24 17:59:49 +00006462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006463/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006464#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006465
6466_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006467if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006468 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006469 ac_cv_type_uid_t=yes
6470else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006471 ac_cv_type_uid_t=no
6472fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006473rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006474
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006475fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6477$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006478if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006479
Matthias Kloseb9621712010-04-24 17:59:49 +00006480$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006481
6482
Matthias Kloseb9621712010-04-24 17:59:49 +00006483$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006484
6485fi
6486
Matthias Kloseb9621712010-04-24 17:59:49 +00006487ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6488case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006489 no|yes) ;; #(
6490 *)
6491
Matthias Kloseb9621712010-04-24 17:59:49 +00006492$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006493
6494
6495cat >>confdefs.h <<_ACEOF
6496#define uint32_t $ac_cv_c_uint32_t
6497_ACEOF
6498;;
6499 esac
6500
Matthias Kloseb9621712010-04-24 17:59:49 +00006501ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6502case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006503 no|yes) ;; #(
6504 *)
6505
Matthias Kloseb9621712010-04-24 17:59:49 +00006506$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006507
6508
6509cat >>confdefs.h <<_ACEOF
6510#define uint64_t $ac_cv_c_uint64_t
6511_ACEOF
6512;;
6513 esac
6514
Matthias Kloseb9621712010-04-24 17:59:49 +00006515ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6516case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006517 no|yes) ;; #(
6518 *)
6519
6520cat >>confdefs.h <<_ACEOF
6521#define int32_t $ac_cv_c_int32_t
6522_ACEOF
6523;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006524esac
6525
Matthias Kloseb9621712010-04-24 17:59:49 +00006526ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6527case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006528 no|yes) ;; #(
6529 *)
6530
6531cat >>confdefs.h <<_ACEOF
6532#define int64_t $ac_cv_c_int64_t
6533_ACEOF
6534;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006535esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006536
Matthias Kloseb9621712010-04-24 17:59:49 +00006537ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
6538if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006539
Matthias Kloseb9621712010-04-24 17:59:49 +00006540$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006541
6542fi
6543
Jack Jansendd19cf82001-12-06 22:36:17 +00006544
Michael W. Hudson54241132001-12-07 15:38:26 +00006545# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006546# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006547# The cast to long int works around a bug in the HP C Compiler
6548# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6549# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6550# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6552$as_echo_n "checking size of int... " >&6; }
6553if test "${ac_cv_sizeof_int+set}" = set; then :
6554 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006555else
Matthias Kloseb9621712010-04-24 17:59:49 +00006556 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 +00006557
Martin v. Löwis11437992002-04-12 09:54:03 +00006558else
Matthias Kloseb9621712010-04-24 17:59:49 +00006559 if test "$ac_cv_type_int" = yes; then
6560 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6561$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00006562{ as_fn_set_status 77
6563as_fn_error "cannot compute sizeof (int)
6564See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006565 else
6566 ac_cv_sizeof_int=0
6567 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006568fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006569
Martin v. Löwis11437992002-04-12 09:54:03 +00006570fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6572$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006573
6574
6575
Martin v. Löwis11437992002-04-12 09:54:03 +00006576cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006577#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006578_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006579
6580
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006581# The cast to long int works around a bug in the HP C Compiler
6582# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6583# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6584# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6586$as_echo_n "checking size of long... " >&6; }
6587if test "${ac_cv_sizeof_long+set}" = set; then :
6588 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006589else
Matthias Kloseb9621712010-04-24 17:59:49 +00006590 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 +00006591
Martin v. Löwis11437992002-04-12 09:54:03 +00006592else
Matthias Kloseb9621712010-04-24 17:59:49 +00006593 if test "$ac_cv_type_long" = yes; then
6594 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6595$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00006596{ as_fn_set_status 77
6597as_fn_error "cannot compute sizeof (long)
6598See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006599 else
6600 ac_cv_sizeof_long=0
6601 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006602fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006603
Martin v. Löwis11437992002-04-12 09:54:03 +00006604fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6606$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006607
6608
6609
Martin v. Löwis11437992002-04-12 09:54:03 +00006610cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006611#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006612_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006613
6614
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006615# The cast to long int works around a bug in the HP C Compiler
6616# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6617# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6618# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6620$as_echo_n "checking size of void *... " >&6; }
6621if test "${ac_cv_sizeof_void_p+set}" = set; then :
6622 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006623else
Matthias Kloseb9621712010-04-24 17:59:49 +00006624 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 +00006625
Martin v. Löwis11437992002-04-12 09:54:03 +00006626else
Matthias Kloseb9621712010-04-24 17:59:49 +00006627 if test "$ac_cv_type_void_p" = yes; then
6628 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6629$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00006630{ as_fn_set_status 77
6631as_fn_error "cannot compute sizeof (void *)
6632See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006633 else
6634 ac_cv_sizeof_void_p=0
6635 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006636fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006637
Martin v. Löwis11437992002-04-12 09:54:03 +00006638fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6640$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006641
6642
6643
Martin v. Löwis11437992002-04-12 09:54:03 +00006644cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006645#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006646_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006647
6648
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006649# The cast to long int works around a bug in the HP C Compiler
6650# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6651# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6652# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6654$as_echo_n "checking size of short... " >&6; }
6655if test "${ac_cv_sizeof_short+set}" = set; then :
6656 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006657else
Matthias Kloseb9621712010-04-24 17:59:49 +00006658 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 +00006659
Martin v. Löwis11437992002-04-12 09:54:03 +00006660else
Matthias Kloseb9621712010-04-24 17:59:49 +00006661 if test "$ac_cv_type_short" = yes; then
6662 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6663$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00006664{ as_fn_set_status 77
6665as_fn_error "cannot compute sizeof (short)
6666See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006667 else
6668 ac_cv_sizeof_short=0
6669 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006670fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006671
Martin v. Löwis11437992002-04-12 09:54:03 +00006672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6674$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006675
6676
6677
Martin v. Löwis11437992002-04-12 09:54:03 +00006678cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006679#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006680_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006681
6682
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006683# The cast to long int works around a bug in the HP C Compiler
6684# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6685# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6686# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6688$as_echo_n "checking size of float... " >&6; }
6689if test "${ac_cv_sizeof_float+set}" = set; then :
6690 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006691else
Matthias Kloseb9621712010-04-24 17:59:49 +00006692 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 +00006693
Martin v. Löwis11437992002-04-12 09:54:03 +00006694else
Matthias Kloseb9621712010-04-24 17:59:49 +00006695 if test "$ac_cv_type_float" = yes; then
6696 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6697$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00006698{ as_fn_set_status 77
6699as_fn_error "cannot compute sizeof (float)
6700See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006701 else
6702 ac_cv_sizeof_float=0
6703 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006704fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006705
Martin v. Löwis11437992002-04-12 09:54:03 +00006706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6708$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006709
6710
6711
Martin v. Löwis11437992002-04-12 09:54:03 +00006712cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006713#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006714_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006715
6716
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006717# The cast to long int works around a bug in the HP C Compiler
6718# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6719# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6720# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6722$as_echo_n "checking size of double... " >&6; }
6723if test "${ac_cv_sizeof_double+set}" = set; then :
6724 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006725else
Matthias Kloseb9621712010-04-24 17:59:49 +00006726 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 +00006727
Martin v. Löwis11437992002-04-12 09:54:03 +00006728else
Matthias Kloseb9621712010-04-24 17:59:49 +00006729 if test "$ac_cv_type_double" = yes; then
6730 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6731$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00006732{ as_fn_set_status 77
6733as_fn_error "cannot compute sizeof (double)
6734See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006735 else
6736 ac_cv_sizeof_double=0
6737 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006738fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006739
Martin v. Löwis11437992002-04-12 09:54:03 +00006740fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6742$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006743
6744
6745
Martin v. Löwis11437992002-04-12 09:54:03 +00006746cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006747#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006748_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006749
6750
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006751# The cast to long int works around a bug in the HP C Compiler
6752# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6753# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6754# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6756$as_echo_n "checking size of fpos_t... " >&6; }
6757if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
6758 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006759else
Matthias Kloseb9621712010-04-24 17:59:49 +00006760 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 +00006761
Martin v. Löwis11437992002-04-12 09:54:03 +00006762else
Matthias Kloseb9621712010-04-24 17:59:49 +00006763 if test "$ac_cv_type_fpos_t" = yes; then
6764 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6765$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00006766{ as_fn_set_status 77
6767as_fn_error "cannot compute sizeof (fpos_t)
6768See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006769 else
6770 ac_cv_sizeof_fpos_t=0
6771 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006772fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006773
Martin v. Löwis11437992002-04-12 09:54:03 +00006774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6776$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006777
6778
6779
Martin v. Löwis11437992002-04-12 09:54:03 +00006780cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006781#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006782_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006783
Michael W. Hudson54241132001-12-07 15:38:26 +00006784
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006785# The cast to long int works around a bug in the HP C Compiler
6786# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6787# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6788# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6790$as_echo_n "checking size of size_t... " >&6; }
6791if test "${ac_cv_sizeof_size_t+set}" = set; then :
6792 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006793else
Matthias Kloseb9621712010-04-24 17:59:49 +00006794 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 +00006795
Martin v. Löwis18e16552006-02-15 17:27:45 +00006796else
Matthias Kloseb9621712010-04-24 17:59:49 +00006797 if test "$ac_cv_type_size_t" = yes; then
6798 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6799$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00006800{ as_fn_set_status 77
6801as_fn_error "cannot compute sizeof (size_t)
6802See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006803 else
6804 ac_cv_sizeof_size_t=0
6805 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006806fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006807
Martin v. Löwis18e16552006-02-15 17:27:45 +00006808fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6810$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006811
6812
6813
Martin v. Löwis18e16552006-02-15 17:27:45 +00006814cat >>confdefs.h <<_ACEOF
6815#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6816_ACEOF
6817
6818
Christian Heimes400adb02008-02-01 08:12:03 +00006819# The cast to long int works around a bug in the HP C Compiler
6820# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6821# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6822# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6824$as_echo_n "checking size of pid_t... " >&6; }
6825if test "${ac_cv_sizeof_pid_t+set}" = set; then :
6826 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006827else
Matthias Kloseb9621712010-04-24 17:59:49 +00006828 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 +00006829
Christian Heimes400adb02008-02-01 08:12:03 +00006830else
Matthias Kloseb9621712010-04-24 17:59:49 +00006831 if test "$ac_cv_type_pid_t" = yes; then
6832 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6833$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00006834{ as_fn_set_status 77
6835as_fn_error "cannot compute sizeof (pid_t)
6836See \`config.log' for more details." "$LINENO" 5; }; }
Christian Heimes400adb02008-02-01 08:12:03 +00006837 else
6838 ac_cv_sizeof_pid_t=0
6839 fi
6840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006841
Christian Heimes400adb02008-02-01 08:12:03 +00006842fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6844$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006845
6846
6847
6848cat >>confdefs.h <<_ACEOF
6849#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6850_ACEOF
6851
6852
Michael W. Hudson54241132001-12-07 15:38:26 +00006853
Matthias Kloseb9621712010-04-24 17:59:49 +00006854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6855$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006856have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006858/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006859
Martin v. Löwis11437992002-04-12 09:54:03 +00006860int
6861main ()
6862{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006863long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006864 ;
6865 return 0;
6866}
6867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006868if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006869
6870
Matthias Kloseb9621712010-04-24 17:59:49 +00006871$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006872
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006873 have_long_long=yes
6874
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006875fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6878$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006879if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006880# The cast to long int works around a bug in the HP C Compiler
6881# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6882# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6883# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6885$as_echo_n "checking size of long long... " >&6; }
6886if test "${ac_cv_sizeof_long_long+set}" = set; then :
6887 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006888else
Matthias Kloseb9621712010-04-24 17:59:49 +00006889 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 +00006890
Martin v. Löwis11437992002-04-12 09:54:03 +00006891else
Matthias Kloseb9621712010-04-24 17:59:49 +00006892 if test "$ac_cv_type_long_long" = yes; then
6893 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6894$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00006895{ as_fn_set_status 77
6896as_fn_error "cannot compute sizeof (long long)
6897See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006898 else
6899 ac_cv_sizeof_long_long=0
6900 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006901fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006902
Martin v. Löwis11437992002-04-12 09:54:03 +00006903fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6905$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006906
6907
6908
Martin v. Löwis11437992002-04-12 09:54:03 +00006909cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006910#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006911_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006912
Michael W. Hudson54241132001-12-07 15:38:26 +00006913
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006914fi
6915
Matthias Kloseb9621712010-04-24 17:59:49 +00006916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6917$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006918have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006920/* end confdefs.h. */
6921
6922int
6923main ()
6924{
6925long double x; x = (long double)0;
6926 ;
6927 return 0;
6928}
6929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006930if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006931
6932
Matthias Kloseb9621712010-04-24 17:59:49 +00006933$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006934
6935 have_long_double=yes
6936
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006937fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
6940$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006941if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006942# The cast to long int works around a bug in the HP C Compiler
6943# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6944# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6945# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
6947$as_echo_n "checking size of long double... " >&6; }
6948if test "${ac_cv_sizeof_long_double+set}" = set; then :
6949 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006950else
Matthias Kloseb9621712010-04-24 17:59:49 +00006951 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 +00006952
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006953else
Matthias Kloseb9621712010-04-24 17:59:49 +00006954 if test "$ac_cv_type_long_double" = yes; then
6955 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6956$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00006957{ as_fn_set_status 77
6958as_fn_error "cannot compute sizeof (long double)
6959See \`config.log' for more details." "$LINENO" 5; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006960 else
6961 ac_cv_sizeof_long_double=0
6962 fi
6963fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006964
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
6967$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006968
6969
6970
6971cat >>confdefs.h <<_ACEOF
6972#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
6973_ACEOF
6974
6975
6976fi
6977
6978
Matthias Kloseb9621712010-04-24 17:59:49 +00006979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
6980$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00006981have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00006983/* end confdefs.h. */
6984
6985int
6986main ()
6987{
6988_Bool x; x = (_Bool)0;
6989 ;
6990 return 0;
6991}
6992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006993if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00006994
6995
Matthias Kloseb9621712010-04-24 17:59:49 +00006996$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00006997
6998 have_c99_bool=yes
6999
Thomas Woutersb2137042007-02-01 18:02:27 +00007000fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7003$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007004if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007005# The cast to long int works around a bug in the HP C Compiler
7006# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7007# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7008# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7010$as_echo_n "checking size of _Bool... " >&6; }
7011if test "${ac_cv_sizeof__Bool+set}" = set; then :
7012 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007013else
Matthias Kloseb9621712010-04-24 17:59:49 +00007014 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 +00007015
Thomas Woutersb2137042007-02-01 18:02:27 +00007016else
Matthias Kloseb9621712010-04-24 17:59:49 +00007017 if test "$ac_cv_type__Bool" = yes; then
7018 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7019$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00007020{ as_fn_set_status 77
7021as_fn_error "cannot compute sizeof (_Bool)
7022See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007023 else
7024 ac_cv_sizeof__Bool=0
7025 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007026fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007027
Thomas Woutersb2137042007-02-01 18:02:27 +00007028fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7030$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007031
7032
7033
Thomas Woutersb2137042007-02-01 18:02:27 +00007034cat >>confdefs.h <<_ACEOF
7035#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7036_ACEOF
7037
7038
7039fi
7040
Matthias Kloseb9621712010-04-24 17:59:49 +00007041ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007042 #include <stdint.h>
7043 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007044 #ifdef HAVE_INTTYPES_H
7045 #include <inttypes.h>
7046 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007047"
7048if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007049
7050cat >>confdefs.h <<_ACEOF
7051#define HAVE_UINTPTR_T 1
7052_ACEOF
7053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007054# The cast to long int works around a bug in the HP C Compiler
7055# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7056# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7057# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7059$as_echo_n "checking size of uintptr_t... " >&6; }
7060if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
7061 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007062else
Matthias Kloseb9621712010-04-24 17:59:49 +00007063 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 +00007064
Martin v. Löwis11437992002-04-12 09:54:03 +00007065else
Matthias Kloseb9621712010-04-24 17:59:49 +00007066 if test "$ac_cv_type_uintptr_t" = yes; then
7067 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7068$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00007069{ as_fn_set_status 77
7070as_fn_error "cannot compute sizeof (uintptr_t)
7071See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007072 else
7073 ac_cv_sizeof_uintptr_t=0
7074 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007075fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007076
Martin v. Löwis11437992002-04-12 09:54:03 +00007077fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7079$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007080
7081
7082
Martin v. Löwis11437992002-04-12 09:54:03 +00007083cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007084#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007085_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007086
Michael W. Hudson54241132001-12-07 15:38:26 +00007087
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007088fi
7089
Thomas Wouters89f507f2006-12-13 04:49:30 +00007090
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007091# The cast to long int works around a bug in the HP C Compiler
7092# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7093# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7094# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7096$as_echo_n "checking size of off_t... " >&6; }
7097if test "${ac_cv_sizeof_off_t+set}" = set; then :
7098 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007099else
Matthias Kloseb9621712010-04-24 17:59:49 +00007100 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007101#ifdef HAVE_SYS_TYPES_H
7102#include <sys/types.h>
7103#endif
7104
Matthias Kloseb9621712010-04-24 17:59:49 +00007105"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007106
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007107else
Matthias Kloseb9621712010-04-24 17:59:49 +00007108 if test "$ac_cv_type_off_t" = yes; then
7109 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7110$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00007111{ as_fn_set_status 77
7112as_fn_error "cannot compute sizeof (off_t)
7113See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007114 else
7115 ac_cv_sizeof_off_t=0
7116 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007117fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007118
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007119fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7121$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007122
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007123
7124
Martin v. Löwis11437992002-04-12 09:54:03 +00007125cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007126#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007127_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007128
Michael W. Hudson54241132001-12-07 15:38:26 +00007129
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007130
Matthias Kloseb9621712010-04-24 17:59:49 +00007131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7132$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007133if test "$have_long_long" = yes
7134then
7135if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007136 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007137
Matthias Kloseb9621712010-04-24 17:59:49 +00007138$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007139
Matthias Kloseb9621712010-04-24 17:59:49 +00007140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7141$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007142else
Matthias Kloseb9621712010-04-24 17:59:49 +00007143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7144$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007145fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007146else
Matthias Kloseb9621712010-04-24 17:59:49 +00007147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7148$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007149fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007150
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007151# The cast to long int works around a bug in the HP C Compiler
7152# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7153# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7154# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7156$as_echo_n "checking size of time_t... " >&6; }
7157if test "${ac_cv_sizeof_time_t+set}" = set; then :
7158 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007159else
Matthias Kloseb9621712010-04-24 17:59:49 +00007160 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007161#ifdef HAVE_SYS_TYPES_H
7162#include <sys/types.h>
7163#endif
7164#ifdef HAVE_TIME_H
7165#include <time.h>
7166#endif
7167
Matthias Kloseb9621712010-04-24 17:59:49 +00007168"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007169
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007170else
Matthias Kloseb9621712010-04-24 17:59:49 +00007171 if test "$ac_cv_type_time_t" = yes; then
7172 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7173$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00007174{ as_fn_set_status 77
7175as_fn_error "cannot compute sizeof (time_t)
7176See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007177 else
7178 ac_cv_sizeof_time_t=0
7179 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007180fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007181
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007182fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7184$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007185
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007186
7187
Martin v. Löwis11437992002-04-12 09:54:03 +00007188cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007189#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007190_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007191
Michael W. Hudson54241132001-12-07 15:38:26 +00007192
7193
Trent Mick635f6fb2000-08-23 21:33:05 +00007194# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007195ac_save_cc="$CC"
7196if test "$ac_cv_kpthread" = "yes"
7197then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007198elif test "$ac_cv_kthread" = "yes"
7199then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007200elif test "$ac_cv_pthread" = "yes"
7201then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007202fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007203
Matthias Kloseb9621712010-04-24 17:59:49 +00007204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7205$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007206have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007208/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007209
7210 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007211int
7212main ()
7213{
Guido van Rossum12580492000-09-24 16:47:19 +00007214pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007215 ;
7216 return 0;
7217}
Matthias Kloseb159a552010-04-25 21:00:44 +00007218
Martin v. Löwis11437992002-04-12 09:54:03 +00007219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007220if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007221 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7225$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007226if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007227 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007228# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7229# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7230# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7232$as_echo_n "checking size of pthread_t... " >&6; }
7233if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
7234 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007235else
Matthias Kloseb9621712010-04-24 17:59:49 +00007236 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007237#ifdef HAVE_PTHREAD_H
7238#include <pthread.h>
7239#endif
7240
Matthias Kloseb9621712010-04-24 17:59:49 +00007241"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007242
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007243else
Matthias Kloseb9621712010-04-24 17:59:49 +00007244 if test "$ac_cv_type_pthread_t" = yes; then
7245 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7246$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00007247{ as_fn_set_status 77
7248as_fn_error "cannot compute sizeof (pthread_t)
7249See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007250 else
7251 ac_cv_sizeof_pthread_t=0
7252 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007253fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007254
Trent Mick635f6fb2000-08-23 21:33:05 +00007255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7257$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007258
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007259
7260
Martin v. Löwis11437992002-04-12 09:54:03 +00007261cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007262#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007263_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007264
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007265
Trent Mick635f6fb2000-08-23 21:33:05 +00007266fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007267CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007268
Michael W. Hudson54241132001-12-07 15:38:26 +00007269
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007270case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007271 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007272 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7273 ;;
7274 Darwin/*)
7275 OTHER_LIBTOOL_OPT=""
7276 ;;
7277esac
7278
7279
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007280ARCH_RUN_32BIT=""
7281
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007282case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007283 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007284 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7285 if test "${enable_universalsdk}"; then
7286 :
7287 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007288 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007289 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007290 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007291 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007292 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007293 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007294 if test ${gcc_version} '<' 4.0
7295 then
7296 LIBTOOL_CRUFT="-lcc_dynamic"
7297 else
7298 LIBTOOL_CRUFT=""
7299 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007300 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007301 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007302else
Matthias Kloseb9621712010-04-24 17:59:49 +00007303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007304/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007305
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007306 #include <unistd.h>
7307 int main(int argc, char*argv[])
7308 {
7309 if (sizeof(long) == 4) {
7310 return 0;
7311 } else {
7312 return 1;
7313 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007314 }
7315
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007317if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007318 ac_osx_32bit=yes
7319else
Matthias Kloseb9621712010-04-24 17:59:49 +00007320 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007321fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007322rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7323 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007324fi
7325
7326
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007327 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007328 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007329 i386)
7330 MACOSX_DEFAULT_ARCH="i386"
7331 ;;
7332 ppc)
7333 MACOSX_DEFAULT_ARCH="ppc"
7334 ;;
7335 *)
Benjamin Peterson79263252010-10-31 16:50:44 +00007336 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007337 ;;
7338 esac
7339 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007340 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007341 i386)
7342 MACOSX_DEFAULT_ARCH="x86_64"
7343 ;;
7344 ppc)
7345 MACOSX_DEFAULT_ARCH="ppc64"
7346 ;;
7347 *)
Benjamin Peterson79263252010-10-31 16:50:44 +00007348 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007349 ;;
7350 esac
7351
7352 #ARCH_RUN_32BIT="true"
7353 fi
7354
7355 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007356 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007357 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007358esac
7359
Matthias Kloseb9621712010-04-24 17:59:49 +00007360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7361$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007362if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007363then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007364 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007365 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007366 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007367
Matthias Kloseb9621712010-04-24 17:59:49 +00007368$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007369
Matthias Kloseb9621712010-04-24 17:59:49 +00007370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7371$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007372 if test $enable_shared = "yes"
7373 then
Benjamin Peterson79263252010-10-31 16:50:44 +00007374 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 +00007375 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007376else
Matthias Kloseb9621712010-04-24 17:59:49 +00007377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7378$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007379fi
7380
Matthias Kloseb9621712010-04-24 17:59:49 +00007381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7382$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007383case $ac_sys_system/$ac_sys_release in
7384 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007385
Matthias Kloseb9621712010-04-24 17:59:49 +00007386$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007387
Matthias Kloseb9621712010-04-24 17:59:49 +00007388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7389$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007390 ;;
7391 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7393$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007394 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007395esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007396
Guido van Rossum0a516c91994-09-12 10:58:40 +00007397# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007398
Michael W. Hudson54241132001-12-07 15:38:26 +00007399
7400
7401
7402
Benjamin Peterson99f03762010-04-11 22:15:28 +00007403
Thomas Wouters477c8d52006-05-27 19:21:47 +00007404
Georg Brandlb1441c72009-01-03 22:33:39 +00007405
Thomas Wouters477c8d52006-05-27 19:21:47 +00007406cat >>confdefs.h <<_ACEOF
7407#define SHLIB_EXT "$SO"
7408_ACEOF
7409
Guido van Rossum0a516c91994-09-12 10:58:40 +00007410# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007411# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007412# (Shared libraries in this instance are shared modules to be loaded into
7413# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7415$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007416if test -z "$LDSHARED"
7417then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007418 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007419 AIX*)
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00007420 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp -L\$(srcdir)"
Guido van Rossumce608b02001-09-28 15:59:38 +00007421 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007422 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007423 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007424 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007425 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007426 if test "$GCC" = "yes" ; then
7427 LDSHARED='$(CC) -shared'
7428 LDCXXSHARED='$(CXX) -shared'
7429 else
7430 LDSHARED='$(CC) -G'
7431 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007432 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007433 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007434 if test "$GCC" = "yes" ; then
7435 LDSHARED='$(CC) -shared'
7436 LDCXXSHARED='$(CXX) -shared'
7437 else
7438 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007439 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007440 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007441 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007442 LDSHARED='$(CC) -bundle'
7443 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007444 if test "$enable_framework" ; then
7445 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007446 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7447 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007448 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007449 else
7450 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007451 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007452 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007453 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007454 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007455 LDSHARED='$(CC) -bundle'
7456 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007457 if test "$enable_framework" ; then
7458 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007459 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7460 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007461 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007462 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007463 # No framework, use the Python app as bundle-loader
7464 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007465 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007466 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007467 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007468 Darwin/*)
7469 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7470 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007471
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007472 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007473 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007474 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007475 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007476 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007477 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7478 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007479 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007480 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007481 LDSHARED='$(CC) -bundle'
7482 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007483 if test "$enable_framework" ; then
7484 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007485 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7486 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007487 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007488 else
7489 # No framework, use the Python app as bundle-loader
7490 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7491 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007492 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007493 fi
7494 fi
7495 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007496 Linux*|GNU*|QNX*)
7497 LDSHARED='$(CC) -shared'
7498 LDCXXSHARED='$(CXX) -shared';;
7499 BSD/OS*/4*)
7500 LDSHARED="gcc -shared"
7501 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007502 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007503 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007504 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007505 LDSHARED='$(CC) -shared'
7506 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007507 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007508 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007509 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007510 OpenBSD*)
7511 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7512 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007513 LDSHARED='$(CC) -shared $(CCSHARED)'
7514 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007515 else
7516 case `uname -r` in
7517 [01].* | 2.[0-7] | 2.[0-7].*)
7518 LDSHARED="ld -Bshareable ${LDFLAGS}"
7519 ;;
7520 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007521 LDSHARED='$(CC) -shared $(CCSHARED)'
7522 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007523 ;;
7524 esac
7525 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007526 NetBSD*|DragonFly*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007527 LDSHARED="cc -shared"
7528 LDCXXSHARED="c++ -shared";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007529 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007530 if test "$GCC" = "yes" ; then
7531 LDSHARED='$(CC) -shared'
7532 LDCXXSHARED='$(CXX) -shared'
7533 else
7534 LDSHARED='$(CC) -G'
7535 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007536 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007537 SCO_SV*)
7538 LDSHARED='$(CC) -Wl,-G,-Bexport'
7539 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7540 CYGWIN*)
7541 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7542 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007543 *) LDSHARED="ld";;
7544 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7547$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007548LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007549BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007550# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007551# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7553$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007554if test -z "$CCSHARED"
7555then
Guido van Rossum07397971997-04-29 21:49:50 +00007556 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007557 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007558 then CCSHARED="-fPIC";
7559 elif test `uname -p` = sparc;
7560 then CCSHARED="-xcode=pic32";
7561 else CCSHARED="-Kpic";
7562 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007563 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007564 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007565 else CCSHARED="+z";
7566 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007567 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007568 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007569 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007570 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007571 if test "$GCC" = "yes"
7572 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007573 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007574 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007575 SCO_SV*)
7576 if test "$GCC" = "yes"
7577 then CCSHARED="-fPIC"
7578 else CCSHARED="-Kpic -belf"
7579 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007580 IRIX*/6*) case $CC in
7581 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007582 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007583 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007584 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7587$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007588# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007589# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7591$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007592if test -z "$LINKFORSHARED"
7593then
Guido van Rossum07397971997-04-29 21:49:50 +00007594 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007595 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007596 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007597 LINKFORSHARED="-Wl,-E -Wl,+s";;
7598# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007599 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007600 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007601 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007602 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007603 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007604 if test "$enable_framework"
7605 then
Jack Jansenda49e192005-01-07 13:08:22 +00007606 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007607 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007608 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007609 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007610 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007611 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007612 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007613 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7614 then
7615 LINKFORSHARED="-Wl,--export-dynamic"
7616 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007617 SunOS/5*) case $CC in
7618 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007619 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007620 then
7621 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007622 fi;;
7623 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007624 CYGWIN*)
7625 if test $enable_shared = "no"
7626 then
7627 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7628 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007629 QNX*)
7630 # -Wl,-E causes the symbols to be added to the dynamic
7631 # symbol table so that they can be found when a module
7632 # is loaded. -N 2048K causes the stack size to be set
7633 # to 2048 kilobytes so that the stack doesn't overflow
7634 # when running test_compile.py.
7635 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007636 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007637fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7639$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007640
Michael W. Hudson54241132001-12-07 15:38:26 +00007641
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007642
Matthias Kloseb9621712010-04-24 17:59:49 +00007643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7644$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007645if test ! "$LIBRARY" = "$LDLIBRARY"
7646then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007647 case $ac_sys_system in
7648 CYGWIN*)
7649 # Cygwin needs CCSHARED when building extension DLLs
7650 # but not when building the interpreter DLL.
7651 CFLAGSFORSHARED='';;
7652 *)
7653 CFLAGSFORSHARED='$(CCSHARED)'
7654 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007655fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7657$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007658
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007659# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7660# library (with --enable-shared).
7661# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007662# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7663# if it is not required, since it creates a dependency of the shared library
7664# to LIBS. This, in turn, means that applications linking the shared libpython
7665# don't need to link LIBS explicitly. The default should be only changed
7666# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007667
Matthias Kloseb9621712010-04-24 17:59:49 +00007668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7669$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007670case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007671 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007672 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007673esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7675$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007676
7677
Guido van Rossum627b2d71993-12-24 10:39:16 +00007678# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7680$as_echo_n "checking for dlopen in -ldl... " >&6; }
7681if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
7682 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007683else
Martin v. Löwis11437992002-04-12 09:54:03 +00007684 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007685LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007687/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007688
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007689/* Override any GCC internal prototype to avoid an error.
7690 Use char because int might match the return type of a GCC
7691 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007692#ifdef __cplusplus
7693extern "C"
7694#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007695char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007696int
7697main ()
7698{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007699return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007700 ;
7701 return 0;
7702}
7703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007704if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007705 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007706else
Matthias Kloseb9621712010-04-24 17:59:49 +00007707 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007709rm -f core conftest.err conftest.$ac_objext \
7710 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007711LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007712fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7714$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
7715if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007716 cat >>confdefs.h <<_ACEOF
7717#define HAVE_LIBDL 1
7718_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007719
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007720 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007721
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007722fi
7723 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7725$as_echo_n "checking for shl_load in -ldld... " >&6; }
7726if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
7727 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007728else
Martin v. Löwis11437992002-04-12 09:54:03 +00007729 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007730LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007732/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007733
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007734/* Override any GCC internal prototype to avoid an error.
7735 Use char because int might match the return type of a GCC
7736 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007737#ifdef __cplusplus
7738extern "C"
7739#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007740char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007741int
7742main ()
7743{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007744return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007745 ;
7746 return 0;
7747}
7748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007749if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007750 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007751else
Matthias Kloseb9621712010-04-24 17:59:49 +00007752 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007753fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007754rm -f core conftest.err conftest.$ac_objext \
7755 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007756LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007757fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7759$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
7760if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007761 cat >>confdefs.h <<_ACEOF
7762#define HAVE_LIBDLD 1
7763_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007764
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007765 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007766
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007767fi
7768 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007769
Georg Brandlb1441c72009-01-03 22:33:39 +00007770# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007771if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7773$as_echo_n "checking for library containing sem_init... " >&6; }
7774if test "${ac_cv_search_sem_init+set}" = set; then :
7775 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007776else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007777 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007779/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007780
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007781/* Override any GCC internal prototype to avoid an error.
7782 Use char because int might match the return type of a GCC
7783 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007784#ifdef __cplusplus
7785extern "C"
7786#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007787char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007788int
7789main ()
7790{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007791return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007792 ;
7793 return 0;
7794}
7795_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007796for ac_lib in '' pthread rt posix4; do
7797 if test -z "$ac_lib"; then
7798 ac_res="none required"
7799 else
7800 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007801 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007802 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007803 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007804 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007806rm -f core conftest.err conftest.$ac_objext \
7807 conftest$ac_exeext
7808 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007809 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007810fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007811done
Matthias Kloseb9621712010-04-24 17:59:49 +00007812if test "${ac_cv_search_sem_init+set}" = set; then :
7813
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007814else
7815 ac_cv_search_sem_init=no
7816fi
7817rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007818LIBS=$ac_func_search_save_LIBS
7819fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7821$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007822ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007823if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007824 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007825
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007826fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007827 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007828 # posix4 on Solaris 2.6
7829 # pthread (first!) on Linux
7830fi
7831
Martin v. Löwis19d17342003-06-14 21:03:05 +00007832# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7834$as_echo_n "checking for textdomain in -lintl... " >&6; }
7835if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
7836 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007837else
7838 ac_check_lib_save_LIBS=$LIBS
7839LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007841/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007842
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007843/* Override any GCC internal prototype to avoid an error.
7844 Use char because int might match the return type of a GCC
7845 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007846#ifdef __cplusplus
7847extern "C"
7848#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007849char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007850int
7851main ()
7852{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007853return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007854 ;
7855 return 0;
7856}
7857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007858if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007859 ac_cv_lib_intl_textdomain=yes
7860else
Matthias Kloseb9621712010-04-24 17:59:49 +00007861 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007863rm -f core conftest.err conftest.$ac_objext \
7864 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007865LIBS=$ac_check_lib_save_LIBS
7866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7868$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
7869if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007870
Matthias Kloseb9621712010-04-24 17:59:49 +00007871$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007872
Brett Cannonc6d936e2009-06-07 20:09:53 +00007873 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007874fi
7875
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007876
7877# checks for system dependent C++ extensions support
7878case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007879 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7880$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007882/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007883
7884 #include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007885int
7886main ()
7887{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007888loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007889 ;
7890 return 0;
7891}
Matthias Kloseb159a552010-04-25 21:00:44 +00007892
Martin v. Löwis11437992002-04-12 09:54:03 +00007893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007894if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007895
Matthias Kloseb159a552010-04-25 21:00:44 +00007896
Matthias Kloseb9621712010-04-24 17:59:49 +00007897$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007898
Matthias Kloseb159a552010-04-25 21:00:44 +00007899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007900$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007901
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007902else
Matthias Kloseb159a552010-04-25 21:00:44 +00007903
7904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007905$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007906
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007907fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007908rm -f core conftest.err conftest.$ac_objext \
7909 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007910 *) ;;
7911esac
7912
Guido van Rossum70c7f481998-03-26 18:44:10 +00007913# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7915$as_echo_n "checking for t_open in -lnsl... " >&6; }
7916if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
7917 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007918else
Martin v. Löwis11437992002-04-12 09:54:03 +00007919 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007920LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007922/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007923
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007924/* Override any GCC internal prototype to avoid an error.
7925 Use char because int might match the return type of a GCC
7926 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007927#ifdef __cplusplus
7928extern "C"
7929#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007930char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007931int
7932main ()
7933{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007934return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007935 ;
7936 return 0;
7937}
7938_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007939if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007940 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007941else
Matthias Kloseb9621712010-04-24 17:59:49 +00007942 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007943fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007944rm -f core conftest.err conftest.$ac_objext \
7945 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007946LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007947fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
7949$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
7950if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007951 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007952fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00007953 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00007954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
7955$as_echo_n "checking for socket in -lsocket... " >&6; }
7956if test "${ac_cv_lib_socket_socket+set}" = set; then :
7957 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007958else
Martin v. Löwis11437992002-04-12 09:54:03 +00007959 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007960LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007961cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007962/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007963
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007964/* Override any GCC internal prototype to avoid an error.
7965 Use char because int might match the return type of a GCC
7966 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007967#ifdef __cplusplus
7968extern "C"
7969#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007970char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007971int
7972main ()
7973{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007974return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007975 ;
7976 return 0;
7977}
7978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007979if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007980 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007981else
Matthias Kloseb9621712010-04-24 17:59:49 +00007982 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007983fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007984rm -f core conftest.err conftest.$ac_objext \
7985 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007986LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007987fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
7989$as_echo "$ac_cv_lib_socket_socket" >&6; }
7990if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00007991 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00007992fi
7993 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00007994
Matthias Kloseb9621712010-04-24 17:59:49 +00007995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
7996$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007997
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007998# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00007999if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008000 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8002$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008003LIBS="$withval $LIBS"
8004
8005else
Matthias Kloseb9621712010-04-24 17:59:49 +00008006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8007$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008008fi
8009
Guido van Rossum7f43da71994-08-01 12:15:30 +00008010
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008011if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008012 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8013set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8015$as_echo_n "checking for $ac_word... " >&6; }
8016if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8017 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008018else
8019 case $PKG_CONFIG in
8020 [\\/]* | ?:[\\/]*)
8021 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8022 ;;
8023 *)
8024 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8025for as_dir in $PATH
8026do
8027 IFS=$as_save_IFS
8028 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008029 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008030 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8031 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008032 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008033 break 2
8034 fi
8035done
Matthias Kloseb9621712010-04-24 17:59:49 +00008036 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008037IFS=$as_save_IFS
8038
8039 ;;
8040esac
8041fi
8042PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8043if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8045$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008046else
Matthias Kloseb9621712010-04-24 17:59:49 +00008047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8048$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008049fi
8050
8051
8052fi
8053if test -z "$ac_cv_path_PKG_CONFIG"; then
8054 ac_pt_PKG_CONFIG=$PKG_CONFIG
8055 # Extract the first word of "pkg-config", so it can be a program name with args.
8056set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8058$as_echo_n "checking for $ac_word... " >&6; }
8059if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
8060 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008061else
8062 case $ac_pt_PKG_CONFIG in
8063 [\\/]* | ?:[\\/]*)
8064 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8065 ;;
8066 *)
8067 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8068for as_dir in $PATH
8069do
8070 IFS=$as_save_IFS
8071 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008072 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008073 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8074 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008075 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008076 break 2
8077 fi
8078done
Matthias Kloseb9621712010-04-24 17:59:49 +00008079 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008080IFS=$as_save_IFS
8081
8082 ;;
8083esac
8084fi
8085ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8086if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8088$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008089else
Matthias Kloseb9621712010-04-24 17:59:49 +00008090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8091$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008092fi
8093
8094 if test "x$ac_pt_PKG_CONFIG" = x; then
8095 PKG_CONFIG=""
8096 else
8097 case $cross_compiling:$ac_tool_warned in
8098yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008099{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8100$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008101ac_tool_warned=yes ;;
8102esac
8103 PKG_CONFIG=$ac_pt_PKG_CONFIG
8104 fi
8105else
8106 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8107fi
8108
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008109
8110# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8112$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008113
8114# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008115if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008116 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008117else
8118 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008119fi
8120
8121
Matthias Kloseb9621712010-04-24 17:59:49 +00008122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8123$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008124
8125# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8127$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008128
8129# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008130if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008131 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008132else
8133 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008134fi
8135
8136
8137if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008138 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8139else
8140 LIBFFI_INCLUDEDIR=""
8141fi
8142
8143
Matthias Kloseb9621712010-04-24 17:59:49 +00008144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8145$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008146
Benjamin Peterson076ed002010-10-31 17:11:02 +00008147# Check for support for loadable sqlite extensions
8148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8149$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8150# Check whether --enable-loadable-sqlite-extensions was given.
8151if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8152 enableval=$enable_loadable_sqlite_extensions;
8153else
8154 enable_loadable_sqlite_extensions="no"
8155fi
8156
8157
8158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8159$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8160
Matthias Klose55708cc2009-04-30 08:06:49 +00008161# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8163$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008164
8165# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008166if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008167 withval=$with_dbmliborder;
8168if test x$with_dbmliborder = xyes
8169then
Benjamin Peterson79263252010-10-31 16:50:44 +00008170as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008171else
8172 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8173 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8174 then
Benjamin Peterson79263252010-10-31 16:50:44 +00008175 as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008176 fi
8177 done
8178fi
8179fi
8180
Matthias Kloseb9621712010-04-24 17:59:49 +00008181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8182$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008183
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008184# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008185
8186
Matthias Kloseb9621712010-04-24 17:59:49 +00008187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8188$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008189
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008190# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008191if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008192 withval=$with_signal_module;
8193fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008194
8195
8196if test -z "$with_signal_module"
8197then with_signal_module="yes"
8198fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8200$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008201
8202if test "${with_signal_module}" = "yes"; then
8203 USE_SIGNAL_MODULE=""
8204 SIGNAL_OBJS=""
8205else
8206 USE_SIGNAL_MODULE="#"
8207 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8208fi
8209
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008210# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008211
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008212USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008213
Matthias Kloseb9621712010-04-24 17:59:49 +00008214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8215$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008216
Guido van Rossumec2f0731997-01-22 20:54:01 +00008217
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008218# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008219if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008220 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8222$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008223LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008224if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008225 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008226fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008227else
Matthias Kloseb9621712010-04-24 17:59:49 +00008228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8229$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008230fi
8231
Martin v. Löwis11437992002-04-12 09:54:03 +00008232
8233# Templates for things AC_DEFINEd more than once.
8234# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008235
8236
Martin v. Löwis11437992002-04-12 09:54:03 +00008237
8238
Matthias Kloseb9621712010-04-24 17:59:49 +00008239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8240$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008241
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008242# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008243if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008244 withval=$with_threads;
8245fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008246
8247
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008248# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008249
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008250# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008251if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008252 withval=$with_thread; with_threads=$with_thread
8253fi
8254
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008255
8256if test -z "$with_threads"
8257then with_threads="yes"
8258fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8260$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008261
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008262
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008263if test "$with_threads" = "no"
8264then
8265 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008266elif test "$ac_cv_pthread_is_default" = yes
8267then
Matthias Kloseb9621712010-04-24 17:59:49 +00008268 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008269
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008270 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008271 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008272
8273 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008274 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008275elif test "$ac_cv_kpthread" = "yes"
8276then
8277 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008278 if test "$ac_cv_cxx_thread" = "yes"; then
8279 CXX="$CXX -Kpthread"
8280 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008281 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008282
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008283 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008284 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008285elif test "$ac_cv_kthread" = "yes"
8286then
8287 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008288 if test "$ac_cv_cxx_thread" = "yes"; then
8289 CXX="$CXX -Kthread"
8290 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008291 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008292
8293 posix_threads=yes
8294 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008295elif test "$ac_cv_pthread" = "yes"
8296then
8297 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008298 if test "$ac_cv_cxx_thread" = "yes"; then
8299 CXX="$CXX -pthread"
8300 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008301 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008302
8303 posix_threads=yes
8304 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008305else
8306 if test ! -z "$with_threads" -a -d "$with_threads"
8307 then LDFLAGS="$LDFLAGS -L$with_threads"
8308 fi
8309 if test ! -z "$withval" -a -d "$withval"
8310 then LDFLAGS="$LDFLAGS -L$withval"
8311 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008312
8313 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008314 # define _POSIX_THREADS in unistd.h. Some apparently don't
8315 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8317$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008319/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008320
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008321#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008322#ifdef _POSIX_THREADS
8323yes
8324#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008325
8326_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008327if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008328 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008329 unistd_defines_pthreads=yes
8330else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008331 unistd_defines_pthreads=no
8332fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008333rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008334
Matthias Kloseb9621712010-04-24 17:59:49 +00008335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8336$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008337
Matthias Kloseb9621712010-04-24 17:59:49 +00008338 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008339
Matthias Kloseb9621712010-04-24 17:59:49 +00008340 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
8341if test "x$ac_cv_header_cthreads_h" = x""yes; then :
8342 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008343
Matthias Kloseb9621712010-04-24 17:59:49 +00008344 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008345
Martin v. Löwis11437992002-04-12 09:54:03 +00008346
Matthias Kloseb9621712010-04-24 17:59:49 +00008347$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008348
8349 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008350 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008351else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008352
Matthias Kloseb9621712010-04-24 17:59:49 +00008353 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
8354if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
8355 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008356
Matthias Kloseb9621712010-04-24 17:59:49 +00008357 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008358
Martin v. Löwis11437992002-04-12 09:54:03 +00008359
Matthias Kloseb9621712010-04-24 17:59:49 +00008360$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008361
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008362 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008363else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008364
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008365 # Just looking for pthread_create in libpthread is not enough:
8366 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8367 # So we really have to include pthread.h, and then link.
8368 _libs=$LIBS
8369 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8371$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008373/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008374#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008375
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008376void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008377int
8378main ()
8379{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008380
8381pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008382 ;
8383 return 0;
8384}
8385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008386if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008387
Matthias Kloseb9621712010-04-24 17:59:49 +00008388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8389$as_echo "yes" >&6; }
8390 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008391
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008392 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008393 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008394else
Martin v. Löwis11437992002-04-12 09:54:03 +00008395
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008396 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008397 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
8398if test "x$ac_cv_func_pthread_detach" = x""yes; then :
8399 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008400
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008401 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008402 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008403else
Guido van Rossumad678af1998-10-02 14:42:15 +00008404
Matthias Kloseb9621712010-04-24 17:59:49 +00008405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8406$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
8407if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
8408 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008409else
Martin v. Löwis11437992002-04-12 09:54:03 +00008410 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008411LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008413/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008414
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008415/* Override any GCC internal prototype to avoid an error.
8416 Use char because int might match the return type of a GCC
8417 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008418#ifdef __cplusplus
8419extern "C"
8420#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008421char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008422int
8423main ()
8424{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008425return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008426 ;
8427 return 0;
8428}
8429_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008430if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008431 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008432else
Matthias Kloseb9621712010-04-24 17:59:49 +00008433 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008434fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008435rm -f core conftest.err conftest.$ac_objext \
8436 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008437LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008438fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8440$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
8441if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
8442 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008443
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008444 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008445 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008446 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008447else
Greg Steinadf63d62000-07-05 10:38:09 +00008448
Matthias Kloseb9621712010-04-24 17:59:49 +00008449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8450$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
8451if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
8452 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008453else
Martin v. Löwis11437992002-04-12 09:54:03 +00008454 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008455LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008457/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008458
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008459/* Override any GCC internal prototype to avoid an error.
8460 Use char because int might match the return type of a GCC
8461 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008462#ifdef __cplusplus
8463extern "C"
8464#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008465char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008466int
8467main ()
8468{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008469return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008470 ;
8471 return 0;
8472}
8473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008474if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008475 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008476else
Matthias Kloseb9621712010-04-24 17:59:49 +00008477 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008478fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008479rm -f core conftest.err conftest.$ac_objext \
8480 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008481LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008482fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8484$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
8485if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
8486 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008487
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008488 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008489 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008490 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008491else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008492
Matthias Kloseb9621712010-04-24 17:59:49 +00008493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8494$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
8495if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
8496 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008497else
Martin v. Löwis11437992002-04-12 09:54:03 +00008498 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008499LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008501/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008502
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008503/* Override any GCC internal prototype to avoid an error.
8504 Use char because int might match the return type of a GCC
8505 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008506#ifdef __cplusplus
8507extern "C"
8508#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008509char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008510int
8511main ()
8512{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008513return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008514 ;
8515 return 0;
8516}
8517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008518if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008519 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008520else
Matthias Kloseb9621712010-04-24 17:59:49 +00008521 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008523rm -f core conftest.err conftest.$ac_objext \
8524 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008525LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008526fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8528$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
8529if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
8530 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008531
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008532 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008533 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008534 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008535else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008536
Matthias Kloseb9621712010-04-24 17:59:49 +00008537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8538$as_echo_n "checking for pthread_create in -lcma... " >&6; }
8539if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
8540 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008541else
Martin v. Löwis11437992002-04-12 09:54:03 +00008542 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008543LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008544cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008545/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008546
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008547/* Override any GCC internal prototype to avoid an error.
8548 Use char because int might match the return type of a GCC
8549 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008550#ifdef __cplusplus
8551extern "C"
8552#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008553char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008554int
8555main ()
8556{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008557return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008558 ;
8559 return 0;
8560}
8561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008562if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008563 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008564else
Matthias Kloseb9621712010-04-24 17:59:49 +00008565 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008566fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008567rm -f core conftest.err conftest.$ac_objext \
8568 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008569LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008570fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8572$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
8573if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
8574 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008575
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008576 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008577 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008578 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008579else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008580
Martin v. Löwis130fb172001-07-19 11:00:41 +00008581 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008582fi
8583
Guido van Rossum627b2d71993-12-24 10:39:16 +00008584
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008585fi
8586
Guido van Rossum0be3e491997-05-22 20:33:33 +00008587fi
8588
Guido van Rossum49545951997-12-02 19:28:29 +00008589fi
8590
Guido van Rossumb93a8621998-05-07 13:27:32 +00008591fi
8592
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008593fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008594rm -f core conftest.err conftest.$ac_objext \
8595 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008596fi
8597
Martin v. Löwis11437992002-04-12 09:54:03 +00008598
8599fi
8600
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008601
Michael W. Hudson54241132001-12-07 15:38:26 +00008602
Matthias Kloseb9621712010-04-24 17:59:49 +00008603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8604$as_echo_n "checking for usconfig in -lmpc... " >&6; }
8605if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
8606 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008607else
Martin v. Löwis11437992002-04-12 09:54:03 +00008608 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008609LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008611/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008612
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008613/* Override any GCC internal prototype to avoid an error.
8614 Use char because int might match the return type of a GCC
8615 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008616#ifdef __cplusplus
8617extern "C"
8618#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008619char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008620int
8621main ()
8622{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008623return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008624 ;
8625 return 0;
8626}
8627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008628if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008629 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008630else
Matthias Kloseb9621712010-04-24 17:59:49 +00008631 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008633rm -f core conftest.err conftest.$ac_objext \
8634 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008635LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008636fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8638$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
8639if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
8640 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008641
Martin v. Löwis130fb172001-07-19 11:00:41 +00008642 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008643 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008644 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008645fi
8646
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008647
Neal Norwitza978ab02002-11-02 16:58:05 +00008648 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8650$as_echo_n "checking for thr_create in -lthread... " >&6; }
8651if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
8652 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008653else
Martin v. Löwis11437992002-04-12 09:54:03 +00008654 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008655LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008657/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008658
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008659/* Override any GCC internal prototype to avoid an error.
8660 Use char because int might match the return type of a GCC
8661 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008662#ifdef __cplusplus
8663extern "C"
8664#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008665char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008666int
8667main ()
8668{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008669return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008670 ;
8671 return 0;
8672}
8673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008674if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008675 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008676else
Matthias Kloseb9621712010-04-24 17:59:49 +00008677 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008679rm -f core conftest.err conftest.$ac_objext \
8680 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008681LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008682fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8684$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
8685if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
8686 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008687
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008688 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008689 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008690 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008691fi
8692
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008693 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008694
Martin v. Löwis130fb172001-07-19 11:00:41 +00008695 if test "$USE_THREAD_MODULE" != "#"
8696 then
8697 # If the above checks didn't disable threads, (at least) OSF1
8698 # needs this '-threads' argument during linking.
8699 case $ac_sys_system in
8700 OSF1) LDLAST=-threads;;
8701 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008702 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008703fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008704
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008705if test "$posix_threads" = "yes"; then
8706 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008707
Matthias Kloseb9621712010-04-24 17:59:49 +00008708$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008709
8710 fi
8711
8712 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8713 case $ac_sys_system/$ac_sys_release in
8714 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008715$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008716
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008717 ;;
8718 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008719$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008720
8721 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008722 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008723$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008724
8725 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008726 AIX/6)
8727$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8728
8729 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008730 esac
8731
Matthias Kloseb9621712010-04-24 17:59:49 +00008732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8733$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
8734 if test "${ac_cv_pthread_system_supported+set}" = set; then :
8735 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008736else
Matthias Kloseb9621712010-04-24 17:59:49 +00008737 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008738 ac_cv_pthread_system_supported=no
8739else
Matthias Kloseb9621712010-04-24 17:59:49 +00008740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008741/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008742#include <pthread.h>
8743 void *foo(void *parm) {
8744 return NULL;
8745 }
8746 main() {
8747 pthread_attr_t attr;
8748 pthread_t id;
8749 if (pthread_attr_init(&attr)) exit(-1);
8750 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8751 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8752 exit(0);
8753 }
8754_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008755if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008756 ac_cv_pthread_system_supported=yes
8757else
Matthias Kloseb9621712010-04-24 17:59:49 +00008758 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008760rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8761 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008762fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008763
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008764
Guido van Rossum627b2d71993-12-24 10:39:16 +00008765fi
8766
Matthias Kloseb9621712010-04-24 17:59:49 +00008767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8768$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008769 if test "$ac_cv_pthread_system_supported" = "yes"; then
8770
Matthias Kloseb9621712010-04-24 17:59:49 +00008771$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008772
8773 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008774 for ac_func in pthread_sigmask
8775do :
8776 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
8777if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008778 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008779#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008780_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008781 case $ac_sys_system in
8782 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008783
Matthias Kloseb9621712010-04-24 17:59:49 +00008784$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008785
8786 ;;
8787 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008788fi
8789done
8790
8791fi
8792
8793
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008794# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008795
Matthias Kloseb9621712010-04-24 17:59:49 +00008796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8797$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008798# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008799if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008800 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008801 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8803$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008804 ipv6=no
8805 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008806 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8807$as_echo "yes" >&6; }
8808 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008809
8810 ipv6=yes
8811 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008812 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008813else
Martin v. Löwis11437992002-04-12 09:54:03 +00008814
Matthias Kloseb9621712010-04-24 17:59:49 +00008815 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008816
Matthias Kloseb9621712010-04-24 17:59:49 +00008817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8818$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008819 ipv6=no
8820
8821else
Matthias Kloseb9621712010-04-24 17:59:49 +00008822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008823/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008824 /* AF_INET6 available check */
8825#include <sys/types.h>
8826#include <sys/socket.h>
8827main()
8828{
8829 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8830 exit(1);
8831 else
8832 exit(0);
8833}
8834
Martin v. Löwis11437992002-04-12 09:54:03 +00008835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008836if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008837
Matthias Kloseb9621712010-04-24 17:59:49 +00008838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8839$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008840 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008841
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008842else
Matthias Kloseb159a552010-04-25 21:00:44 +00008843
Matthias Kloseb9621712010-04-24 17:59:49 +00008844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8845$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008846 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008847
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008849rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8850 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008851fi
8852
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008853
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008854if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8856$as_echo_n "checking if RFC2553 API is available... " >&6; }
8857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008858/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008859
8860 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008861#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008862int
8863main ()
8864{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008865struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008866 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008867 ;
8868 return 0;
8869}
Matthias Kloseb159a552010-04-25 21:00:44 +00008870
Martin v. Löwis11437992002-04-12 09:54:03 +00008871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008872if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008873
8874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008875$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008876 ipv6=yes
8877
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008878else
Matthias Kloseb159a552010-04-25 21:00:44 +00008879
8880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008881$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008882 ipv6=no
8883
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008884fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008886fi
8887
8888if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008889 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008890
8891fi
8892
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008893fi
8894
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008895
8896ipv6type=unknown
8897ipv6lib=none
8898ipv6trylibc=no
8899
8900if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8902$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008903 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8904 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008905 case $i in
8906 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008908/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008909
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008910#include <netinet/in.h>
8911#ifdef IPV6_INRIA_VERSION
8912yes
8913#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008914_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008915if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008916 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008917 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008918fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008919rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008920
8921 ;;
8922 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008924/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008925
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008926#include <netinet/in.h>
8927#ifdef __KAME__
8928yes
8929#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008930_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008931if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008932 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008933 ipv6type=$i;
8934 ipv6lib=inet6
8935 ipv6libdir=/usr/local/v6/lib
8936 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008937fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008938rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008939
8940 ;;
8941 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008943/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008944
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008945#include <features.h>
8946#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
8947yes
8948#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008949_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008950if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008951 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008952 ipv6type=$i;
8953 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008954fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008955rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008956
8957 ;;
8958 linux-inet6)
8959 if test -d /usr/inet6; then
8960 ipv6type=$i
8961 ipv6lib=inet6
8962 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00008963 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008964 fi
8965 ;;
8966 solaris)
8967 if test -f /etc/netconfig; then
8968 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
8969 ipv6type=$i
8970 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008971 fi
8972 fi
8973 ;;
8974 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00008975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008976/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008977
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008978#include <sys/param.h>
8979#ifdef _TOSHIBA_INET6
8980yes
8981#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008982_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008983if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008984 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008985 ipv6type=$i;
8986 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008987 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008988fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008989rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008990
8991 ;;
8992 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00008993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008994/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008995
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008996#include </usr/local/v6/include/sys/v6config.h>
8997#ifdef __V6D__
8998yes
8999#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009000_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009001if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009002 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009003 ipv6type=$i;
9004 ipv6lib=v6;
9005 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009006 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009007fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009008rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009009
9010 ;;
9011 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009013/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009014
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009015#include <sys/param.h>
9016#ifdef _ZETA_MINAMI_INET6
9017yes
9018#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009019_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009020if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009021 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009022 ipv6type=$i;
9023 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009024 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009025fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009026rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009027
9028 ;;
9029 esac
9030 if test "$ipv6type" != "unknown"; then
9031 break
9032 fi
9033 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9035$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009036fi
9037
9038if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9039 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9040 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9041 echo "using lib$ipv6lib"
9042 else
9043 if test $ipv6trylibc = "yes"; then
9044 echo "using libc"
9045 else
9046 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9047 echo "You need to fetch lib$ipv6lib.a from appropriate"
9048 echo 'ipv6 kit and compile beforehand.'
9049 exit 1
9050 fi
9051 fi
9052fi
9053
Matthias Kloseb9621712010-04-24 17:59:49 +00009054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9055$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009057/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009058
9059 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009060int
9061main ()
9062{
9063FSIORefNum fRef = 0
9064 ;
9065 return 0;
9066}
Matthias Kloseb159a552010-04-25 21:00:44 +00009067
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009068_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009069if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009070
Matthias Kloseb159a552010-04-25 21:00:44 +00009071
Matthias Kloseb9621712010-04-24 17:59:49 +00009072$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009073
Matthias Kloseb9621712010-04-24 17:59:49 +00009074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9075$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009076
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009077else
Matthias Kloseb159a552010-04-25 21:00:44 +00009078
Matthias Kloseb9621712010-04-24 17:59:49 +00009079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9080$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009081
9082fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9084
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009085# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9087$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009088
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009089# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009090if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009091 withval=$with_doc_strings;
9092fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009093
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009094
9095if test -z "$with_doc_strings"
9096then with_doc_strings="yes"
9097fi
9098if test "$with_doc_strings" != "no"
9099then
9100
Matthias Kloseb9621712010-04-24 17:59:49 +00009101$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009102
9103fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9105$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009106
Antoine Pitrou042b1282010-08-13 21:15:58 +00009107# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9109$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009110
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009111# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009112if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009113 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009114if test "$withval" != no
9115then
9116
Matthias Kloseb9621712010-04-24 17:59:49 +00009117$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009118
Matthias Kloseb9621712010-04-24 17:59:49 +00009119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9120$as_echo "yes" >&6; }
9121else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9122$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009123fi
9124else
Matthias Kloseb9621712010-04-24 17:59:49 +00009125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9126$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009127fi
9128
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009129
9130# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9132$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009133
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009134# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009135if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009136 withval=$with_pymalloc;
9137fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009138
Neil Schemenauera35c6882001-02-27 04:45:05 +00009139
Neil Schemenauer16c22972002-03-22 15:34:49 +00009140if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009141then
9142 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009143 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009144fi
9145if test "$with_pymalloc" != "no"
9146then
Martin v. Löwis11437992002-04-12 09:54:03 +00009147
Matthias Kloseb9621712010-04-24 17:59:49 +00009148$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009149
9150fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9152$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009153
Benjamin Peterson05159c42009-12-03 03:01:27 +00009154# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9156$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009157
9158# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009159if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009160 withval=$with_valgrind;
9161else
9162 with_valgrind=no
9163fi
9164
Matthias Kloseb9621712010-04-24 17:59:49 +00009165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9166$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009167if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009168 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
9169if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009170
Matthias Kloseb9621712010-04-24 17:59:49 +00009171$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009172
9173else
Benjamin Peterson79263252010-10-31 16:50:44 +00009174 as_fn_error "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009175
9176fi
9177
9178
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009179 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009180fi
9181
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009182# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009183
Guido van Rossum98935bf2001-09-05 19:13:16 +00009184DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009185
Guido van Rossume97ee181999-12-20 21:27:22 +00009186# the dlopen() function means we might want to use dynload_shlib.o. some
9187# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009188for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009189do :
9190 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
9191if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009192 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009193#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009194_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009195
Guido van Rossume97ee181999-12-20 21:27:22 +00009196fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009197done
Guido van Rossume97ee181999-12-20 21:27:22 +00009198
Michael W. Hudson54241132001-12-07 15:38:26 +00009199
Guido van Rossume97ee181999-12-20 21:27:22 +00009200# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9201# loading of modules.
9202
Matthias Kloseb9621712010-04-24 17:59:49 +00009203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9204$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009205if test -z "$DYNLOADFILE"
9206then
9207 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009208 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9209 if test "$ac_cv_func_dlopen" = yes
9210 then DYNLOADFILE="dynload_shlib.o"
9211 else DYNLOADFILE="dynload_aix.o"
9212 fi
9213 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009214 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009215 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9216 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009217 *)
9218 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9219 # out any dynamic loading
9220 if test "$ac_cv_func_dlopen" = yes
9221 then DYNLOADFILE="dynload_shlib.o"
9222 else DYNLOADFILE="dynload_stub.o"
9223 fi
9224 ;;
9225 esac
9226fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9228$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009229if test "$DYNLOADFILE" != "dynload_stub.o"
9230then
Martin v. Löwis11437992002-04-12 09:54:03 +00009231
Matthias Kloseb9621712010-04-24 17:59:49 +00009232$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009233
9234fi
9235
Neil Schemenauer4e425612001-06-19 15:44:15 +00009236# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9237
Michael W. Hudson54241132001-12-07 15:38:26 +00009238
Matthias Kloseb9621712010-04-24 17:59:49 +00009239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9240$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009241if test -z "$MACHDEP_OBJS"
9242then
Jack Jansene578a632001-08-15 01:27:14 +00009243 MACHDEP_OBJS=$extra_machdep_objs
9244else
9245 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009246fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9248$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009249
Guido van Rossum627b2d71993-12-24 10:39:16 +00009250# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009251for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Martin v. Löwis823725e2008-03-24 13:39:54 +00009252 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009253 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009254 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009255 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009256 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009257 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009258 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9259 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009260 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009261 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009262 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009263 truncate uname unsetenv utimes waitpid wait3 wait4 \
9264 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009265do :
9266 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9267ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Peterson79263252010-10-31 16:50:44 +00009268eval as_val=\$$as_ac_var
9269 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009270 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009271#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009272_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009273
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009274fi
9275done
9276
Michael W. Hudson54241132001-12-07 15:38:26 +00009277
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009278# For some functions, having a definition is not sufficient, since
9279# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9281$as_echo_n "checking for chroot... " >&6; }
9282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009283/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009284#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009285int
9286main ()
9287{
9288void *x=chroot
9289 ;
9290 return 0;
9291}
9292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009293if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009294
Matthias Kloseb9621712010-04-24 17:59:49 +00009295$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009296
Matthias Kloseb159a552010-04-25 21:00:44 +00009297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009298$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009299else
Matthias Kloseb9621712010-04-24 17:59:49 +00009300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9301$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009302
9303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9306$as_echo_n "checking for link... " >&6; }
9307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009308/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009309#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009310int
9311main ()
9312{
9313void *x=link
9314 ;
9315 return 0;
9316}
9317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009318if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009319
Matthias Kloseb9621712010-04-24 17:59:49 +00009320$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009321
Matthias Kloseb159a552010-04-25 21:00:44 +00009322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009323$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009324else
Matthias Kloseb9621712010-04-24 17:59:49 +00009325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9326$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009327
9328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9331$as_echo_n "checking for symlink... " >&6; }
9332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009333/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009334#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009335int
9336main ()
9337{
9338void *x=symlink
9339 ;
9340 return 0;
9341}
9342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009343if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009344
Matthias Kloseb9621712010-04-24 17:59:49 +00009345$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009346
Matthias Kloseb159a552010-04-25 21:00:44 +00009347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009348$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009349else
Matthias Kloseb9621712010-04-24 17:59:49 +00009350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9351$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009352
9353fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9356$as_echo_n "checking for fchdir... " >&6; }
9357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009358/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009359#include <unistd.h>
9360int
9361main ()
9362{
9363void *x=fchdir
9364 ;
9365 return 0;
9366}
9367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009368if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009369
Matthias Kloseb9621712010-04-24 17:59:49 +00009370$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009371
Matthias Kloseb159a552010-04-25 21:00:44 +00009372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009373$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009374else
Matthias Kloseb9621712010-04-24 17:59:49 +00009375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9376$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009377
9378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9381$as_echo_n "checking for fsync... " >&6; }
9382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009383/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009384#include <unistd.h>
9385int
9386main ()
9387{
9388void *x=fsync
9389 ;
9390 return 0;
9391}
9392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009393if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009394
Matthias Kloseb9621712010-04-24 17:59:49 +00009395$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009396
Matthias Kloseb159a552010-04-25 21:00:44 +00009397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009398$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009399else
Matthias Kloseb9621712010-04-24 17:59:49 +00009400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9401$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009402
9403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9406$as_echo_n "checking for fdatasync... " >&6; }
9407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009408/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009409#include <unistd.h>
9410int
9411main ()
9412{
9413void *x=fdatasync
9414 ;
9415 return 0;
9416}
9417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009418if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009419
Matthias Kloseb9621712010-04-24 17:59:49 +00009420$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009421
Matthias Kloseb159a552010-04-25 21:00:44 +00009422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009423$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009424else
Matthias Kloseb9621712010-04-24 17:59:49 +00009425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9426$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009427
9428fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9431$as_echo_n "checking for epoll... " >&6; }
9432cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009433/* end confdefs.h. */
9434#include <sys/epoll.h>
9435int
9436main ()
9437{
9438void *x=epoll_create
9439 ;
9440 return 0;
9441}
9442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009443if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009444
Matthias Kloseb9621712010-04-24 17:59:49 +00009445$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009446
Matthias Kloseb159a552010-04-25 21:00:44 +00009447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009448$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009449else
Matthias Kloseb9621712010-04-24 17:59:49 +00009450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9451$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009452
9453fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9456$as_echo_n "checking for kqueue... " >&6; }
9457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009458/* end confdefs.h. */
9459
9460#include <sys/types.h>
9461#include <sys/event.h>
9462
9463int
9464main ()
9465{
9466int x=kqueue()
9467 ;
9468 return 0;
9469}
9470_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009471if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009472
Matthias Kloseb9621712010-04-24 17:59:49 +00009473$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009474
Matthias Kloseb159a552010-04-25 21:00:44 +00009475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009476$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009477else
Matthias Kloseb9621712010-04-24 17:59:49 +00009478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9479$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009480
9481fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009483# On some systems (eg. FreeBSD 5), we would find a definition of the
9484# functions ctermid_r, setgroups in the library, but no prototype
9485# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9486# address to avoid compiler warnings and potential miscompilations
9487# because of the missing prototypes.
9488
Matthias Kloseb9621712010-04-24 17:59:49 +00009489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9490$as_echo_n "checking for ctermid_r... " >&6; }
9491cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009492/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009493
Martin v. Löwisd5843682002-11-21 20:41:28 +00009494#include <stdio.h>
9495
Martin v. Löwisd5843682002-11-21 20:41:28 +00009496int
9497main ()
9498{
9499void* p = ctermid_r
9500 ;
9501 return 0;
9502}
9503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009504if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009505
Matthias Kloseb9621712010-04-24 17:59:49 +00009506$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009507
Matthias Kloseb159a552010-04-25 21:00:44 +00009508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009509$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009510else
Matthias Kloseb9621712010-04-24 17:59:49 +00009511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9512$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009513
9514fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9516
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9518$as_echo_n "checking for flock declaration... " >&6; }
9519if test "${ac_cv_flock_decl+set}" = set; then :
9520 $as_echo_n "(cached) " >&6
9521else
9522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009523/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009524#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009525int
9526main ()
9527{
9528void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009529
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009530 ;
9531 return 0;
9532}
9533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009534if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009535 ac_cv_flock_decl=yes
9536else
9537 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009538
9539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009541
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009542fi
9543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9544$as_echo "$ac_cv_flock_decl" >&6; }
9545if test "x${ac_cv_flock_decl}" = xyes; then
9546 for ac_func in flock
9547do :
9548 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
9549if test "x$ac_cv_func_flock" = x""yes; then :
9550 cat >>confdefs.h <<_ACEOF
9551#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009552_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009553
Antoine Pitroua3000072010-09-07 14:52:42 +00009554else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009556$as_echo_n "checking for flock in -lbsd... " >&6; }
9557if test "${ac_cv_lib_bsd_flock+set}" = set; then :
9558 $as_echo_n "(cached) " >&6
9559else
9560 ac_check_lib_save_LIBS=$LIBS
9561LIBS="-lbsd $LIBS"
9562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9563/* end confdefs.h. */
9564
9565/* Override any GCC internal prototype to avoid an error.
9566 Use char because int might match the return type of a GCC
9567 builtin and then its argument prototype would still apply. */
9568#ifdef __cplusplus
9569extern "C"
9570#endif
9571char flock ();
9572int
9573main ()
9574{
9575return flock ();
9576 ;
9577 return 0;
9578}
9579_ACEOF
9580if ac_fn_c_try_link "$LINENO"; then :
9581 ac_cv_lib_bsd_flock=yes
9582else
9583 ac_cv_lib_bsd_flock=no
9584fi
9585rm -f core conftest.err conftest.$ac_objext \
9586 conftest$ac_exeext conftest.$ac_ext
9587LIBS=$ac_check_lib_save_LIBS
9588fi
9589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9590$as_echo "$ac_cv_lib_bsd_flock" >&6; }
9591if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009592 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009593
9594
9595$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9596
9597
9598fi
9599
9600
9601fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009602done
9603
Antoine Pitroua3000072010-09-07 14:52:42 +00009604fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009605
Matthias Kloseb9621712010-04-24 17:59:49 +00009606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9607$as_echo_n "checking for getpagesize... " >&6; }
9608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009609/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009610
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009611#include <unistd.h>
9612
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009613int
9614main ()
9615{
9616void* p = getpagesize
9617 ;
9618 return 0;
9619}
9620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009621if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009622
Matthias Kloseb9621712010-04-24 17:59:49 +00009623$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009624
Matthias Kloseb159a552010-04-25 21:00:44 +00009625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009626$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009627else
Matthias Kloseb9621712010-04-24 17:59:49 +00009628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9629$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009630
9631fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009633
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009634for ac_prog in true
9635do
9636 # Extract the first word of "$ac_prog", so it can be a program name with args.
9637set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9639$as_echo_n "checking for $ac_word... " >&6; }
9640if test "${ac_cv_prog_TRUE+set}" = set; then :
9641 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009642else
9643 if test -n "$TRUE"; then
9644 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9645else
9646as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9647for as_dir in $PATH
9648do
9649 IFS=$as_save_IFS
9650 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009651 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009652 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009653 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009654 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009655 break 2
9656 fi
9657done
Matthias Kloseb9621712010-04-24 17:59:49 +00009658 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009659IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009660
9661fi
9662fi
9663TRUE=$ac_cv_prog_TRUE
9664if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9666$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009667else
Matthias Kloseb9621712010-04-24 17:59:49 +00009668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9669$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009670fi
9671
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009672
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009673 test -n "$TRUE" && break
9674done
9675test -n "$TRUE" || TRUE="/bin/true"
9676
9677
Matthias Kloseb9621712010-04-24 17:59:49 +00009678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9679$as_echo_n "checking for inet_aton in -lc... " >&6; }
9680if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
9681 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009682else
9683 ac_check_lib_save_LIBS=$LIBS
9684LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009686/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009687
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009688/* Override any GCC internal prototype to avoid an error.
9689 Use char because int might match the return type of a GCC
9690 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009691#ifdef __cplusplus
9692extern "C"
9693#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009694char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009695int
9696main ()
9697{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009698return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009699 ;
9700 return 0;
9701}
9702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009703if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009704 ac_cv_lib_c_inet_aton=yes
9705else
Matthias Kloseb9621712010-04-24 17:59:49 +00009706 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009707fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009708rm -f core conftest.err conftest.$ac_objext \
9709 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009710LIBS=$ac_check_lib_save_LIBS
9711fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9713$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
9714if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009715 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009716else
Matthias Kloseb9621712010-04-24 17:59:49 +00009717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9718$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
9719if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
9720 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009721else
9722 ac_check_lib_save_LIBS=$LIBS
9723LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009725/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009726
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009727/* Override any GCC internal prototype to avoid an error.
9728 Use char because int might match the return type of a GCC
9729 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009730#ifdef __cplusplus
9731extern "C"
9732#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009733char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009734int
9735main ()
9736{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009737return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009738 ;
9739 return 0;
9740}
9741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009742if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009743 ac_cv_lib_resolv_inet_aton=yes
9744else
Matthias Kloseb9621712010-04-24 17:59:49 +00009745 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009746fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009747rm -f core conftest.err conftest.$ac_objext \
9748 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009749LIBS=$ac_check_lib_save_LIBS
9750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9752$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
9753if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009754 cat >>confdefs.h <<_ACEOF
9755#define HAVE_LIBRESOLV 1
9756_ACEOF
9757
9758 LIBS="-lresolv $LIBS"
9759
9760fi
9761
9762
9763fi
9764
9765
Christian Heimesd0764e22007-12-04 15:00:33 +00009766# On Tru64, chflags seems to be present, but calling it will
9767# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9769$as_echo_n "checking for chflags... " >&6; }
9770if test "${ac_cv_have_chflags+set}" = set; then :
9771 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009772else
Matthias Kloseb9621712010-04-24 17:59:49 +00009773 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009774 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009775else
Matthias Kloseb9621712010-04-24 17:59:49 +00009776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009777/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009778[
Christian Heimesd0764e22007-12-04 15:00:33 +00009779#include <sys/stat.h>
9780#include <unistd.h>
9781int main(int argc, char*argv[])
9782{
9783 if(chflags(argv[0], 0) != 0)
9784 return 1;
9785 return 0;
9786}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009787]
Christian Heimesd0764e22007-12-04 15:00:33 +00009788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009789if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009790 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009791else
Matthias Kloseb9621712010-04-24 17:59:49 +00009792 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009794rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9795 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009796fi
9797
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009798
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009799fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9801$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009802if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009803 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
9804if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009805 ac_cv_have_chflags="yes"
9806else
9807 ac_cv_have_chflags="no"
9808fi
9809
9810fi
9811if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009812
Matthias Kloseb9621712010-04-24 17:59:49 +00009813$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009814
9815fi
9816
Matthias Kloseb9621712010-04-24 17:59:49 +00009817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9818$as_echo_n "checking for lchflags... " >&6; }
9819if test "${ac_cv_have_lchflags+set}" = set; then :
9820 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009821else
Matthias Kloseb9621712010-04-24 17:59:49 +00009822 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009823 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009824else
Matthias Kloseb9621712010-04-24 17:59:49 +00009825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009826/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009827[
Christian Heimesd0764e22007-12-04 15:00:33 +00009828#include <sys/stat.h>
9829#include <unistd.h>
9830int main(int argc, char*argv[])
9831{
9832 if(lchflags(argv[0], 0) != 0)
9833 return 1;
9834 return 0;
9835}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009836]
Christian Heimesd0764e22007-12-04 15:00:33 +00009837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009838if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009839 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009840else
Matthias Kloseb9621712010-04-24 17:59:49 +00009841 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009842fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009843rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9844 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009845fi
9846
9847
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9850$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009851if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009852 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
9853if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009854 ac_cv_have_lchflags="yes"
9855else
9856 ac_cv_have_lchflags="no"
9857fi
9858
9859fi
9860if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009861
Matthias Kloseb9621712010-04-24 17:59:49 +00009862$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009863
9864fi
9865
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009866case $ac_sys_system/$ac_sys_release in
9867Darwin/*)
9868 _CUR_CFLAGS="${CFLAGS}"
9869 _CUR_LDFLAGS="${LDFLAGS}"
9870 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9871 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9872 ;;
9873esac
9874
Matthias Kloseb9621712010-04-24 17:59:49 +00009875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9876$as_echo_n "checking for inflateCopy in -lz... " >&6; }
9877if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
9878 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009879else
9880 ac_check_lib_save_LIBS=$LIBS
9881LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009883/* end confdefs.h. */
9884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009885/* Override any GCC internal prototype to avoid an error.
9886 Use char because int might match the return type of a GCC
9887 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009888#ifdef __cplusplus
9889extern "C"
9890#endif
9891char inflateCopy ();
9892int
9893main ()
9894{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009895return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009896 ;
9897 return 0;
9898}
9899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009900if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009901 ac_cv_lib_z_inflateCopy=yes
9902else
Matthias Kloseb9621712010-04-24 17:59:49 +00009903 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009905rm -f core conftest.err conftest.$ac_objext \
9906 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009907LIBS=$ac_check_lib_save_LIBS
9908fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9910$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
9911if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009912
Matthias Kloseb9621712010-04-24 17:59:49 +00009913$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009914
9915fi
9916
9917
9918case $ac_sys_system/$ac_sys_release in
9919Darwin/*)
9920 CFLAGS="${_CUR_CFLAGS}"
9921 LDFLAGS="${_CUR_LDFLAGS}"
9922 ;;
9923esac
9924
Matthias Kloseb9621712010-04-24 17:59:49 +00009925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9926$as_echo_n "checking for hstrerror... " >&6; }
9927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009928/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009929
Martin v. Löwise9416172003-05-03 10:12:45 +00009930#include <netdb.h>
9931
Martin v. Löwise9416172003-05-03 10:12:45 +00009932int
9933main ()
9934{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009935void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009936 ;
9937 return 0;
9938}
9939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009940if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009941
Matthias Kloseb9621712010-04-24 17:59:49 +00009942$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009943
Matthias Kloseb159a552010-04-25 21:00:44 +00009944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009945$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009946else
Matthias Kloseb9621712010-04-24 17:59:49 +00009947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9948$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009949
9950fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009951rm -f core conftest.err conftest.$ac_objext \
9952 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009953
Matthias Kloseb9621712010-04-24 17:59:49 +00009954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
9955$as_echo_n "checking for inet_aton... " >&6; }
9956cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009957/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009958
Martin v. Löwis86d66262006-02-17 08:40:11 +00009959#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009960#include <sys/socket.h>
9961#include <netinet/in.h>
9962#include <arpa/inet.h>
9963
Martin v. Löwise9416172003-05-03 10:12:45 +00009964int
9965main ()
9966{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009967void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009968 ;
9969 return 0;
9970}
9971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009972if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009973
Matthias Kloseb9621712010-04-24 17:59:49 +00009974$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009975
Matthias Kloseb159a552010-04-25 21:00:44 +00009976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009977$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009978else
Matthias Kloseb9621712010-04-24 17:59:49 +00009979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9980$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009981
9982fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009983rm -f core conftest.err conftest.$ac_objext \
9984 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009985
Matthias Kloseb9621712010-04-24 17:59:49 +00009986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
9987$as_echo_n "checking for inet_pton... " >&6; }
9988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009989/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009990
Martin v. Löwisf2e488d2003-05-05 22:00:11 +00009991#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009992#include <sys/socket.h>
9993#include <netinet/in.h>
9994#include <arpa/inet.h>
9995
Martin v. Löwise9416172003-05-03 10:12:45 +00009996int
9997main ()
9998{
9999void* p = inet_pton
10000 ;
10001 return 0;
10002}
10003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010004if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010005
Matthias Kloseb9621712010-04-24 17:59:49 +000010006$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010007
Matthias Kloseb159a552010-04-25 21:00:44 +000010008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010009$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010010else
Matthias Kloseb9621712010-04-24 17:59:49 +000010011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10012$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010013
10014fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010016
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010017# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10019$as_echo_n "checking for setgroups... " >&6; }
10020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010021/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010022
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010023#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010024#ifdef HAVE_GRP_H
10025#include <grp.h>
10026#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010027
Martin v. Löwisd5843682002-11-21 20:41:28 +000010028int
10029main ()
10030{
10031void* p = setgroups
10032 ;
10033 return 0;
10034}
10035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010036if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010037
Matthias Kloseb9621712010-04-24 17:59:49 +000010038$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010039
Matthias Kloseb159a552010-04-25 21:00:44 +000010040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010041$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010042else
Matthias Kloseb9621712010-04-24 17:59:49 +000010043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10044$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010045
10046fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010048
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010049# check for openpty and forkpty
10050
10051for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010052do :
10053 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
10054if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010055 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010056#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010057_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010058
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010059else
Matthias Kloseb9621712010-04-24 17:59:49 +000010060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10061$as_echo_n "checking for openpty in -lutil... " >&6; }
10062if test "${ac_cv_lib_util_openpty+set}" = set; then :
10063 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010064else
Martin v. Löwis11437992002-04-12 09:54:03 +000010065 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010066LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010067cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010068/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010069
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010070/* Override any GCC internal prototype to avoid an error.
10071 Use char because int might match the return type of a GCC
10072 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010073#ifdef __cplusplus
10074extern "C"
10075#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010076char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010077int
10078main ()
10079{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010080return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010081 ;
10082 return 0;
10083}
10084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010085if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010086 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010087else
Matthias Kloseb9621712010-04-24 17:59:49 +000010088 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010089fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010090rm -f core conftest.err conftest.$ac_objext \
10091 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010092LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010093fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10095$as_echo "$ac_cv_lib_util_openpty" >&6; }
10096if test "x$ac_cv_lib_util_openpty" = x""yes; then :
10097 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010098 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010099else
Matthias Kloseb9621712010-04-24 17:59:49 +000010100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10101$as_echo_n "checking for openpty in -lbsd... " >&6; }
10102if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
10103 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010104else
10105 ac_check_lib_save_LIBS=$LIBS
10106LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010108/* end confdefs.h. */
10109
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010110/* Override any GCC internal prototype to avoid an error.
10111 Use char because int might match the return type of a GCC
10112 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010113#ifdef __cplusplus
10114extern "C"
10115#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010116char openpty ();
10117int
10118main ()
10119{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010120return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010121 ;
10122 return 0;
10123}
10124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010125if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010126 ac_cv_lib_bsd_openpty=yes
10127else
Matthias Kloseb9621712010-04-24 17:59:49 +000010128 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010129fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010130rm -f core conftest.err conftest.$ac_objext \
10131 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010132LIBS=$ac_check_lib_save_LIBS
10133fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10135$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
10136if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
10137 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010138 LIBS="$LIBS -lbsd"
10139fi
10140
10141
10142fi
10143
Fred Drake8cef4cf2000-06-28 16:40:38 +000010144
10145fi
10146done
10147
10148for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010149do :
10150 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
10151if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010152 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010153#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010154_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010155
Fred Drake8cef4cf2000-06-28 16:40:38 +000010156else
Matthias Kloseb9621712010-04-24 17:59:49 +000010157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10158$as_echo_n "checking for forkpty in -lutil... " >&6; }
10159if test "${ac_cv_lib_util_forkpty+set}" = set; then :
10160 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010161else
Martin v. Löwis11437992002-04-12 09:54:03 +000010162 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010163LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010165/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010166
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010167/* Override any GCC internal prototype to avoid an error.
10168 Use char because int might match the return type of a GCC
10169 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010170#ifdef __cplusplus
10171extern "C"
10172#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010173char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010174int
10175main ()
10176{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010177return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010178 ;
10179 return 0;
10180}
10181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010182if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010183 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010184else
Matthias Kloseb9621712010-04-24 17:59:49 +000010185 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010186fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010187rm -f core conftest.err conftest.$ac_objext \
10188 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010189LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010190fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10192$as_echo "$ac_cv_lib_util_forkpty" >&6; }
10193if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
10194 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010195 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010196else
Matthias Kloseb9621712010-04-24 17:59:49 +000010197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10198$as_echo_n "checking for forkpty in -lbsd... " >&6; }
10199if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
10200 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010201else
10202 ac_check_lib_save_LIBS=$LIBS
10203LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010205/* end confdefs.h. */
10206
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010207/* Override any GCC internal prototype to avoid an error.
10208 Use char because int might match the return type of a GCC
10209 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010210#ifdef __cplusplus
10211extern "C"
10212#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010213char forkpty ();
10214int
10215main ()
10216{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010217return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010218 ;
10219 return 0;
10220}
10221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010222if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010223 ac_cv_lib_bsd_forkpty=yes
10224else
Matthias Kloseb9621712010-04-24 17:59:49 +000010225 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010226fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010227rm -f core conftest.err conftest.$ac_objext \
10228 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010229LIBS=$ac_check_lib_save_LIBS
10230fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10232$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
10233if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
10234 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010235 LIBS="$LIBS -lbsd"
10236fi
10237
10238
10239fi
10240
Fred Drake8cef4cf2000-06-28 16:40:38 +000010241
10242fi
10243done
10244
Jack Jansendd19cf82001-12-06 22:36:17 +000010245
Christian Heimesb186d002008-03-18 15:15:01 +000010246# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010247for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010248do :
10249 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
10250if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010251 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010252#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010253_ACEOF
10254
10255fi
10256done
10257
10258
Michael W. Hudson54241132001-12-07 15:38:26 +000010259# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010260for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010261do :
10262 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10263ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Peterson79263252010-10-31 16:50:44 +000010264eval as_val=\$$as_ac_var
10265 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010266 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010267#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010268_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010269
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010270fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010271done
10272
Michael W. Hudson54241132001-12-07 15:38:26 +000010273
Benjamin Peterson79263252010-10-31 16:50:44 +000010274for ac_func in dup2 getcwd strdup
10275do :
10276 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10277ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10278eval as_val=\$$as_ac_var
10279 if test "x$as_val" = x""yes; then :
10280 cat >>confdefs.h <<_ACEOF
10281#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10282_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000010283
Martin v. Löwis1142de32002-03-29 16:28:31 +000010284else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010285 case " $LIBOBJS " in
Benjamin Peterson79263252010-10-31 16:50:44 +000010286 *" $ac_func.$ac_objext "* ) ;;
10287 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010288 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010289esac
10290
Martin v. Löwis1142de32002-03-29 16:28:31 +000010291fi
Benjamin Peterson79263252010-10-31 16:50:44 +000010292done
Martin v. Löwis1142de32002-03-29 16:28:31 +000010293
10294
10295for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010296do :
10297 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
10298if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010299 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010300#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010303/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010304#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010305int
10306main ()
10307{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010308getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010309 ;
10310 return 0;
10311}
10312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010313if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010314
Matthias Kloseb9621712010-04-24 17:59:49 +000010315$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010316
Guido van Rossum627b2d71993-12-24 10:39:16 +000010317fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010319
Guido van Rossum627b2d71993-12-24 10:39:16 +000010320fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010321done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010322
Jack Jansen150753c2003-03-29 22:07:47 +000010323for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010324do :
10325 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
10326if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010327 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010328#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010331/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010332#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010333int
10334main ()
10335{
10336setpgrp(0,0);
10337 ;
10338 return 0;
10339}
10340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010341if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010342
Matthias Kloseb9621712010-04-24 17:59:49 +000010343$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010344
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010347
10348fi
10349done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010350
Thomas Wouters3a584202000-08-05 23:28:51 +000010351for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010352do :
10353 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
10354if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010355 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010356#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010359/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010360#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010361int
10362main ()
10363{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010364gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010365 ;
10366 return 0;
10367}
10368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010369if ac_fn_c_try_compile "$LINENO"; then :
10370
Guido van Rossum627b2d71993-12-24 10:39:16 +000010371else
Skip Montanaro6dead952003-09-25 14:50:04 +000010372
Matthias Kloseb9621712010-04-24 17:59:49 +000010373$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010374
Martin v. Löwis11437992002-04-12 09:54:03 +000010375
Guido van Rossum627b2d71993-12-24 10:39:16 +000010376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010378
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010379fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010380done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010381
Michael W. Hudson54241132001-12-07 15:38:26 +000010382
Matthias Kloseb9621712010-04-24 17:59:49 +000010383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10384$as_echo_n "checking for major... " >&6; }
10385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010386/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010387
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010388#if defined(MAJOR_IN_MKDEV)
10389#include <sys/mkdev.h>
10390#elif defined(MAJOR_IN_SYSMACROS)
10391#include <sys/sysmacros.h>
10392#else
10393#include <sys/types.h>
10394#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010395
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010396int
10397main ()
10398{
10399
10400 makedev(major(0),minor(0));
10401
10402 ;
10403 return 0;
10404}
10405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010406if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010407
10408
Matthias Kloseb9621712010-04-24 17:59:49 +000010409$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010410
Matthias Kloseb9621712010-04-24 17:59:49 +000010411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10412$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010413
10414else
Skip Montanaro6dead952003-09-25 14:50:04 +000010415
Matthias Kloseb9621712010-04-24 17:59:49 +000010416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10417$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010418
10419fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010420rm -f core conftest.err conftest.$ac_objext \
10421 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010422
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010423# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010424# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10426$as_echo_n "checking for getaddrinfo... " >&6; }
10427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010428/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010429
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010430#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010431#include <sys/socket.h>
10432#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010433#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010434
Martin v. Löwis11437992002-04-12 09:54:03 +000010435int
10436main ()
10437{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010438getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010439 ;
10440 return 0;
10441}
10442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010443if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010444 have_getaddrinfo=yes
10445else
Matthias Kloseb9621712010-04-24 17:59:49 +000010446 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010447fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010448rm -f core conftest.err conftest.$ac_objext \
10449 conftest$ac_exeext conftest.$ac_ext
10450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10451$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010452if test $have_getaddrinfo = yes
10453then
Matthias Kloseb9621712010-04-24 17:59:49 +000010454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10455$as_echo_n "checking getaddrinfo bug... " >&6; }
10456 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
10457 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010458else
Matthias Kloseb9621712010-04-24 17:59:49 +000010459 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010460 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010461else
Matthias Kloseb9621712010-04-24 17:59:49 +000010462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010463/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010464
10465#include <sys/types.h>
10466#include <netdb.h>
10467#include <string.h>
10468#include <sys/socket.h>
10469#include <netinet/in.h>
10470
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010471int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010472{
10473 int passive, gaierr, inet4 = 0, inet6 = 0;
10474 struct addrinfo hints, *ai, *aitop;
10475 char straddr[INET6_ADDRSTRLEN], strport[16];
10476
10477 for (passive = 0; passive <= 1; passive++) {
10478 memset(&hints, 0, sizeof(hints));
10479 hints.ai_family = AF_UNSPEC;
10480 hints.ai_flags = passive ? AI_PASSIVE : 0;
10481 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010482 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010483 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10484 (void)gai_strerror(gaierr);
10485 goto bad;
10486 }
10487 for (ai = aitop; ai; ai = ai->ai_next) {
10488 if (ai->ai_addr == NULL ||
10489 ai->ai_addrlen == 0 ||
10490 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10491 straddr, sizeof(straddr), strport, sizeof(strport),
10492 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10493 goto bad;
10494 }
10495 switch (ai->ai_family) {
10496 case AF_INET:
10497 if (strcmp(strport, "54321") != 0) {
10498 goto bad;
10499 }
10500 if (passive) {
10501 if (strcmp(straddr, "0.0.0.0") != 0) {
10502 goto bad;
10503 }
10504 } else {
10505 if (strcmp(straddr, "127.0.0.1") != 0) {
10506 goto bad;
10507 }
10508 }
10509 inet4++;
10510 break;
10511 case AF_INET6:
10512 if (strcmp(strport, "54321") != 0) {
10513 goto bad;
10514 }
10515 if (passive) {
10516 if (strcmp(straddr, "::") != 0) {
10517 goto bad;
10518 }
10519 } else {
10520 if (strcmp(straddr, "::1") != 0) {
10521 goto bad;
10522 }
10523 }
10524 inet6++;
10525 break;
10526 case AF_UNSPEC:
10527 goto bad;
10528 break;
10529 default:
10530 /* another family support? */
10531 break;
10532 }
10533 }
10534 }
10535
10536 if (!(inet4 == 0 || inet4 == 2))
10537 goto bad;
10538 if (!(inet6 == 0 || inet6 == 2))
10539 goto bad;
10540
10541 if (aitop)
10542 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010543 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010544
10545 bad:
10546 if (aitop)
10547 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010548 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010549}
10550
Martin v. Löwis11437992002-04-12 09:54:03 +000010551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010552if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010553 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010554else
Matthias Kloseb9621712010-04-24 17:59:49 +000010555 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010556fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010557rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10558 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010560
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010561fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010562
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010563fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010564
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10566$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10567
Mark Dickinson2df5d282009-12-31 21:22:50 +000010568if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010569then
10570 if test $ipv6 = yes
10571 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010572 echo 'Fatal: You must get working getaddrinfo() function.'
10573 echo ' or you can specify "--disable-ipv6"'.
10574 exit 1
10575 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010576else
Martin v. Löwis11437992002-04-12 09:54:03 +000010577
Matthias Kloseb9621712010-04-24 17:59:49 +000010578$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010579
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010580fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010581
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010582for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010583do :
10584 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
10585if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010586 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010587#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010588_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010589
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010590fi
10591done
10592
Michael W. Hudson54241132001-12-07 15:38:26 +000010593
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010594# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10596$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
10597if test "${ac_cv_header_time+set}" = set; then :
10598 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010599else
Matthias Kloseb9621712010-04-24 17:59:49 +000010600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010601/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010602#include <sys/types.h>
10603#include <sys/time.h>
10604#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010605
Martin v. Löwis11437992002-04-12 09:54:03 +000010606int
10607main ()
10608{
10609if ((struct tm *) 0)
10610return 0;
10611 ;
10612 return 0;
10613}
10614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010615if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010616 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010617else
Matthias Kloseb9621712010-04-24 17:59:49 +000010618 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010619fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010621fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10623$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010624if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010625
Matthias Kloseb9621712010-04-24 17:59:49 +000010626$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010627
10628fi
10629
Matthias Kloseb9621712010-04-24 17:59:49 +000010630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10631$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10632if test "${ac_cv_struct_tm+set}" = set; then :
10633 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010634else
Matthias Kloseb9621712010-04-24 17:59:49 +000010635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010636/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010637#include <sys/types.h>
10638#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010639
Martin v. Löwis11437992002-04-12 09:54:03 +000010640int
10641main ()
10642{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010643struct tm tm;
10644 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010645 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010646 ;
10647 return 0;
10648}
10649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010650if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010651 ac_cv_struct_tm=time.h
10652else
Matthias Kloseb9621712010-04-24 17:59:49 +000010653 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010654fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010656fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10658$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010659if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010660
Matthias Kloseb9621712010-04-24 17:59:49 +000010661$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010662
10663fi
10664
Matthias Kloseb9621712010-04-24 17:59:49 +000010665ac_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 +000010666#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010667
Matthias Kloseb9621712010-04-24 17:59:49 +000010668"
10669if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010670
10671cat >>confdefs.h <<_ACEOF
10672#define HAVE_STRUCT_TM_TM_ZONE 1
10673_ACEOF
10674
10675
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010676fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010677
Martin v. Löwis11437992002-04-12 09:54:03 +000010678if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10679
Matthias Kloseb9621712010-04-24 17:59:49 +000010680$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010681
10682else
Matthias Kloseb9621712010-04-24 17:59:49 +000010683 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10684"
10685if test "x$ac_cv_have_decl_tzname" = x""yes; then :
10686 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010687else
Matthias Kloseb9621712010-04-24 17:59:49 +000010688 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010689fi
10690
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010691cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010692#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010693_ACEOF
10694
Matthias Kloseb9621712010-04-24 17:59:49 +000010695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10696$as_echo_n "checking for tzname... " >&6; }
10697if test "${ac_cv_var_tzname+set}" = set; then :
10698 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010699else
Matthias Kloseb9621712010-04-24 17:59:49 +000010700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010701/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010702#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010703#if !HAVE_DECL_TZNAME
10704extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010705#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010706
Martin v. Löwis11437992002-04-12 09:54:03 +000010707int
10708main ()
10709{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010710return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010711 ;
10712 return 0;
10713}
10714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010715if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010716 ac_cv_var_tzname=yes
10717else
Matthias Kloseb9621712010-04-24 17:59:49 +000010718 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010719fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010720rm -f core conftest.err conftest.$ac_objext \
10721 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010722fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10724$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010725 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010726
Matthias Kloseb9621712010-04-24 17:59:49 +000010727$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010728
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010729 fi
10730fi
10731
Matthias Kloseb9621712010-04-24 17:59:49 +000010732ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
10733if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010734
10735cat >>confdefs.h <<_ACEOF
10736#define HAVE_STRUCT_STAT_ST_RDEV 1
10737_ACEOF
10738
10739
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010740fi
10741
Matthias Kloseb9621712010-04-24 17:59:49 +000010742ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
10743if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010744
Martin v. Löwis11437992002-04-12 09:54:03 +000010745cat >>confdefs.h <<_ACEOF
10746#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10747_ACEOF
10748
10749
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010750fi
10751
Matthias Kloseb9621712010-04-24 17:59:49 +000010752ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
10753if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010754
10755cat >>confdefs.h <<_ACEOF
10756#define HAVE_STRUCT_STAT_ST_FLAGS 1
10757_ACEOF
10758
10759
10760fi
10761
Matthias Kloseb9621712010-04-24 17:59:49 +000010762ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
10763if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010764
10765cat >>confdefs.h <<_ACEOF
10766#define HAVE_STRUCT_STAT_ST_GEN 1
10767_ACEOF
10768
10769
10770fi
10771
Matthias Kloseb9621712010-04-24 17:59:49 +000010772ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
10773if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010774
10775cat >>confdefs.h <<_ACEOF
10776#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10777_ACEOF
10778
10779
10780fi
10781
Matthias Kloseb9621712010-04-24 17:59:49 +000010782ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
10783if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010784
Martin v. Löwis11437992002-04-12 09:54:03 +000010785cat >>confdefs.h <<_ACEOF
10786#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10787_ACEOF
10788
10789
Matthias Kloseb9621712010-04-24 17:59:49 +000010790$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010791
10792else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010793 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010794 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010795 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10796 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010797esac
10798
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010799fi
10800
Michael W. Hudson54241132001-12-07 15:38:26 +000010801
Martin v. Löwis11437992002-04-12 09:54:03 +000010802
Matthias Kloseb9621712010-04-24 17:59:49 +000010803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10804$as_echo_n "checking for time.h that defines altzone... " >&6; }
10805if test "${ac_cv_header_time_altzone+set}" = set; then :
10806 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010807else
Matthias Kloseb159a552010-04-25 21:00:44 +000010808
Matthias Kloseb9621712010-04-24 17:59:49 +000010809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010810/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010811#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010812int
10813main ()
10814{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010815return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010816 ;
10817 return 0;
10818}
10819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010820if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010821 ac_cv_header_time_altzone=yes
10822else
Matthias Kloseb9621712010-04-24 17:59:49 +000010823 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010824fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010826
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010827fi
10828
Matthias Kloseb9621712010-04-24 17:59:49 +000010829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10830$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010831if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010832
Matthias Kloseb9621712010-04-24 17:59:49 +000010833$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010834
10835fi
10836
Guido van Rossumda88dad1995-01-26 00:46:29 +000010837was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10839$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010841/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010842
10843#include <sys/types.h>
10844#include <sys/select.h>
10845#include <sys/time.h>
10846
Martin v. Löwis11437992002-04-12 09:54:03 +000010847int
10848main ()
10849{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010850;
Martin v. Löwis11437992002-04-12 09:54:03 +000010851 ;
10852 return 0;
10853}
10854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010855if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010856
10857
Matthias Kloseb9621712010-04-24 17:59:49 +000010858$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010859
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010860 was_it_defined=yes
10861
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10865$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010866
Matthias Kloseb9621712010-04-24 17:59:49 +000010867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10868$as_echo_n "checking for addrinfo... " >&6; }
10869if test "${ac_cv_struct_addrinfo+set}" = set; then :
10870 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010871else
Matthias Kloseb9621712010-04-24 17:59:49 +000010872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010873/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010874#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010875int
10876main ()
10877{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010878struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010879 ;
10880 return 0;
10881}
10882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010883if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010884 ac_cv_struct_addrinfo=yes
10885else
Matthias Kloseb9621712010-04-24 17:59:49 +000010886 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010887fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10889fi
10890
Matthias Kloseb9621712010-04-24 17:59:49 +000010891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10892$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010893if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010894
Matthias Kloseb9621712010-04-24 17:59:49 +000010895$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010896
10897fi
10898
Matthias Kloseb9621712010-04-24 17:59:49 +000010899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10900$as_echo_n "checking for sockaddr_storage... " >&6; }
10901if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
10902 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010903else
Matthias Kloseb9621712010-04-24 17:59:49 +000010904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010905/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010906
10907# include <sys/types.h>
10908# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010909int
10910main ()
10911{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010912struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010913 ;
10914 return 0;
10915}
10916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010917if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010918 ac_cv_struct_sockaddr_storage=yes
10919else
Matthias Kloseb9621712010-04-24 17:59:49 +000010920 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010921fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10923fi
10924
Matthias Kloseb9621712010-04-24 17:59:49 +000010925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10926$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010927if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010928
Matthias Kloseb9621712010-04-24 17:59:49 +000010929$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010930
10931fi
10932
Guido van Rossum627b2d71993-12-24 10:39:16 +000010933# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000010934
Matthias Kloseb9621712010-04-24 17:59:49 +000010935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10936$as_echo_n "checking whether char is unsigned... " >&6; }
10937if test "${ac_cv_c_char_unsigned+set}" = set; then :
10938 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000010939else
Matthias Kloseb9621712010-04-24 17:59:49 +000010940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010941/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010942$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010943int
10944main ()
10945{
10946static int test_array [1 - 2 * !(((char) -1) < 0)];
10947test_array [0] = 0
10948
10949 ;
10950 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000010951}
Martin v. Löwis11437992002-04-12 09:54:03 +000010952_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010953if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000010954 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010955else
Matthias Kloseb9621712010-04-24 17:59:49 +000010956 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010957fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010959fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
10961$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010962if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010963 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010964
10965fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000010966
Matthias Kloseb9621712010-04-24 17:59:49 +000010967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
10968$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
10969if test "${ac_cv_c_const+set}" = set; then :
10970 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010971else
Matthias Kloseb9621712010-04-24 17:59:49 +000010972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010973/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010974
Martin v. Löwis11437992002-04-12 09:54:03 +000010975int
10976main ()
10977{
10978/* FIXME: Include the comments suggested by Paul. */
10979#ifndef __cplusplus
10980 /* Ultrix mips cc rejects this. */
10981 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010982 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000010983 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010984 char const *const *pcpcc;
10985 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000010986 /* NEC SVR4.0.2 mips cc rejects this. */
10987 struct point {int x, y;};
10988 static struct point const zero = {0,0};
10989 /* AIX XL C 1.02.0.0 rejects this.
10990 It does not let you subtract one const X* pointer from another in
10991 an arm of an if-expression whose if-part is not a constant
10992 expression */
10993 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010994 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010995 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010996 ++pcpcc;
10997 ppc = (char**) pcpcc;
10998 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000010999 { /* SCO 3.2v4 cc rejects this. */
11000 char *t;
11001 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011002
Martin v. Löwis11437992002-04-12 09:54:03 +000011003 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011004 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011005 }
11006 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11007 int x[] = {25, 17};
11008 const int *foo = &x[0];
11009 ++foo;
11010 }
11011 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11012 typedef const int *iptr;
11013 iptr p = 0;
11014 ++p;
11015 }
11016 { /* AIX XL C 1.02.0.0 rejects this saying
11017 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11018 struct s { int j; const int *ap[3]; };
11019 struct s *b; b->j = 5;
11020 }
11021 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11022 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011023 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011024 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011025 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011026#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011027
Martin v. Löwis11437992002-04-12 09:54:03 +000011028 ;
11029 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011030}
Martin v. Löwis11437992002-04-12 09:54:03 +000011031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011032if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011033 ac_cv_c_const=yes
11034else
Matthias Kloseb9621712010-04-24 17:59:49 +000011035 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011036fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011038fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11040$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011041if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011042
Matthias Kloseb9621712010-04-24 17:59:49 +000011043$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011044
11045fi
11046
Michael W. Hudson54241132001-12-07 15:38:26 +000011047
Guido van Rossumda88dad1995-01-26 00:46:29 +000011048works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11050$as_echo_n "checking for working volatile... " >&6; }
11051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011052/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011053
Martin v. Löwis11437992002-04-12 09:54:03 +000011054int
11055main ()
11056{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011057volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011058 ;
11059 return 0;
11060}
11061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011062if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011063 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011064else
Skip Montanaro6dead952003-09-25 14:50:04 +000011065
Matthias Kloseb9621712010-04-24 17:59:49 +000011066$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011067
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011068
Guido van Rossum627b2d71993-12-24 10:39:16 +000011069fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11072$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011073
Guido van Rossumda88dad1995-01-26 00:46:29 +000011074works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11076$as_echo_n "checking for working signed char... " >&6; }
11077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011078/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011079
Martin v. Löwis11437992002-04-12 09:54:03 +000011080int
11081main ()
11082{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011083signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011084 ;
11085 return 0;
11086}
11087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011088if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011089 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011090else
Skip Montanaro6dead952003-09-25 14:50:04 +000011091
Matthias Kloseb9621712010-04-24 17:59:49 +000011092$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011093
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011094
Guido van Rossum7f43da71994-08-01 12:15:30 +000011095fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11098$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011099
Guido van Rossumda88dad1995-01-26 00:46:29 +000011100have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11102$as_echo_n "checking for prototypes... " >&6; }
11103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011104/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011105int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011106int
11107main ()
11108{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011109return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011110 ;
11111 return 0;
11112}
11113_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011114if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011115
Matthias Kloseb9621712010-04-24 17:59:49 +000011116$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011117
Matthias Kloseb159a552010-04-25 21:00:44 +000011118 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011119fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11122$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011123
Guido van Rossumda88dad1995-01-26 00:46:29 +000011124works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11126$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011128/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011129
11130#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011131int foo(int x, ...) {
11132 va_list va;
11133 va_start(va, x);
11134 va_arg(va, int);
11135 va_arg(va, char *);
11136 va_arg(va, double);
11137 return 0;
11138}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011139
Martin v. Löwis11437992002-04-12 09:54:03 +000011140int
11141main ()
11142{
Guido van Rossum90eea071996-08-30 20:58:57 +000011143return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011144 ;
11145 return 0;
11146}
11147_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011148if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011149
11150
Matthias Kloseb9621712010-04-24 17:59:49 +000011151$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011152
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011153 works=yes
11154
Guido van Rossum627b2d71993-12-24 10:39:16 +000011155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11158$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011159
Martin v. Löwisd6320502004-08-12 13:45:08 +000011160# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11162$as_echo_n "checking for socketpair... " >&6; }
11163cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011164/* end confdefs.h. */
11165
11166#include <sys/types.h>
11167#include <sys/socket.h>
11168
11169int
11170main ()
11171{
11172void *x=socketpair
11173 ;
11174 return 0;
11175}
11176_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011177if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011178
Matthias Kloseb9621712010-04-24 17:59:49 +000011179$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011180
Matthias Kloseb159a552010-04-25 21:00:44 +000011181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011182$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011183else
Matthias Kloseb9621712010-04-24 17:59:49 +000011184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11185$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011186
11187fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011189
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011190# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11192$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011194/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011195#include <sys/types.h>
11196#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011197int
11198main ()
11199{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011200struct sockaddr x;
11201x.sa_len = 0;
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 :
11207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11208$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011209
Matthias Kloseb9621712010-04-24 17:59:49 +000011210$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011211
11212else
Matthias Kloseb9621712010-04-24 17:59:49 +000011213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11214$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011215
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011216fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011218
Guido van Rossumda88dad1995-01-26 00:46:29 +000011219va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11221$as_echo_n "checking whether va_list is an array... " >&6; }
11222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011223/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011224
11225#ifdef HAVE_STDARG_PROTOTYPES
11226#include <stdarg.h>
11227#else
11228#include <varargs.h>
11229#endif
11230
Martin v. Löwis11437992002-04-12 09:54:03 +000011231int
11232main ()
11233{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011234va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011235 ;
11236 return 0;
11237}
11238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011239if ac_fn_c_try_compile "$LINENO"; then :
11240
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011241else
Skip Montanaro6dead952003-09-25 14:50:04 +000011242
Martin v. Löwis11437992002-04-12 09:54:03 +000011243
Matthias Kloseb9621712010-04-24 17:59:49 +000011244$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011245
Guido van Rossumda88dad1995-01-26 00:46:29 +000011246 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011247
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011248fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11251$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011252
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011253# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011254
11255
Matthias Kloseb9621712010-04-24 17:59:49 +000011256ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
11257if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011258
Matthias Kloseb9621712010-04-24 17:59:49 +000011259 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011260
Matthias Kloseb9621712010-04-24 17:59:49 +000011261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11262$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011263 OLD_CFLAGS=$CFLAGS
11264 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011266/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011267
11268# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011269
Martin v. Löwis11437992002-04-12 09:54:03 +000011270int
11271main ()
11272{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011273
11274 char *name;
11275 struct hostent *he, *res;
11276 char buffer[2048];
11277 int buflen = 2048;
11278 int h_errnop;
11279
11280 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011281
11282 ;
11283 return 0;
11284}
11285_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011286if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011287
Matthias Kloseb9621712010-04-24 17:59:49 +000011288 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011289
Martin v. Löwis11437992002-04-12 09:54:03 +000011290
Matthias Kloseb9621712010-04-24 17:59:49 +000011291$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011292
Matthias Kloseb9621712010-04-24 17:59:49 +000011293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11294$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011295
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011296else
Skip Montanaro6dead952003-09-25 14:50:04 +000011297
Matthias Kloseb9621712010-04-24 17:59:49 +000011298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11299$as_echo "no" >&6; }
11300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11301$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011303/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011304
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011305# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011306
Martin v. Löwis11437992002-04-12 09:54:03 +000011307int
11308main ()
11309{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011310
11311 char *name;
11312 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011313 char buffer[2048];
11314 int buflen = 2048;
11315 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011316
Matthias Kloseb159a552010-04-25 21:00:44 +000011317 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011318
11319 ;
11320 return 0;
11321}
11322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011323if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011324
Matthias Kloseb9621712010-04-24 17:59:49 +000011325 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011326
Martin v. Löwis11437992002-04-12 09:54:03 +000011327
Matthias Kloseb159a552010-04-25 21:00:44 +000011328$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011329
Matthias Kloseb9621712010-04-24 17:59:49 +000011330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11331$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011332
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011333else
Skip Montanaro6dead952003-09-25 14:50:04 +000011334
Matthias Kloseb9621712010-04-24 17:59:49 +000011335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11336$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11338$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11340/* end confdefs.h. */
11341
11342# include <netdb.h>
11343
11344int
11345main ()
11346{
11347
11348 char *name;
11349 struct hostent *he;
11350 struct hostent_data data;
11351
11352 (void) gethostbyname_r(name, he, &data);
11353
11354 ;
11355 return 0;
11356}
11357_ACEOF
11358if ac_fn_c_try_compile "$LINENO"; then :
11359
11360 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11361
11362
11363$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11364
11365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11366$as_echo "yes" >&6; }
11367
11368else
11369
11370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11371$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011372
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011375
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011378
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011381 CFLAGS=$OLD_CFLAGS
11382
11383else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011384
Matthias Kloseb9621712010-04-24 17:59:49 +000011385 for ac_func in gethostbyname
11386do :
11387 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
11388if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011389 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011390#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011391_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011392
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011393fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011394done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011395
Michael W. Hudson54241132001-12-07 15:38:26 +000011396
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011397fi
11398
Michael W. Hudson54241132001-12-07 15:38:26 +000011399
11400
11401
11402
11403
11404
Guido van Rossum627b2d71993-12-24 10:39:16 +000011405# checks for system services
11406# (none yet)
11407
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011408# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011409ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
11410if test "x$ac_cv_func___fpu_control" = x""yes; then :
11411
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011412else
Matthias Kloseb9621712010-04-24 17:59:49 +000011413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11414$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
11415if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
11416 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011417else
Martin v. Löwis11437992002-04-12 09:54:03 +000011418 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011419LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011421/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011422
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011423/* Override any GCC internal prototype to avoid an error.
11424 Use char because int might match the return type of a GCC
11425 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011426#ifdef __cplusplus
11427extern "C"
11428#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011429char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011430int
11431main ()
11432{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011433return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011434 ;
11435 return 0;
11436}
11437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011438if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011439 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011440else
Matthias Kloseb9621712010-04-24 17:59:49 +000011441 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011442fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011443rm -f core conftest.err conftest.$ac_objext \
11444 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011445LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011446fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11448$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
11449if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011450 cat >>confdefs.h <<_ACEOF
11451#define HAVE_LIBIEEE 1
11452_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011453
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011454 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011455
Guido van Rossum627b2d71993-12-24 10:39:16 +000011456fi
11457
Michael W. Hudson54241132001-12-07 15:38:26 +000011458
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011459fi
11460
Michael W. Hudson54241132001-12-07 15:38:26 +000011461
Guido van Rossum7f253911997-05-09 02:42:48 +000011462# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11464$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011465
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011466# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011467if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011468 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011469if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011470then
11471
Matthias Kloseb9621712010-04-24 17:59:49 +000011472$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011473
Matthias Kloseb9621712010-04-24 17:59:49 +000011474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11475$as_echo "yes" >&6; }
11476else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11477$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011478fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011479else
Matthias Kloseb9621712010-04-24 17:59:49 +000011480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11481$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011482fi
11483
Guido van Rossum7f253911997-05-09 02:42:48 +000011484
Guido van Rossum7f43da71994-08-01 12:15:30 +000011485# check for --with-libm=...
11486
Guido van Rossum563e7081996-09-10 18:20:48 +000011487case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011488Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011489*) LIBM=-lm
11490esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11492$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011493
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011494# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011495if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011496 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011497if test "$withval" = no
11498then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11500$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011501elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011502then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11504$as_echo "set LIBM=\"$withval\"" >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +000011505else as_fn_error "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011506fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011507else
Matthias Kloseb9621712010-04-24 17:59:49 +000011508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11509$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011510fi
11511
Guido van Rossum7f43da71994-08-01 12:15:30 +000011512
11513# check for --with-libc=...
11514
Matthias Kloseb9621712010-04-24 17:59:49 +000011515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11516$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011517
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011518# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011519if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011520 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011521if test "$withval" = no
11522then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11524$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011525elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011526then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11528$as_echo "set LIBC=\"$withval\"" >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +000011529else as_fn_error "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011530fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011531else
Matthias Kloseb9621712010-04-24 17:59:49 +000011532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11533$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011534fi
11535
Guido van Rossum7f43da71994-08-01 12:15:30 +000011536
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011537# **************************************************
11538# * Check for various properties of floating point *
11539# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011540
Matthias Kloseb9621712010-04-24 17:59:49 +000011541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11542$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
11543if test "${ac_cv_little_endian_double+set}" = set; then :
11544 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011545else
11546
Matthias Kloseb9621712010-04-24 17:59:49 +000011547if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011548 ac_cv_little_endian_double=no
11549else
Matthias Kloseb9621712010-04-24 17:59:49 +000011550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011551/* end confdefs.h. */
11552
11553#include <string.h>
11554int main() {
11555 double x = 9006104071832581.0;
11556 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11557 return 0;
11558 else
11559 return 1;
11560}
11561
11562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011563if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011564 ac_cv_little_endian_double=yes
11565else
Matthias Kloseb9621712010-04-24 17:59:49 +000011566 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011567fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011568rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11569 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011570fi
11571
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011572fi
11573
Matthias Kloseb9621712010-04-24 17:59:49 +000011574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11575$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011576if test "$ac_cv_little_endian_double" = yes
11577then
11578
Matthias Kloseb9621712010-04-24 17:59:49 +000011579$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011580
11581fi
11582
Matthias Kloseb9621712010-04-24 17:59:49 +000011583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11584$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
11585if test "${ac_cv_big_endian_double+set}" = set; then :
11586 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011587else
11588
Matthias Kloseb9621712010-04-24 17:59:49 +000011589if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011590 ac_cv_big_endian_double=no
11591else
Matthias Kloseb9621712010-04-24 17:59:49 +000011592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011593/* end confdefs.h. */
11594
11595#include <string.h>
11596int main() {
11597 double x = 9006104071832581.0;
11598 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11599 return 0;
11600 else
11601 return 1;
11602}
11603
11604_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011605if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011606 ac_cv_big_endian_double=yes
11607else
Matthias Kloseb9621712010-04-24 17:59:49 +000011608 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011609fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011610rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11611 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011612fi
11613
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011614fi
11615
Matthias Kloseb9621712010-04-24 17:59:49 +000011616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11617$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011618if test "$ac_cv_big_endian_double" = yes
11619then
11620
Matthias Kloseb9621712010-04-24 17:59:49 +000011621$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011622
11623fi
11624
11625# Some ARM platforms use a mixed-endian representation for doubles.
11626# While Python doesn't currently have full support for these platforms
11627# (see e.g., issue 1762561), we can at least make sure that float <-> string
11628# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11630$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
11631if test "${ac_cv_mixed_endian_double+set}" = set; then :
11632 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011633else
11634
Matthias Kloseb9621712010-04-24 17:59:49 +000011635if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011636 ac_cv_mixed_endian_double=no
11637else
Matthias Kloseb9621712010-04-24 17:59:49 +000011638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011639/* end confdefs.h. */
11640
11641#include <string.h>
11642int main() {
11643 double x = 9006104071832581.0;
11644 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11645 return 0;
11646 else
11647 return 1;
11648}
11649
11650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011651if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011652 ac_cv_mixed_endian_double=yes
11653else
Matthias Kloseb9621712010-04-24 17:59:49 +000011654 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011655fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011656rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11657 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011658fi
11659
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011660fi
11661
Matthias Kloseb9621712010-04-24 17:59:49 +000011662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11663$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011664if test "$ac_cv_mixed_endian_double" = yes
11665then
11666
Matthias Kloseb9621712010-04-24 17:59:49 +000011667$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011668
11669fi
11670
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011671# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011672# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011673# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011674# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011675# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011676# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011677
11678# This inline assembler syntax may also work for suncc and icc,
11679# so we try it on all platforms.
11680
Matthias Kloseb9621712010-04-24 17:59:49 +000011681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11682$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11683cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011684/* end confdefs.h. */
11685
11686int
11687main ()
11688{
11689
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011690 unsigned short cw;
11691 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11692 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011693
11694 ;
11695 return 0;
11696}
11697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011698if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011699 have_gcc_asm_for_x87=yes
11700else
Matthias Kloseb9621712010-04-24 17:59:49 +000011701 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011702fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11705$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011706if test "$have_gcc_asm_for_x87" = yes
11707then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011708
Matthias Kloseb9621712010-04-24 17:59:49 +000011709$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011710
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011711fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011712
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011713# Detect whether system arithmetic is subject to x87-style double
11714# rounding issues. The result of this test has little meaning on non
11715# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11716# mode is round-to-nearest and double rounding issues are present, and
11717# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11719$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011720# $BASECFLAGS may affect the result
11721ac_save_cc="$CC"
11722CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011723if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011724 ac_cv_x87_double_rounding=no
11725else
Matthias Kloseb9621712010-04-24 17:59:49 +000011726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011727/* end confdefs.h. */
11728
11729#include <stdlib.h>
11730#include <math.h>
11731int main() {
11732 volatile double x, y, z;
11733 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11734 x = 0.99999999999999989; /* 1-2**-53 */
11735 y = 1./x;
11736 if (y != 1.)
11737 exit(0);
11738 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11739 x = 1e16;
11740 y = 2.99999;
11741 z = x + y;
11742 if (z != 1e16+4.)
11743 exit(0);
11744 /* both tests show evidence of double rounding */
11745 exit(1);
11746}
11747
11748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011749if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011750 ac_cv_x87_double_rounding=no
11751else
Matthias Kloseb9621712010-04-24 17:59:49 +000011752 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011753fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011754rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11755 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011756fi
11757
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011758CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11760$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011761if test "$ac_cv_x87_double_rounding" = yes
11762then
11763
Matthias Kloseb9621712010-04-24 17:59:49 +000011764$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011765
11766fi
11767
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011768# ************************************
11769# * Check for mathematical functions *
11770# ************************************
11771
11772LIBS_SAVE=$LIBS
11773LIBS="$LIBS $LIBM"
11774
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011775# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11776# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11778$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
11779if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
11780 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011781else
11782
Matthias Kloseb9621712010-04-24 17:59:49 +000011783if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011784 ac_cv_tanh_preserves_zero_sign=no
11785else
Matthias Kloseb9621712010-04-24 17:59:49 +000011786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011787/* end confdefs.h. */
11788
11789#include <math.h>
11790#include <stdlib.h>
11791int main() {
11792 /* return 0 if either negative zeros don't exist
11793 on this platform or if negative zeros exist
11794 and tanh(-0.) == -0. */
11795 if (atan2(0., -1.) == atan2(-0., -1.) ||
11796 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11797 else exit(1);
11798}
11799
11800_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011801if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011802 ac_cv_tanh_preserves_zero_sign=yes
11803else
Matthias Kloseb9621712010-04-24 17:59:49 +000011804 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011805fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011806rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11807 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011808fi
11809
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011810fi
11811
Matthias Kloseb9621712010-04-24 17:59:49 +000011812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11813$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011814if test "$ac_cv_tanh_preserves_zero_sign" = yes
11815then
11816
Matthias Kloseb9621712010-04-24 17:59:49 +000011817$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011818
11819fi
11820
Mark Dickinson9c113362009-09-05 10:36:23 +000011821for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011822do :
11823 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11824ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Peterson79263252010-10-31 16:50:44 +000011825eval as_val=\$$as_ac_var
11826 if test "x$as_val" = x""yes; then :
Mark Dickinson9c113362009-09-05 10:36:23 +000011827 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011828#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000011829_ACEOF
11830
11831fi
11832done
11833
Mark Dickinson9c113362009-09-05 10:36:23 +000011834for ac_func in hypot lgamma log1p round tgamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011835do :
11836 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11837ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Peterson79263252010-10-31 16:50:44 +000011838eval as_val=\$$as_ac_var
11839 if test "x$as_val" = x""yes; then :
Christian Heimes99170a52007-12-19 02:07:34 +000011840 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011841#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000011842_ACEOF
11843
11844fi
11845done
11846
Matthias Kloseb9621712010-04-24 17:59:49 +000011847ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11848"
11849if test "x$ac_cv_have_decl_isinf" = x""yes; then :
11850 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011851else
Matthias Kloseb9621712010-04-24 17:59:49 +000011852 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011853fi
11854
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011855cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011856#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011858ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11859"
11860if test "x$ac_cv_have_decl_isnan" = x""yes; then :
11861 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011862else
Matthias Kloseb9621712010-04-24 17:59:49 +000011863 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011864fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011865
11866cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011867#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011868_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011869ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11870"
11871if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
11872 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011873else
Matthias Kloseb9621712010-04-24 17:59:49 +000011874 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011875fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011876
11877cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011878#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011879_ACEOF
11880
11881
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011882LIBS=$LIBS_SAVE
11883
Mark Dickinsona614f042009-11-28 12:48:43 +000011884# For multiprocessing module, check that sem_open
11885# actually works. For FreeBSD versions <= 7.2,
11886# the kernel module that provides POSIX semaphores
11887# isn't loaded by default, so an attempt to call
11888# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000011889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
11890$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
11891if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
11892 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000011893else
Matthias Kloseb9621712010-04-24 17:59:49 +000011894 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011895 ac_cv_posix_semaphores_enabled=yes
11896else
Matthias Kloseb9621712010-04-24 17:59:49 +000011897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011898/* end confdefs.h. */
11899
11900#include <unistd.h>
11901#include <fcntl.h>
11902#include <stdio.h>
11903#include <semaphore.h>
11904#include <sys/stat.h>
11905
11906int main(void) {
11907 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
11908 if (a == SEM_FAILED) {
11909 perror("sem_open");
11910 return 1;
11911 }
11912 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011913 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000011914 return 0;
11915}
11916
11917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011918if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011919 ac_cv_posix_semaphores_enabled=yes
11920else
Matthias Kloseb9621712010-04-24 17:59:49 +000011921 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000011922fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011923rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11924 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011925fi
11926
11927
Mark Dickinsona614f042009-11-28 12:48:43 +000011928fi
11929
Matthias Kloseb9621712010-04-24 17:59:49 +000011930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
11931$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000011932if test $ac_cv_posix_semaphores_enabled = no
11933then
11934
Matthias Kloseb9621712010-04-24 17:59:49 +000011935$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000011936
11937fi
11938
Mark Dickinson10683072009-04-18 21:18:19 +000011939# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000011940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
11941$as_echo_n "checking for broken sem_getvalue... " >&6; }
11942if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
11943 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011944else
Matthias Kloseb9621712010-04-24 17:59:49 +000011945 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011946 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000011947else
Matthias Kloseb9621712010-04-24 17:59:49 +000011948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000011949/* end confdefs.h. */
11950
11951#include <unistd.h>
11952#include <fcntl.h>
11953#include <stdio.h>
11954#include <semaphore.h>
11955#include <sys/stat.h>
11956
11957int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000011958 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000011959 int count;
11960 int res;
11961 if(a==SEM_FAILED){
11962 perror("sem_open");
11963 return 1;
11964
11965 }
11966 res = sem_getvalue(a, &count);
11967 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011968 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000011969 return res==-1 ? 1 : 0;
11970}
11971
Mark Dickinson10683072009-04-18 21:18:19 +000011972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011973if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011974 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000011975else
Matthias Kloseb9621712010-04-24 17:59:49 +000011976 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011977fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011978rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11979 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011980fi
11981
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011982
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011983fi
11984
Matthias Kloseb9621712010-04-24 17:59:49 +000011985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
11986$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011987if test $ac_cv_broken_sem_getvalue = yes
11988then
11989
Matthias Kloseb9621712010-04-24 17:59:49 +000011990$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011991
11992fi
11993
Mark Dickinsonbd792642009-03-18 20:06:12 +000011994# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000011995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
11996$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000011997# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011998if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000011999 enableval=$enable_big_digits; case $enable_big_digits in
12000yes)
12001 enable_big_digits=30 ;;
12002no)
12003 enable_big_digits=15 ;;
1200415|30)
12005 ;;
12006*)
Benjamin Peterson79263252010-10-31 16:50:44 +000012007 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 +000012008esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12010$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012011
12012cat >>confdefs.h <<_ACEOF
12013#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12014_ACEOF
12015
12016
12017else
Matthias Kloseb9621712010-04-24 17:59:49 +000012018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12019$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012020fi
12021
12022
Guido van Rossumef2255b2000-03-10 22:30:29 +000012023# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012024ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
12025if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012026
12027
Matthias Kloseb9621712010-04-24 17:59:49 +000012028$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012029
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012030 wchar_h="yes"
12031
Guido van Rossumef2255b2000-03-10 22:30:29 +000012032else
Martin v. Löwis11437992002-04-12 09:54:03 +000012033 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012034
12035fi
12036
Michael W. Hudson54241132001-12-07 15:38:26 +000012037
Martin v. Löwis11437992002-04-12 09:54:03 +000012038
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012039# determine wchar_t size
12040if test "$wchar_h" = yes
12041then
Matthias Kloseb9621712010-04-24 17:59:49 +000012042 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012043# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12044# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12045# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12047$as_echo_n "checking size of wchar_t... " >&6; }
12048if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
12049 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012050else
Matthias Kloseb9621712010-04-24 17:59:49 +000012051 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12052"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012053
Martin v. Löwis11437992002-04-12 09:54:03 +000012054else
Matthias Kloseb9621712010-04-24 17:59:49 +000012055 if test "$ac_cv_type_wchar_t" = yes; then
12056 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12057$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +000012058{ as_fn_set_status 77
12059as_fn_error "cannot compute sizeof (wchar_t)
12060See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012061 else
12062 ac_cv_sizeof_wchar_t=0
12063 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012064fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012065
Martin v. Löwis11437992002-04-12 09:54:03 +000012066fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12068$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012069
12070
12071
Martin v. Löwis11437992002-04-12 09:54:03 +000012072cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012073#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012074_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012075
Michael W. Hudson54241132001-12-07 15:38:26 +000012076
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012077fi
12078
Matthias Kloseb9621712010-04-24 17:59:49 +000012079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12080$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012081have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012083/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012084
12085#include <tcl.h>
12086#if TCL_UTF_MAX != 6
12087# error "NOT UCS4_TCL"
12088#endif
12089int
12090main ()
12091{
12092
12093 ;
12094 return 0;
12095}
12096_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012097if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012098
12099
Matthias Kloseb9621712010-04-24 17:59:49 +000012100$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012101
12102 have_ucs4_tcl=yes
12103
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12107$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012108
Skip Montanaro6dead952003-09-25 14:50:04 +000012109# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012110if test "$wchar_h" = yes
12111then
12112 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12114$as_echo_n "checking whether wchar_t is signed... " >&6; }
12115 if test "${ac_cv_wchar_t_signed+set}" = set; then :
12116 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012117else
12118
Matthias Kloseb9621712010-04-24 17:59:49 +000012119 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012120 ac_cv_wchar_t_signed=yes
12121else
Matthias Kloseb9621712010-04-24 17:59:49 +000012122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012123/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012124
12125 #include <wchar.h>
12126 int main()
12127 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012128 /* Success: exit code 0 */
12129 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012130 }
12131
12132_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012133if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012134 ac_cv_wchar_t_signed=yes
12135else
Matthias Kloseb9621712010-04-24 17:59:49 +000012136 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012137fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012138rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12139 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012140fi
12141
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012142fi
12143
Matthias Kloseb9621712010-04-24 17:59:49 +000012144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12145$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012146fi
12147
Matthias Kloseb9621712010-04-24 17:59:49 +000012148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12149$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012150
12151# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012152if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012153 withval=$with_wide_unicode;
12154if test "$withval" != no
12155then unicode_size="4"
12156else unicode_size="2"
12157fi
12158
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012159else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012160
Georg Brandl52d168a2008-01-07 18:10:24 +000012161case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012162 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012163 *) unicode_size="2" ;;
12164esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012165
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012166fi
12167
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012168
12169
Georg Brandl52d168a2008-01-07 18:10:24 +000012170case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012171 4)
12172 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12173
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012174 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012175 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012176 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012177 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012178esac
12179
Michael W. Hudson54241132001-12-07 15:38:26 +000012180
Martin v. Löwis11437992002-04-12 09:54:03 +000012181
Georg Brandl52d168a2008-01-07 18:10:24 +000012182# wchar_t is only usable if it maps to an unsigned type
12183if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012184 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012185then
12186 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012187
Matthias Kloseb9621712010-04-24 17:59:49 +000012188$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012189
Matthias Kloseb9621712010-04-24 17:59:49 +000012190 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012191
Georg Brandl52d168a2008-01-07 18:10:24 +000012192elif test "$ac_cv_sizeof_short" = "$unicode_size"
12193then
12194 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012195 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012196
Georg Brandl52d168a2008-01-07 18:10:24 +000012197elif test "$ac_cv_sizeof_long" = "$unicode_size"
12198then
12199 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012200 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012201
Georg Brandl52d168a2008-01-07 18:10:24 +000012202else
12203 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012204fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12206$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012207
12208# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12210$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12211if test "${ac_cv_c_bigendian+set}" = set; then :
12212 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012213else
Matthias Kloseb9621712010-04-24 17:59:49 +000012214 ac_cv_c_bigendian=unknown
12215 # See if we're dealing with a universal compiler.
12216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12217/* end confdefs.h. */
12218#ifndef __APPLE_CC__
12219 not a universal capable compiler
12220 #endif
12221 typedef int dummy;
12222
Skip Montanaro6dead952003-09-25 14:50:04 +000012223_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012224if ac_fn_c_try_compile "$LINENO"; then :
12225
12226 # Check for potential -arch flags. It is not universal unless
12227 # there are at least two -arch flags with different values.
12228 ac_arch=
12229 ac_prev=
12230 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12231 if test -n "$ac_prev"; then
12232 case $ac_word in
12233 i?86 | x86_64 | ppc | ppc64)
12234 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12235 ac_arch=$ac_word
12236 else
12237 ac_cv_c_bigendian=universal
12238 break
12239 fi
12240 ;;
12241 esac
12242 ac_prev=
12243 elif test "x$ac_word" = "x-arch"; then
12244 ac_prev=arch
12245 fi
12246 done
12247fi
12248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12249 if test $ac_cv_c_bigendian = unknown; then
12250 # See if sys/param.h defines the BYTE_ORDER macro.
12251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012252/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012253#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012254 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012255
Martin v. Löwis11437992002-04-12 09:54:03 +000012256int
12257main ()
12258{
Matthias Kloseb9621712010-04-24 17:59:49 +000012259#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12260 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12261 && LITTLE_ENDIAN)
12262 bogus endian macros
12263 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012264
12265 ;
12266 return 0;
12267}
12268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012269if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012270 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012272/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012273#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012274 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012275
Martin v. Löwis11437992002-04-12 09:54:03 +000012276int
12277main ()
12278{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012279#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012280 not big endian
12281 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012282
12283 ;
12284 return 0;
12285}
12286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012287if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012288 ac_cv_c_bigendian=yes
12289else
Matthias Kloseb9621712010-04-24 17:59:49 +000012290 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012293fi
12294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12295 fi
12296 if test $ac_cv_c_bigendian = unknown; then
12297 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012299/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012300#include <limits.h>
12301
Martin v. Löwis11437992002-04-12 09:54:03 +000012302int
12303main ()
12304{
Matthias Kloseb9621712010-04-24 17:59:49 +000012305#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12306 bogus endian macros
12307 #endif
12308
Martin v. Löwis11437992002-04-12 09:54:03 +000012309 ;
12310 return 0;
12311}
12312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012313if ac_fn_c_try_compile "$LINENO"; then :
12314 # It does; now see whether it defined to _BIG_ENDIAN or not.
12315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12316/* end confdefs.h. */
12317#include <limits.h>
12318
12319int
12320main ()
12321{
12322#ifndef _BIG_ENDIAN
12323 not big endian
12324 #endif
12325
12326 ;
12327 return 0;
12328}
12329_ACEOF
12330if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012331 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012332else
Matthias Kloseb9621712010-04-24 17:59:49 +000012333 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012334fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12336fi
12337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12338 fi
12339 if test $ac_cv_c_bigendian = unknown; then
12340 # Compile a test program.
12341 if test "$cross_compiling" = yes; then :
12342 # Try to guess by grepping values from an object file.
12343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12344/* end confdefs.h. */
12345short int ascii_mm[] =
12346 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12347 short int ascii_ii[] =
12348 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12349 int use_ascii (int i) {
12350 return ascii_mm[i] + ascii_ii[i];
12351 }
12352 short int ebcdic_ii[] =
12353 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12354 short int ebcdic_mm[] =
12355 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12356 int use_ebcdic (int i) {
12357 return ebcdic_mm[i] + ebcdic_ii[i];
12358 }
12359 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012360
Matthias Kloseb9621712010-04-24 17:59:49 +000012361int
12362main ()
12363{
12364return use_ascii (foo) == use_ebcdic (foo);
12365 ;
12366 return 0;
12367}
12368_ACEOF
12369if ac_fn_c_try_compile "$LINENO"; then :
12370 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12371 ac_cv_c_bigendian=yes
12372 fi
12373 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12374 if test "$ac_cv_c_bigendian" = unknown; then
12375 ac_cv_c_bigendian=no
12376 else
12377 # finding both strings is unlikely to happen, but who knows?
12378 ac_cv_c_bigendian=unknown
12379 fi
12380 fi
12381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012383else
Matthias Kloseb9621712010-04-24 17:59:49 +000012384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012385/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012386$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012387int
12388main ()
12389{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012390
Matthias Kloseb9621712010-04-24 17:59:49 +000012391 /* Are we little or big endian? From Harbison&Steele. */
12392 union
12393 {
12394 long int l;
12395 char c[sizeof (long int)];
12396 } u;
12397 u.l = 1;
12398 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012399
12400 ;
12401 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012402}
Martin v. Löwis11437992002-04-12 09:54:03 +000012403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012404if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012405 ac_cv_c_bigendian=no
12406else
Matthias Kloseb9621712010-04-24 17:59:49 +000012407 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012408fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012409rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12410 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012411fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012412
Matthias Kloseb9621712010-04-24 17:59:49 +000012413 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012414fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12416$as_echo "$ac_cv_c_bigendian" >&6; }
12417 case $ac_cv_c_bigendian in #(
12418 yes)
12419 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12420;; #(
12421 no)
12422 ;; #(
12423 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012424
Matthias Kloseb9621712010-04-24 17:59:49 +000012425$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012426
Matthias Kloseb9621712010-04-24 17:59:49 +000012427 ;; #(
12428 *)
Benjamin Peterson79263252010-10-31 16:50:44 +000012429 as_fn_error "unknown endianness
12430 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012431 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012432
Michael W. Hudson54241132001-12-07 15:38:26 +000012433
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012434# ABI version string for Python extension modules. This appears between the
12435# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12436# from the following attributes which affect the ABI of this Python build (in
12437# this order):
12438#
12439# * The Python implementation (always 'cpython-' for us)
12440# * The major and minor version numbers
12441# * --with-pydebug (adds a 'd')
12442# * --with-pymalloc (adds a 'm')
12443# * --with-wide-unicode (adds a 'u')
12444#
12445# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012446# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12447# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012448
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12450$as_echo_n "checking ABIFLAGS... " >&6; }
12451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12452$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12454$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012455SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12457$as_echo "$SOABI" >&6; }
12458
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12460$as_echo_n "checking LDVERSION... " >&6; }
12461LDVERSION='$(VERSION)$(ABIFLAGS)'
12462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12463$as_echo "$LDVERSION" >&6; }
12464
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012465# SO is the extension of shared libraries `(including the dot!)
12466# -- usually .so, .sl on HP-UX, .dll on Cygwin
12467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12468$as_echo_n "checking SO... " >&6; }
12469if test -z "$SO"
12470then
12471 case $ac_sys_system in
12472 hp*|HP*)
12473 case `uname -m` in
12474 ia64) SO=.so;;
12475 *) SO=.sl;;
12476 esac
12477 ;;
12478 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012479 Linux*|GNU*)
12480 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012481 *) SO=.so;;
12482 esac
12483else
12484 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012485 echo
12486 echo '====================================================================='
12487 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012488 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012489 echo '+ Do you really mean to change the extension for shared libraries? +'
12490 echo '+ Continuing in 10 seconds to let you to ponder. +'
12491 echo '+ +'
12492 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012493 sleep 10
12494fi
12495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12496$as_echo "$SO" >&6; }
12497
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012498# Check whether right shifting a negative integer extends the sign bit
12499# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12501$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
12502if test "${ac_cv_rshift_extends_sign+set}" = set; then :
12503 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012504else
Martin v. Löwis11437992002-04-12 09:54:03 +000012505
Matthias Kloseb9621712010-04-24 17:59:49 +000012506if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012507 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012508else
Matthias Kloseb9621712010-04-24 17:59:49 +000012509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012510/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012511
12512int main()
12513{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012514 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012515}
12516
Martin v. Löwis11437992002-04-12 09:54:03 +000012517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012518if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012519 ac_cv_rshift_extends_sign=yes
12520else
Matthias Kloseb9621712010-04-24 17:59:49 +000012521 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012522fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012523rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12524 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012525fi
12526
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012527fi
12528
Matthias Kloseb9621712010-04-24 17:59:49 +000012529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12530$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012531if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012532then
Martin v. Löwis11437992002-04-12 09:54:03 +000012533
Matthias Kloseb9621712010-04-24 17:59:49 +000012534$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012535
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012536fi
12537
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012538# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12540$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
12541if test "${ac_cv_have_getc_unlocked+set}" = set; then :
12542 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012543else
Martin v. Löwis11437992002-04-12 09:54:03 +000012544
Matthias Kloseb9621712010-04-24 17:59:49 +000012545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012546/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012547#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012548int
12549main ()
12550{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012551
12552 FILE *f = fopen("/dev/null", "r");
12553 flockfile(f);
12554 getc_unlocked(f);
12555 funlockfile(f);
12556
Martin v. Löwis11437992002-04-12 09:54:03 +000012557 ;
12558 return 0;
12559}
12560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012561if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012562 ac_cv_have_getc_unlocked=yes
12563else
Matthias Kloseb9621712010-04-24 17:59:49 +000012564 ac_cv_have_getc_unlocked=no
12565fi
12566rm -f core conftest.err conftest.$ac_objext \
12567 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012569
Matthias Kloseb9621712010-04-24 17:59:49 +000012570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12571$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012572if test "$ac_cv_have_getc_unlocked" = yes
12573then
Martin v. Löwis11437992002-04-12 09:54:03 +000012574
Matthias Kloseb9621712010-04-24 17:59:49 +000012575$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012576
12577fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012578
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012579# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012580# save the value of LIBS so we don't actually link Python with readline
12581LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012582
Gregory P. Smith18820942008-09-07 06:24:49 +000012583# On some systems we need to link readline to a termcap compatible
12584# library. NOTE: Keep the precedence of listed libraries synchronised
12585# with setup.py.
12586py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12588$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012589for py_libtermcap in "" ncursesw ncurses curses termcap; do
12590 if test -z "$py_libtermcap"; then
12591 READLINE_LIBS="-lreadline"
12592 else
12593 READLINE_LIBS="-lreadline -l$py_libtermcap"
12594 fi
12595 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012597/* end confdefs.h. */
12598
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012599/* Override any GCC internal prototype to avoid an error.
12600 Use char because int might match the return type of a GCC
12601 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012602#ifdef __cplusplus
12603extern "C"
12604#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012605char readline ();
12606int
12607main ()
12608{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012609return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012610 ;
12611 return 0;
12612}
12613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012614if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012615 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012616fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012617rm -f core conftest.err conftest.$ac_objext \
12618 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012619 if test $py_cv_lib_readline = yes; then
12620 break
12621 fi
12622done
12623# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12624#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012625if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12627$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012628else
Matthias Kloseb9621712010-04-24 17:59:49 +000012629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12630$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012631
Matthias Kloseb9621712010-04-24 17:59:49 +000012632$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012633
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012634fi
12635
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012636# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12638$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
12639if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
12640 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012641else
12642 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012643LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012645/* end confdefs.h. */
12646
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012647/* Override any GCC internal prototype to avoid an error.
12648 Use char because int might match the return type of a GCC
12649 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012650#ifdef __cplusplus
12651extern "C"
12652#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012653char rl_callback_handler_install ();
12654int
12655main ()
12656{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012657return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012658 ;
12659 return 0;
12660}
12661_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012662if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012663 ac_cv_lib_readline_rl_callback_handler_install=yes
12664else
Matthias Kloseb9621712010-04-24 17:59:49 +000012665 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012666fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012667rm -f core conftest.err conftest.$ac_objext \
12668 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012669LIBS=$ac_check_lib_save_LIBS
12670fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12672$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
12673if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012674
Matthias Kloseb9621712010-04-24 17:59:49 +000012675$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012676
12677fi
12678
12679
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012680# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012682/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012683#include <readline/readline.h>
12684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012685if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012686 have_readline=yes
12687else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012688 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012689
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012690fi
Benjamin Peterson79263252010-10-31 16:50:44 +000012691rm -f conftest.err conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012692if test $have_readline = yes
12693then
Matthias Kloseb9621712010-04-24 17:59:49 +000012694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012695/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012696#include <readline/readline.h>
12697
12698_ACEOF
12699if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012700 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012701
Matthias Kloseb9621712010-04-24 17:59:49 +000012702$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012703
12704fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012705rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012706
Matthias Kloseb9621712010-04-24 17:59:49 +000012707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012708/* end confdefs.h. */
12709#include <readline/readline.h>
12710
12711_ACEOF
12712if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012713 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012714
Matthias Kloseb9621712010-04-24 17:59:49 +000012715$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012716
12717fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012718rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012719
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012720fi
12721
Martin v. Löwis0daad592001-09-30 21:09:59 +000012722# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12724$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
12725if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
12726 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012727else
Martin v. Löwis11437992002-04-12 09:54:03 +000012728 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012729LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012730cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012731/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012732
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012733/* Override any GCC internal prototype to avoid an error.
12734 Use char because int might match the return type of a GCC
12735 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012736#ifdef __cplusplus
12737extern "C"
12738#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012739char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012740int
12741main ()
12742{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012743return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012744 ;
12745 return 0;
12746}
12747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012748if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012749 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012750else
Matthias Kloseb9621712010-04-24 17:59:49 +000012751 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012752fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012753rm -f core conftest.err conftest.$ac_objext \
12754 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012755LIBS=$ac_check_lib_save_LIBS
12756fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12758$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
12759if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012760
Matthias Kloseb9621712010-04-24 17:59:49 +000012761$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012762
Martin v. Löwis0daad592001-09-30 21:09:59 +000012763fi
12764
Michael W. Hudson54241132001-12-07 15:38:26 +000012765
Thomas Wouters89d996e2007-09-08 17:39:28 +000012766# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12768$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
12769if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
12770 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012771else
12772 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012773LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012775/* end confdefs.h. */
12776
12777/* Override any GCC internal prototype to avoid an error.
12778 Use char because int might match the return type of a GCC
12779 builtin and then its argument prototype would still apply. */
12780#ifdef __cplusplus
12781extern "C"
12782#endif
12783char rl_completion_display_matches_hook ();
12784int
12785main ()
12786{
12787return rl_completion_display_matches_hook ();
12788 ;
12789 return 0;
12790}
12791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012792if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012793 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12794else
Matthias Kloseb9621712010-04-24 17:59:49 +000012795 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012796fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012797rm -f core conftest.err conftest.$ac_objext \
12798 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012799LIBS=$ac_check_lib_save_LIBS
12800fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12802$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
12803if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012804
Matthias Kloseb9621712010-04-24 17:59:49 +000012805$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012806
12807fi
12808
12809
Martin v. Löwis0daad592001-09-30 21:09:59 +000012810# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12812$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
12813if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
12814 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012815else
Martin v. Löwis11437992002-04-12 09:54:03 +000012816 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012817LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012819/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012820
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012821/* Override any GCC internal prototype to avoid an error.
12822 Use char because int might match the return type of a GCC
12823 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012824#ifdef __cplusplus
12825extern "C"
12826#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012827char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012828int
12829main ()
12830{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012831return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012832 ;
12833 return 0;
12834}
12835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012836if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012837 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012838else
Matthias Kloseb9621712010-04-24 17:59:49 +000012839 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012840fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012841rm -f core conftest.err conftest.$ac_objext \
12842 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012843LIBS=$ac_check_lib_save_LIBS
12844fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12846$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
12847if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012848
Matthias Kloseb9621712010-04-24 17:59:49 +000012849$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012850
Guido van Rossum353ae582001-07-10 16:45:32 +000012851fi
12852
Jack Jansendd19cf82001-12-06 22:36:17 +000012853
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012854# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012856/* end confdefs.h. */
12857#include <readline/readline.h>
12858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012859if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012860 have_readline=yes
12861else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012862 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012863
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012864fi
Benjamin Peterson79263252010-10-31 16:50:44 +000012865rm -f conftest.err conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012866if test $have_readline = yes
12867then
Matthias Kloseb9621712010-04-24 17:59:49 +000012868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012869/* end confdefs.h. */
12870#include <readline/readline.h>
12871
12872_ACEOF
12873if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012874 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012875
Matthias Kloseb9621712010-04-24 17:59:49 +000012876$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012877
12878fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012879rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012880
12881fi
12882
Martin v. Löwis82bca632006-02-10 20:49:30 +000012883# End of readline checks: restore LIBS
12884LIBS=$LIBS_no_readline
12885
Matthias Kloseb9621712010-04-24 17:59:49 +000012886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
12887$as_echo_n "checking for broken nice()... " >&6; }
12888if test "${ac_cv_broken_nice+set}" = set; then :
12889 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012890else
Martin v. Löwis11437992002-04-12 09:54:03 +000012891
Matthias Kloseb9621712010-04-24 17:59:49 +000012892if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012893 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012894else
Matthias Kloseb9621712010-04-24 17:59:49 +000012895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012896/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012897
12898int main()
12899{
12900 int val1 = nice(1);
12901 if (val1 != -1 && val1 == nice(2))
12902 exit(0);
12903 exit(1);
12904}
12905
Martin v. Löwis11437992002-04-12 09:54:03 +000012906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012907if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012908 ac_cv_broken_nice=yes
12909else
Matthias Kloseb9621712010-04-24 17:59:49 +000012910 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012911fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012912rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12913 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012914fi
12915
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012916fi
12917
Matthias Kloseb9621712010-04-24 17:59:49 +000012918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
12919$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012920if test "$ac_cv_broken_nice" = yes
12921then
Martin v. Löwis11437992002-04-12 09:54:03 +000012922
Matthias Kloseb9621712010-04-24 17:59:49 +000012923$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012924
12925fi
12926
Matthias Kloseb9621712010-04-24 17:59:49 +000012927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
12928$as_echo_n "checking for broken poll()... " >&6; }
12929if test "${ac_cv_broken_poll+set}" = set; then :
12930 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012931else
Matthias Kloseb9621712010-04-24 17:59:49 +000012932 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012933 ac_cv_broken_poll=no
12934else
Matthias Kloseb9621712010-04-24 17:59:49 +000012935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012936/* end confdefs.h. */
12937
12938#include <poll.h>
12939
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012940int main()
12941{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012942 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012943 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012944
12945 close (42);
12946
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012947 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012948 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012949 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012950 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012951 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012952 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012953 return 1;
12954}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012955
12956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012957if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012958 ac_cv_broken_poll=yes
12959else
Matthias Kloseb9621712010-04-24 17:59:49 +000012960 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012961fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012962rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12963 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012964fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012965
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012966fi
12967
Matthias Kloseb9621712010-04-24 17:59:49 +000012968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
12969$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012970if test "$ac_cv_broken_poll" = yes
12971then
12972
Matthias Kloseb9621712010-04-24 17:59:49 +000012973$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012974
12975fi
12976
Brett Cannon43802422005-02-10 20:48:03 +000012977# Before we can test tzset, we need to check if struct tm has a tm_zone
Martin v. Löwis1d459062005-03-14 21:23:33 +000012978# (which is not required by ISO C or UNIX spec) and/or if we support
12979# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000012980ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
Brett Cannon43802422005-02-10 20:48:03 +000012981#include <$ac_cv_struct_tm>
12982
Matthias Kloseb9621712010-04-24 17:59:49 +000012983"
12984if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000012985
12986cat >>confdefs.h <<_ACEOF
12987#define HAVE_STRUCT_TM_TM_ZONE 1
12988_ACEOF
12989
12990
12991fi
12992
12993if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12994
Matthias Kloseb9621712010-04-24 17:59:49 +000012995$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000012996
12997else
Matthias Kloseb9621712010-04-24 17:59:49 +000012998 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12999"
13000if test "x$ac_cv_have_decl_tzname" = x""yes; then :
13001 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013002else
Matthias Kloseb9621712010-04-24 17:59:49 +000013003 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013004fi
13005
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013006cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013007#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013008_ACEOF
13009
Matthias Kloseb9621712010-04-24 17:59:49 +000013010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13011$as_echo_n "checking for tzname... " >&6; }
13012if test "${ac_cv_var_tzname+set}" = set; then :
13013 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013014else
Matthias Kloseb9621712010-04-24 17:59:49 +000013015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013016/* end confdefs.h. */
13017#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013018#if !HAVE_DECL_TZNAME
13019extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013020#endif
13021
13022int
13023main ()
13024{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013025return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013026 ;
13027 return 0;
13028}
13029_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013030if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013031 ac_cv_var_tzname=yes
13032else
Matthias Kloseb9621712010-04-24 17:59:49 +000013033 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013034fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013035rm -f core conftest.err conftest.$ac_objext \
13036 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013037fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13039$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013040 if test $ac_cv_var_tzname = yes; then
13041
Matthias Kloseb9621712010-04-24 17:59:49 +000013042$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013043
13044 fi
13045fi
13046
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013047
Martin v. Löwis1d459062005-03-14 21:23:33 +000013048# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13050$as_echo_n "checking for working tzset()... " >&6; }
13051if test "${ac_cv_working_tzset+set}" = set; then :
13052 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013053else
13054
Matthias Kloseb9621712010-04-24 17:59:49 +000013055if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013056 ac_cv_working_tzset=no
13057else
Matthias Kloseb9621712010-04-24 17:59:49 +000013058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013059/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013060
13061#include <stdlib.h>
13062#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013063#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013064
13065#if HAVE_TZNAME
13066extern char *tzname[];
13067#endif
13068
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013069int main()
13070{
Brett Cannon18367812003-09-19 00:59:16 +000013071 /* Note that we need to ensure that not only does tzset(3)
13072 do 'something' with localtime, but it works as documented
13073 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013074 This includes making sure that tzname is set properly if
13075 tm->tm_zone does not exist since it is the alternative way
13076 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013077
13078 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013079 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013080 */
13081
Martin v. Löwis1d459062005-03-14 21:23:33 +000013082 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013083 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13084
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013085 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013086 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013087 if (localtime(&groundhogday)->tm_hour != 0)
13088 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013089#if HAVE_TZNAME
13090 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13091 if (strcmp(tzname[0], "UTC") ||
13092 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13093 exit(1);
13094#endif
Brett Cannon18367812003-09-19 00:59:16 +000013095
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013096 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013097 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013098 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013099 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013100#if HAVE_TZNAME
13101 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13102 exit(1);
13103#endif
Brett Cannon18367812003-09-19 00:59:16 +000013104
13105 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13106 tzset();
13107 if (localtime(&groundhogday)->tm_hour != 11)
13108 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013109#if HAVE_TZNAME
13110 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13111 exit(1);
13112#endif
13113
13114#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013115 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13116 exit(1);
13117 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13118 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013119#endif
Brett Cannon18367812003-09-19 00:59:16 +000013120
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013121 exit(0);
13122}
13123
13124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013125if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013126 ac_cv_working_tzset=yes
13127else
Matthias Kloseb9621712010-04-24 17:59:49 +000013128 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013129fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013130rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13131 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013132fi
13133
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013134fi
13135
Matthias Kloseb9621712010-04-24 17:59:49 +000013136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13137$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013138if test "$ac_cv_working_tzset" = yes
13139then
13140
Matthias Kloseb9621712010-04-24 17:59:49 +000013141$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013142
13143fi
13144
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013145# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13147$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
13148if test "${ac_cv_stat_tv_nsec+set}" = set; then :
13149 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013150else
Matthias Kloseb9621712010-04-24 17:59:49 +000013151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013152/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013153#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013154int
13155main ()
13156{
13157
13158struct stat st;
13159st.st_mtim.tv_nsec = 1;
13160
13161 ;
13162 return 0;
13163}
13164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013165if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013166 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013167else
Matthias Kloseb9621712010-04-24 17:59:49 +000013168 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013169fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13171fi
13172
Matthias Kloseb9621712010-04-24 17:59:49 +000013173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13174$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013175if test "$ac_cv_stat_tv_nsec" = yes
13176then
13177
Matthias Kloseb9621712010-04-24 17:59:49 +000013178$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013179
13180fi
13181
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013182# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13184$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
13185if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
13186 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013187else
Matthias Kloseb9621712010-04-24 17:59:49 +000013188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013189/* end confdefs.h. */
13190#include <sys/stat.h>
13191int
13192main ()
13193{
13194
13195struct stat st;
13196st.st_mtimespec.tv_nsec = 1;
13197
13198 ;
13199 return 0;
13200}
13201_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013202if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013203 ac_cv_stat_tv_nsec2=yes
13204else
Matthias Kloseb9621712010-04-24 17:59:49 +000013205 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013206fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13208fi
13209
Matthias Kloseb9621712010-04-24 17:59:49 +000013210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13211$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013212if test "$ac_cv_stat_tv_nsec2" = yes
13213then
13214
Matthias Kloseb9621712010-04-24 17:59:49 +000013215$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013216
13217fi
13218
Jack Jansen666b1e72001-10-31 12:11:48 +000013219# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13221$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
13222if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
13223 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013224else
Matthias Kloseb9621712010-04-24 17:59:49 +000013225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013226/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013227#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013228int
13229main ()
13230{
Jack Jansen666b1e72001-10-31 12:11:48 +000013231
13232 int rtn;
13233 rtn = mvwdelch(0,0,0);
13234
Martin v. Löwis11437992002-04-12 09:54:03 +000013235 ;
13236 return 0;
13237}
13238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013239if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013240 ac_cv_mvwdelch_is_expression=yes
13241else
Matthias Kloseb9621712010-04-24 17:59:49 +000013242 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13245fi
13246
Matthias Kloseb9621712010-04-24 17:59:49 +000013247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13248$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013249
13250if test "$ac_cv_mvwdelch_is_expression" = yes
13251then
Martin v. Löwis11437992002-04-12 09:54:03 +000013252
Matthias Kloseb9621712010-04-24 17:59:49 +000013253$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013254
13255fi
13256
Matthias Kloseb9621712010-04-24 17:59:49 +000013257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13258$as_echo_n "checking whether WINDOW has _flags... " >&6; }
13259if test "${ac_cv_window_has_flags+set}" = set; then :
13260 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013261else
Matthias Kloseb9621712010-04-24 17:59:49 +000013262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013263/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013264#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013265int
13266main ()
13267{
Jack Jansen666b1e72001-10-31 12:11:48 +000013268
13269 WINDOW *w;
13270 w->_flags = 0;
13271
Martin v. Löwis11437992002-04-12 09:54:03 +000013272 ;
13273 return 0;
13274}
13275_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013276if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013277 ac_cv_window_has_flags=yes
13278else
Matthias Kloseb9621712010-04-24 17:59:49 +000013279 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013280fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13282fi
13283
Matthias Kloseb9621712010-04-24 17:59:49 +000013284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13285$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013286
Jack Jansen666b1e72001-10-31 12:11:48 +000013287
13288if test "$ac_cv_window_has_flags" = yes
13289then
Martin v. Löwis11437992002-04-12 09:54:03 +000013290
Matthias Kloseb9621712010-04-24 17:59:49 +000013291$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013292
13293fi
13294
Matthias Kloseb9621712010-04-24 17:59:49 +000013295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13296$as_echo_n "checking for is_term_resized... " >&6; }
13297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013298/* end confdefs.h. */
13299#include <curses.h>
13300int
13301main ()
13302{
13303void *x=is_term_resized
13304 ;
13305 return 0;
13306}
13307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013308if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013309
Matthias Kloseb9621712010-04-24 17:59:49 +000013310$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013311
Matthias Kloseb159a552010-04-25 21:00:44 +000013312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013313$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013314else
Matthias Kloseb9621712010-04-24 17:59:49 +000013315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13316$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013317
13318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13320
Matthias Kloseb9621712010-04-24 17:59:49 +000013321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13322$as_echo_n "checking for resize_term... " >&6; }
13323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013324/* end confdefs.h. */
13325#include <curses.h>
13326int
13327main ()
13328{
13329void *x=resize_term
13330 ;
13331 return 0;
13332}
13333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013334if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013335
Matthias Kloseb9621712010-04-24 17:59:49 +000013336$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013337
Matthias Kloseb159a552010-04-25 21:00:44 +000013338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013339$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013340else
Matthias Kloseb9621712010-04-24 17:59:49 +000013341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13342$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013343
13344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13346
Matthias Kloseb9621712010-04-24 17:59:49 +000013347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13348$as_echo_n "checking for resizeterm... " >&6; }
13349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013350/* end confdefs.h. */
13351#include <curses.h>
13352int
13353main ()
13354{
13355void *x=resizeterm
13356 ;
13357 return 0;
13358}
13359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013360if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013361
Matthias Kloseb9621712010-04-24 17:59:49 +000013362$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013363
Matthias Kloseb159a552010-04-25 21:00:44 +000013364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013365$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013366else
Matthias Kloseb9621712010-04-24 17:59:49 +000013367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13368$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013369
13370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13372
Matthias Kloseb9621712010-04-24 17:59:49 +000013373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13374$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013375
13376if test -r /dev/ptmx
13377then
Matthias Kloseb9621712010-04-24 17:59:49 +000013378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13379$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013380
Matthias Kloseb9621712010-04-24 17:59:49 +000013381$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013382
Thomas Wouters89f507f2006-12-13 04:49:30 +000013383else
Matthias Kloseb9621712010-04-24 17:59:49 +000013384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13385$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013386fi
13387
Matthias Kloseb9621712010-04-24 17:59:49 +000013388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13389$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013390
13391if test -r /dev/ptc
13392then
Matthias Kloseb9621712010-04-24 17:59:49 +000013393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13394$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013395
Matthias Kloseb9621712010-04-24 17:59:49 +000013396$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013397
Thomas Wouters89f507f2006-12-13 04:49:30 +000013398else
Matthias Kloseb9621712010-04-24 17:59:49 +000013399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13400$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013401fi
13402
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013403if test "$have_long_long" = yes
13404then
Matthias Kloseb9621712010-04-24 17:59:49 +000013405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13406$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
13407 if test "${ac_cv_have_long_long_format+set}" = set; then :
13408 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013409else
Matthias Kloseb9621712010-04-24 17:59:49 +000013410 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013411 ac_cv_have_long_long_format=no
13412else
Matthias Kloseb9621712010-04-24 17:59:49 +000013413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013414/* end confdefs.h. */
13415
13416 #include <stdio.h>
13417 #include <stddef.h>
13418 #include <string.h>
13419
13420 #ifdef HAVE_SYS_TYPES_H
13421 #include <sys/types.h>
13422 #endif
13423
13424 int main()
13425 {
13426 char buffer[256];
13427
13428 if (sprintf(buffer, "%lld", (long long)123) < 0)
13429 return 1;
13430 if (strcmp(buffer, "123"))
13431 return 1;
13432
13433 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13434 return 1;
13435 if (strcmp(buffer, "-123"))
13436 return 1;
13437
13438 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13439 return 1;
13440 if (strcmp(buffer, "123"))
13441 return 1;
13442
13443 return 0;
13444 }
13445
13446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013447if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013448 ac_cv_have_long_long_format=yes
13449else
Matthias Kloseb9621712010-04-24 17:59:49 +000013450 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013451fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013452rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13453 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013454fi
13455
13456
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013457fi
13458
Matthias Kloseb9621712010-04-24 17:59:49 +000013459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13460$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013461fi
13462
Mark Dickinson89d7d412009-12-31 20:50:59 +000013463if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013464then
13465
Matthias Kloseb9621712010-04-24 17:59:49 +000013466$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013467
13468fi
13469
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013470if test $ac_sys_system = Darwin
13471then
13472 LIBS="$LIBS -framework CoreFoundation"
13473fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013474
Matthias Kloseb9621712010-04-24 17:59:49 +000013475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13476$as_echo_n "checking for %zd printf() format support... " >&6; }
13477if test "${ac_cv_have_size_t_format+set}" = set; then :
13478 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013479else
Matthias Kloseb9621712010-04-24 17:59:49 +000013480 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013481 ac_cv_have_size_t_format="cross -- assuming yes"
13482
Thomas Wouters477c8d52006-05-27 19:21:47 +000013483else
Matthias Kloseb9621712010-04-24 17:59:49 +000013484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013485/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013486
Thomas Wouters477c8d52006-05-27 19:21:47 +000013487#include <stdio.h>
13488#include <stddef.h>
13489#include <string.h>
13490
Christian Heimes2c181612007-12-17 20:04:13 +000013491#ifdef HAVE_SYS_TYPES_H
13492#include <sys/types.h>
13493#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013494
13495#ifdef HAVE_SSIZE_T
13496typedef ssize_t Py_ssize_t;
13497#elif SIZEOF_VOID_P == SIZEOF_LONG
13498typedef long Py_ssize_t;
13499#else
13500typedef int Py_ssize_t;
13501#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013502
Christian Heimes2c181612007-12-17 20:04:13 +000013503int main()
13504{
13505 char buffer[256];
13506
Thomas Wouters477c8d52006-05-27 19:21:47 +000013507 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13508 return 1;
13509
Thomas Wouters89f507f2006-12-13 04:49:30 +000013510 if (strcmp(buffer, "123"))
13511 return 1;
13512
13513 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13514 return 1;
13515
13516 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013517 return 1;
13518
13519 return 0;
13520}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013521
Thomas Wouters477c8d52006-05-27 19:21:47 +000013522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013523if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013524 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013525else
Matthias Kloseb9621712010-04-24 17:59:49 +000013526 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013527fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013528rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13529 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013530fi
13531
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013532fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13534$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013535if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013536
Matthias Kloseb9621712010-04-24 17:59:49 +000013537$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013538
13539fi
13540
Matthias Kloseb9621712010-04-24 17:59:49 +000013541ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013542#ifdef HAVE_SYS_TYPES_H
13543#include <sys/types.h>
13544#endif
13545#ifdef HAVE_SYS_SOCKET_H
13546#include <sys/socket.h>
13547#endif
13548
Matthias Kloseb9621712010-04-24 17:59:49 +000013549"
13550if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013551
Martin v. Löwis11437992002-04-12 09:54:03 +000013552else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013553
Matthias Kloseb9621712010-04-24 17:59:49 +000013554$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013555
13556fi
13557
Michael W. Hudson54241132001-12-07 15:38:26 +000013558
Matthias Kloseb9621712010-04-24 17:59:49 +000013559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13560$as_echo_n "checking for broken mbstowcs... " >&6; }
13561if test "${ac_cv_broken_mbstowcs+set}" = set; then :
13562 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013563else
Matthias Kloseb9621712010-04-24 17:59:49 +000013564 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013565 ac_cv_broken_mbstowcs=no
13566else
Matthias Kloseb9621712010-04-24 17:59:49 +000013567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013568/* end confdefs.h. */
13569
13570#include<stdlib.h>
13571int main() {
13572 size_t len = -1;
13573 const char *str = "text";
13574 len = mbstowcs(NULL, str, 0);
13575 return (len != 4);
13576}
13577
13578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013579if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013580 ac_cv_broken_mbstowcs=no
13581else
Matthias Kloseb9621712010-04-24 17:59:49 +000013582 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013583fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013584rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13585 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013586fi
13587
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013588fi
13589
Matthias Kloseb9621712010-04-24 17:59:49 +000013590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13591$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013592if test "$ac_cv_broken_mbstowcs" = yes
13593then
13594
Matthias Kloseb9621712010-04-24 17:59:49 +000013595$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013596
13597fi
13598
Antoine Pitrou042b1282010-08-13 21:15:58 +000013599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13600$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
13601if test "${ac_cv_computed_gotos+set}" = set; then :
13602 $as_echo_n "(cached) " >&6
13603else
13604 if test "$cross_compiling" = yes; then :
13605 ac_cv_computed_gotos=no
13606else
13607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13608/* end confdefs.h. */
13609
13610int main(int argc, char **argv)
13611{
13612 static void *targets[1] = { &&LABEL1 };
13613 goto LABEL2;
13614LABEL1:
13615 return 0;
13616LABEL2:
13617 goto *targets[0];
13618 return 1;
13619}
13620
13621_ACEOF
13622if ac_fn_c_try_run "$LINENO"; then :
13623 ac_cv_computed_gotos=yes
13624else
13625 ac_cv_computed_gotos=no
13626fi
13627rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13628 conftest.$ac_objext conftest.beam conftest.$ac_ext
13629fi
13630
13631fi
13632
13633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13634$as_echo "$ac_cv_computed_gotos" >&6; }
13635if test "$ac_cv_computed_gotos" = yes
13636then
13637
13638$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13639
13640fi
13641
Antoine Pitroub52ec782009-01-25 16:34:23 +000013642# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13644$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013645
13646# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013647if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013648 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013649if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013650then
13651
Matthias Kloseb9621712010-04-24 17:59:49 +000013652$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013653
Matthias Kloseb9621712010-04-24 17:59:49 +000013654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13655$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013656fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013657if test "$withval" = no
13658then
13659
13660$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13661
Matthias Kloseb9621712010-04-24 17:59:49 +000013662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13663$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013664fi
13665
Antoine Pitrou042b1282010-08-13 21:15:58 +000013666else
13667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13668$as_echo "no value specified" >&6; }
13669fi
13670
Antoine Pitroub52ec782009-01-25 16:34:23 +000013671
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013672case $ac_sys_system in
13673AIX*)
13674
13675$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13676 ;;
13677esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013678
Michael W. Hudson54241132001-12-07 15:38:26 +000013679
Jesus Cea6a792292010-05-03 21:18:48 +000013680case $ac_sys_system in
Benjamin Peterson79263252010-10-31 16:50:44 +000013681 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 +000013682esac
13683
13684
13685
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013686
13687
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013688for h in `(cd $srcdir;echo Python/thread_*.h)`
13689do
13690 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13691done
13692
Michael W. Hudson54241132001-12-07 15:38:26 +000013693
Neal Norwitzd24499d2005-12-18 21:36:39 +000013694SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13696$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013697for dir in $SRCDIRS; do
13698 if test ! -d $dir; then
13699 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013700 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013701done
Matthias Kloseb9621712010-04-24 17:59:49 +000013702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13703$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013704
Guido van Rossum627b2d71993-12-24 10:39:16 +000013705# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013706ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013707
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013708ac_config_files="$ac_config_files Modules/ld_so_aix"
13709
Martin v. Löwis11437992002-04-12 09:54:03 +000013710cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013711# This file is a shell script that caches the results of configure
13712# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013713# scripts and configure runs, see configure's option --config-cache.
13714# It is not useful on other systems. If it contains results you don't
13715# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013716#
Martin v. Löwis11437992002-04-12 09:54:03 +000013717# config.status only pays attention to the cache file if you give it
13718# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013719#
Skip Montanaro6dead952003-09-25 14:50:04 +000013720# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013721# loading this file, other *unset* `ac_cv_foo' will be assigned the
13722# following values.
13723
13724_ACEOF
13725
Guido van Rossumf78abae1997-01-21 22:02:36 +000013726# The following way of writing the cache mishandles newlines in values,
13727# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013728# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013729# Ultrix sh set writes to stderr and can't be redirected directly,
13730# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013731(
13732 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13733 eval ac_val=\$$ac_var
13734 case $ac_val in #(
13735 *${as_nl}*)
13736 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013737 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13738$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013739 esac
13740 case $ac_var in #(
13741 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013742 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13743 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013744 esac ;;
13745 esac
13746 done
13747
Martin v. Löwis11437992002-04-12 09:54:03 +000013748 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013749 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13750 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013751 # `set' does not quote correctly, so add quotes: double-quote
13752 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013753 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013754 "s/'/'\\\\''/g;
13755 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013756 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013757 *)
13758 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013759 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013760 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013761 esac |
13762 sort
13763) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013764 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013765 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013766 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013767 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013768 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13769 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013770 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13771 :end' >>confcache
13772if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13773 if test -w "$cache_file"; then
13774 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013775 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13776$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000013777 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013778 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013779 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13780$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013781 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013782fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013783rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013784
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013785test "x$prefix" = xNONE && prefix=$ac_default_prefix
13786# Let make expand exec_prefix.
13787test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013788
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013789DEFS=-DHAVE_CONFIG_H
13790
Skip Montanaro6dead952003-09-25 14:50:04 +000013791ac_libobjs=
13792ac_ltlibobjs=
13793for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13794 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013795 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013796 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013797 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13798 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013799 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13800 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013801done
13802LIBOBJS=$ac_libobjs
13803
13804LTLIBOBJS=$ac_ltlibobjs
13805
13806
Martin v. Löwis11437992002-04-12 09:54:03 +000013807
Matthias Kloseb9621712010-04-24 17:59:49 +000013808
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013809: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013810ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013811ac_clean_files_save=$ac_clean_files
13812ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013813{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13814$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13815as_write_fail=0
13816cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013817#! $SHELL
13818# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013819# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013820# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013821# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013822
Martin v. Löwis11437992002-04-12 09:54:03 +000013823debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013824ac_cs_recheck=false
13825ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013826
Matthias Kloseb9621712010-04-24 17:59:49 +000013827SHELL=\${CONFIG_SHELL-$SHELL}
13828export SHELL
13829_ASEOF
13830cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13831## -------------------- ##
13832## M4sh Initialization. ##
13833## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013834
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013835# Be more Bourne compatible
13836DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013837if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013838 emulate sh
13839 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013840 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013841 # is contrary to our usage. Disable this feature.
13842 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013843 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013844else
Matthias Kloseb9621712010-04-24 17:59:49 +000013845 case `(set -o) 2>/dev/null` in #(
13846 *posix*) :
13847 set -o posix ;; #(
13848 *) :
13849 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013850esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013851fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013852
13853
Matthias Kloseb9621712010-04-24 17:59:49 +000013854as_nl='
13855'
13856export as_nl
13857# Printing a long string crashes Solaris 7 /usr/bin/printf.
13858as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13859as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13860as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13861# Prefer a ksh shell builtin over an external printf program on Solaris,
13862# but without wasting forks for bash or zsh.
13863if test -z "$BASH_VERSION$ZSH_VERSION" \
13864 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13865 as_echo='print -r --'
13866 as_echo_n='print -rn --'
13867elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13868 as_echo='printf %s\n'
13869 as_echo_n='printf %s'
13870else
13871 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13872 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13873 as_echo_n='/usr/ucb/echo -n'
13874 else
13875 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13876 as_echo_n_body='eval
13877 arg=$1;
13878 case $arg in #(
13879 *"$as_nl"*)
13880 expr "X$arg" : "X\\(.*\\)$as_nl";
13881 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13882 esac;
13883 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13884 '
13885 export as_echo_n_body
13886 as_echo_n='sh -c $as_echo_n_body as_echo'
13887 fi
13888 export as_echo_body
13889 as_echo='sh -c $as_echo_body as_echo'
13890fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013891
13892# The user is always right.
13893if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013894 PATH_SEPARATOR=:
13895 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13896 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13897 PATH_SEPARATOR=';'
13898 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013899fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013900
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013901
13902# IFS
13903# We need space, tab and new line, in precisely that order. Quoting is
13904# there to prevent editors from complaining about space-tab.
13905# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13906# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013907IFS=" "" $as_nl"
13908
13909# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000013910case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013911 *[\\/]* ) as_myself=$0 ;;
13912 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000013913for as_dir in $PATH
13914do
13915 IFS=$as_save_IFS
13916 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000013917 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13918 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013919IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000013920
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013921 ;;
13922esac
13923# We did not find ourselves, most probably we were run as `sh COMMAND'
13924# in which case we are not to be found in the path.
13925if test "x$as_myself" = x; then
13926 as_myself=$0
13927fi
13928if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013929 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13930 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013931fi
13932
Matthias Kloseb9621712010-04-24 17:59:49 +000013933# Unset variables that we do not need and which cause bugs (e.g. in
13934# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13935# suppresses any "Segmentation fault" message there. '((' could
13936# trigger a bug in pdksh 5.2.14.
13937for as_var in BASH_ENV ENV MAIL MAILPATH
13938do eval test x\${$as_var+set} = xset \
13939 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013940done
13941PS1='$ '
13942PS2='> '
13943PS4='+ '
13944
13945# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000013946LC_ALL=C
13947export LC_ALL
13948LANGUAGE=C
13949export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013950
Matthias Kloseb9621712010-04-24 17:59:49 +000013951# CDPATH.
13952(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13953
13954
Benjamin Peterson79263252010-10-31 16:50:44 +000013955# as_fn_error ERROR [LINENO LOG_FD]
13956# ---------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000013957# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
13958# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Benjamin Peterson79263252010-10-31 16:50:44 +000013959# script with status $?, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000013960as_fn_error ()
13961{
Benjamin Peterson79263252010-10-31 16:50:44 +000013962 as_status=$?; test $as_status -eq 0 && as_status=1
13963 if test "$3"; then
13964 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
13965 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
Matthias Kloseb9621712010-04-24 17:59:49 +000013966 fi
Benjamin Peterson79263252010-10-31 16:50:44 +000013967 $as_echo "$as_me: error: $1" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000013968 as_fn_exit $as_status
13969} # as_fn_error
13970
13971
13972# as_fn_set_status STATUS
13973# -----------------------
13974# Set $? to STATUS, without forking.
13975as_fn_set_status ()
13976{
13977 return $1
13978} # as_fn_set_status
13979
13980# as_fn_exit STATUS
13981# -----------------
13982# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
13983as_fn_exit ()
13984{
13985 set +e
13986 as_fn_set_status $1
13987 exit $1
13988} # as_fn_exit
13989
13990# as_fn_unset VAR
13991# ---------------
13992# Portably unset VAR.
13993as_fn_unset ()
13994{
13995 { eval $1=; unset $1;}
13996}
13997as_unset=as_fn_unset
13998# as_fn_append VAR VALUE
13999# ----------------------
14000# Append the text in VALUE to the end of the definition contained in VAR. Take
14001# advantage of any shell optimizations that allow amortized linear growth over
14002# repeated appends, instead of the typical quadratic growth present in naive
14003# implementations.
14004if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14005 eval 'as_fn_append ()
14006 {
14007 eval $1+=\$2
14008 }'
14009else
14010 as_fn_append ()
14011 {
14012 eval $1=\$$1\$2
14013 }
14014fi # as_fn_append
14015
14016# as_fn_arith ARG...
14017# ------------------
14018# Perform arithmetic evaluation on the ARGs, and store the result in the
14019# global $as_val. Take advantage of shells that can avoid forks. The arguments
14020# must be portable across $(()) and expr.
14021if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14022 eval 'as_fn_arith ()
14023 {
14024 as_val=$(( $* ))
14025 }'
14026else
14027 as_fn_arith ()
14028 {
14029 as_val=`expr "$@" || test $? -eq 1`
14030 }
14031fi # as_fn_arith
14032
14033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014034if expr a : '\(a\)' >/dev/null 2>&1 &&
14035 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14036 as_expr=expr
14037else
14038 as_expr=false
14039fi
14040
14041if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14042 as_basename=basename
14043else
14044 as_basename=false
14045fi
14046
Matthias Kloseb9621712010-04-24 17:59:49 +000014047if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14048 as_dirname=dirname
14049else
14050 as_dirname=false
14051fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014052
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014053as_me=`$as_basename -- "$0" ||
14054$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14055 X"$0" : 'X\(//\)$' \| \
14056 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014057$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014058 sed '/^.*\/\([^/][^/]*\)\/*$/{
14059 s//\1/
14060 q
14061 }
14062 /^X\/\(\/\/\)$/{
14063 s//\1/
14064 q
14065 }
14066 /^X\/\(\/\).*/{
14067 s//\1/
14068 q
14069 }
14070 s/.*/./; q'`
14071
Matthias Kloseb9621712010-04-24 17:59:49 +000014072# Avoid depending upon Character Ranges.
14073as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14074as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14075as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14076as_cr_digits='0123456789'
14077as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014078
14079ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014080case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014081-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014082 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014083 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014084 xy) ECHO_C='\c';;
14085 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14086 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014087 esac;;
14088*)
14089 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014090esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014091
Martin v. Löwis11437992002-04-12 09:54:03 +000014092rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014093if test -d conf$$.dir; then
14094 rm -f conf$$.dir/conf$$.file
14095else
14096 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014097 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014098fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014099if (echo >conf$$.file) 2>/dev/null; then
14100 if ln -s conf$$.file conf$$ 2>/dev/null; then
14101 as_ln_s='ln -s'
14102 # ... but there are two gotchas:
14103 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14104 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14105 # In both cases, we have to default to `cp -p'.
14106 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14107 as_ln_s='cp -p'
14108 elif ln conf$$.file conf$$ 2>/dev/null; then
14109 as_ln_s=ln
14110 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014111 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014112 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014113else
14114 as_ln_s='cp -p'
14115fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014116rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14117rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014118
Matthias Kloseb9621712010-04-24 17:59:49 +000014119
14120# as_fn_mkdir_p
14121# -------------
14122# Create "$as_dir" as a directory, including parents if necessary.
14123as_fn_mkdir_p ()
14124{
14125
14126 case $as_dir in #(
14127 -*) as_dir=./$as_dir;;
14128 esac
14129 test -d "$as_dir" || eval $as_mkdir_p || {
14130 as_dirs=
14131 while :; do
14132 case $as_dir in #(
14133 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14134 *) as_qdir=$as_dir;;
14135 esac
14136 as_dirs="'$as_qdir' $as_dirs"
14137 as_dir=`$as_dirname -- "$as_dir" ||
14138$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14139 X"$as_dir" : 'X\(//\)[^/]' \| \
14140 X"$as_dir" : 'X\(//\)$' \| \
14141 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14142$as_echo X"$as_dir" |
14143 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14144 s//\1/
14145 q
14146 }
14147 /^X\(\/\/\)[^/].*/{
14148 s//\1/
14149 q
14150 }
14151 /^X\(\/\/\)$/{
14152 s//\1/
14153 q
14154 }
14155 /^X\(\/\).*/{
14156 s//\1/
14157 q
14158 }
14159 s/.*/./; q'`
14160 test -d "$as_dir" && break
14161 done
14162 test -z "$as_dirs" || eval "mkdir $as_dirs"
Benjamin Peterson79263252010-10-31 16:50:44 +000014163 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014164
14165
14166} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014167if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014168 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014169else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014170 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014171 as_mkdir_p=false
14172fi
14173
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014174if test -x / >/dev/null 2>&1; then
14175 as_test_x='test -x'
14176else
14177 if ls -dL / >/dev/null 2>&1; then
14178 as_ls_L_option=L
14179 else
14180 as_ls_L_option=
14181 fi
14182 as_test_x='
14183 eval sh -c '\''
14184 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014185 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014186 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014187 case $1 in #(
14188 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014189 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014190 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014191 ???[sx]*):;;*)false;;esac;fi
14192 '\'' sh
14193 '
14194fi
14195as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014196
14197# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014198as_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 +000014199
14200# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014201as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014202
14203
Martin v. Löwis11437992002-04-12 09:54:03 +000014204exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014205## ----------------------------------- ##
14206## Main body of $CONFIG_STATUS script. ##
14207## ----------------------------------- ##
14208_ASEOF
14209test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014210
Matthias Kloseb9621712010-04-24 17:59:49 +000014211cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14212# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014213# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014214# values after options handling.
14215ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014216This file was extended by python $as_me 3.2, which was
Benjamin Peterson79263252010-10-31 16:50:44 +000014217generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014218
14219 CONFIG_FILES = $CONFIG_FILES
14220 CONFIG_HEADERS = $CONFIG_HEADERS
14221 CONFIG_LINKS = $CONFIG_LINKS
14222 CONFIG_COMMANDS = $CONFIG_COMMANDS
14223 $ $0 $@
14224
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014225on `(hostname || uname -n) 2>/dev/null | sed 1q`
14226"
14227
Martin v. Löwis11437992002-04-12 09:54:03 +000014228_ACEOF
14229
Matthias Kloseb9621712010-04-24 17:59:49 +000014230case $ac_config_files in *"
14231"*) set x $ac_config_files; shift; ac_config_files=$*;;
14232esac
14233
14234case $ac_config_headers in *"
14235"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14236esac
14237
14238
14239cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014240# Files that config.status was made for.
Barry Warsaw278266f2010-10-14 17:38:46 +000014241config_files="$ac_config_files"
14242config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014243
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014244_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014245
Matthias Kloseb9621712010-04-24 17:59:49 +000014246cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014247ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014248\`$as_me' instantiates files and other configuration actions
14249from templates according to the current configuration. Unless the files
14250and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014251
Matthias Kloseb9621712010-04-24 17:59:49 +000014252Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014253
14254 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014255 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014256 --config print configuration, then exit
14257 -q, --quiet, --silent
14258 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014259 -d, --debug don't remove temporary files
14260 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014261 --file=FILE[:TEMPLATE]
14262 instantiate the configuration file FILE
14263 --header=FILE[:TEMPLATE]
14264 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014265
14266Configuration files:
14267$config_files
14268
14269Configuration headers:
14270$config_headers
14271
Matthias Kloseb9621712010-04-24 17:59:49 +000014272Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014273
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014274_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014275cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14276ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014277ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014278python config.status 3.2
Benjamin Peterson79263252010-10-31 16:50:44 +000014279configured by $0, generated by GNU Autoconf 2.65,
Matthias Kloseb9621712010-04-24 17:59:49 +000014280 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014281
Benjamin Peterson79263252010-10-31 16:50:44 +000014282Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014283This config.status script is free software; the Free Software Foundation
14284gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014285
14286ac_pwd='$ac_pwd'
14287srcdir='$srcdir'
14288INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014289test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014290_ACEOF
14291
Matthias Kloseb9621712010-04-24 17:59:49 +000014292cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14293# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014294ac_need_defaults=:
14295while test $# != 0
14296do
14297 case $1 in
Benjamin Peterson79263252010-10-31 16:50:44 +000014298 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014299 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14300 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014301 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014302 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014303 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014304 ac_option=$1
14305 ac_optarg=$2
14306 ac_shift=shift
14307 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014308 esac
14309
Skip Montanaro6dead952003-09-25 14:50:04 +000014310 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014311 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014312 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14313 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014314 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014315 $as_echo "$ac_cs_version"; exit ;;
14316 --config | --confi | --conf | --con | --co | --c )
14317 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014318 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014319 debug=: ;;
14320 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014321 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014322 case $ac_optarg in
14323 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14324 esac
14325 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014326 ac_need_defaults=false;;
14327 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014328 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014329 case $ac_optarg in
14330 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14331 esac
14332 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014333 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014334 --he | --h)
14335 # Conflict between --help and --header
Benjamin Peterson79263252010-10-31 16:50:44 +000014336 as_fn_error "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014337Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014338 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014339 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014340 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14341 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14342 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014343
14344 # This is an error.
Benjamin Peterson79263252010-10-31 16:50:44 +000014345 -*) as_fn_error "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014346Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014347
Matthias Kloseb9621712010-04-24 17:59:49 +000014348 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014349 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014350
14351 esac
14352 shift
14353done
14354
Skip Montanaro6dead952003-09-25 14:50:04 +000014355ac_configure_extra_args=
14356
14357if $ac_cs_silent; then
14358 exec 6>/dev/null
14359 ac_configure_extra_args="$ac_configure_extra_args --silent"
14360fi
14361
14362_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014363cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014364if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014365 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14366 shift
14367 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14368 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014369 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014370 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014371fi
14372
Martin v. Löwis11437992002-04-12 09:54:03 +000014373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014374cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014375exec 5>>config.log
14376{
14377 echo
14378 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14379## Running $as_me. ##
14380_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014381 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014382} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014383
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014385cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014386_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014387
Matthias Kloseb9621712010-04-24 17:59:49 +000014388cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014389
14390# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014391for ac_config_target in $ac_config_targets
14392do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014393 case $ac_config_target in
14394 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14395 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14396 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014397 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14398 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014399 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14400 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014401 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014402 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014403
Benjamin Peterson79263252010-10-31 16:50:44 +000014404 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014405 esac
14406done
14407
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014408
Martin v. Löwis11437992002-04-12 09:54:03 +000014409# If the user did not use the arguments to specify the items to instantiate,
14410# then the envvar interface is used. Set only those that are not.
14411# We use the long form for the default assignment because of an extremely
14412# bizarre bug on SunOS 4.1.3.
14413if $ac_need_defaults; then
14414 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14415 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14416fi
14417
Skip Montanaro6dead952003-09-25 14:50:04 +000014418# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014419# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014420# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014421# Hook for its removal unless debugging.
14422# Note that there is a small window in which the directory will not be cleaned:
14423# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014424$debug ||
14425{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014426 tmp=
14427 trap 'exit_status=$?
14428 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14429' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014430 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014431}
Martin v. Löwis11437992002-04-12 09:54:03 +000014432# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014433
Martin v. Löwis11437992002-04-12 09:54:03 +000014434{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014435 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014436 test -n "$tmp" && test -d "$tmp"
14437} ||
14438{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014439 tmp=./conf$$-$RANDOM
14440 (umask 077 && mkdir "$tmp")
Benjamin Peterson79263252010-10-31 16:50:44 +000014441} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014442
Matthias Kloseb9621712010-04-24 17:59:49 +000014443# Set up the scripts for CONFIG_FILES section.
14444# No need to generate them if there are no CONFIG_FILES.
14445# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014446if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014447
Matthias Kloseb9621712010-04-24 17:59:49 +000014448
14449ac_cr=`echo X | tr X '\015'`
14450# On cygwin, bash can eat \r inside `` if the user requested igncr.
14451# But we know of no other shell where ac_cr would be empty at this
14452# point, so we can use a bashism as a fallback.
14453if test "x$ac_cr" = x; then
14454 eval ac_cr=\$\'\\r\'
14455fi
14456ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14457if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Benjamin Peterson79263252010-10-31 16:50:44 +000014458 ac_cs_awk_cr='\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014459else
14460 ac_cs_awk_cr=$ac_cr
14461fi
14462
14463echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014464_ACEOF
14465
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014466
Matthias Kloseb9621712010-04-24 17:59:49 +000014467{
14468 echo "cat >conf$$subs.awk <<_ACEOF" &&
14469 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14470 echo "_ACEOF"
14471} >conf$$subs.sh ||
Benjamin Peterson79263252010-10-31 16:50:44 +000014472 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14473ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014474ac_delim='%!_!# '
14475for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014476 . ./conf$$subs.sh ||
Benjamin Peterson79263252010-10-31 16:50:44 +000014477 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014478
Matthias Kloseb9621712010-04-24 17:59:49 +000014479 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14480 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014481 break
14482 elif $ac_last_try; then
Benjamin Peterson79263252010-10-31 16:50:44 +000014483 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014484 else
14485 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014486 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014487done
Matthias Kloseb9621712010-04-24 17:59:49 +000014488rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014489
Matthias Kloseb9621712010-04-24 17:59:49 +000014490cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14491cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014492_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014493sed -n '
14494h
14495s/^/S["/; s/!.*/"]=/
14496p
14497g
14498s/^[^!]*!//
14499:repl
14500t repl
14501s/'"$ac_delim"'$//
14502t delim
14503:nl
14504h
14505s/\(.\{148\}\)..*/\1/
14506t more1
14507s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14508p
14509n
14510b repl
14511:more1
14512s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14513p
14514g
14515s/.\{148\}//
14516t nl
14517:delim
14518h
14519s/\(.\{148\}\)..*/\1/
14520t more2
14521s/["\\]/\\&/g; s/^/"/; s/$/"/
14522p
14523b
14524:more2
14525s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14526p
14527g
14528s/.\{148\}//
14529t delim
14530' <conf$$subs.awk | sed '
14531/^[^""]/{
14532 N
14533 s/\n//
14534}
14535' >>$CONFIG_STATUS || ac_write_fail=1
14536rm -f conf$$subs.awk
14537cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14538_ACAWK
14539cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14540 for (key in S) S_is_set[key] = 1
14541 FS = ""
14542
14543}
14544{
14545 line = $ 0
14546 nfields = split(line, field, "@")
14547 substed = 0
14548 len = length(field[1])
14549 for (i = 2; i < nfields; i++) {
14550 key = field[i]
14551 keylen = length(key)
14552 if (S_is_set[key]) {
14553 value = S[key]
14554 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14555 len += length(value) + length(field[++i])
14556 substed = 1
14557 } else
14558 len += 1 + keylen
14559 }
14560
14561 print line
14562}
14563
14564_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014565_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014566cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14567if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14568 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14569else
14570 cat
14571fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
Benjamin Peterson79263252010-10-31 16:50:44 +000014572 || as_fn_error "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014573_ACEOF
14574
Benjamin Peterson79263252010-10-31 16:50:44 +000014575# VPATH may cause trouble with some makes, so we remove $(srcdir),
14576# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014577# trailing colons and then remove the whole line if VPATH becomes empty
14578# (actually we leave an empty line to preserve line numbers).
14579if test "x$srcdir" = x.; then
Benjamin Peterson79263252010-10-31 16:50:44 +000014580 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14581s/:*\$(srcdir):*/:/
14582s/:*\${srcdir}:*/:/
14583s/:*@srcdir@:*/:/
14584s/^\([^=]*=[ ]*\):*/\1/
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014585s/:*$//
14586s/^[^=]*=[ ]*$//
14587}'
14588fi
14589
Matthias Kloseb9621712010-04-24 17:59:49 +000014590cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014591fi # test -n "$CONFIG_FILES"
14592
Matthias Kloseb9621712010-04-24 17:59:49 +000014593# Set up the scripts for CONFIG_HEADERS section.
14594# No need to generate them if there are no CONFIG_HEADERS.
14595# This happens for instance with `./config.status Makefile'.
14596if test -n "$CONFIG_HEADERS"; then
14597cat >"$tmp/defines.awk" <<\_ACAWK ||
14598BEGIN {
14599_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014600
Matthias Kloseb9621712010-04-24 17:59:49 +000014601# Transform confdefs.h into an awk script `defines.awk', embedded as
14602# here-document in config.status, that substitutes the proper values into
14603# config.h.in to produce config.h.
14604
14605# Create a delimiter string that does not exist in confdefs.h, to ease
14606# handling of long lines.
14607ac_delim='%!_!# '
14608for ac_last_try in false false :; do
14609 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14610 if test -z "$ac_t"; then
14611 break
14612 elif $ac_last_try; then
Benjamin Peterson79263252010-10-31 16:50:44 +000014613 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014614 else
14615 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14616 fi
14617done
14618
14619# For the awk script, D is an array of macro values keyed by name,
14620# likewise P contains macro parameters if any. Preserve backslash
14621# newline sequences.
14622
14623ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14624sed -n '
14625s/.\{148\}/&'"$ac_delim"'/g
14626t rset
14627:rset
14628s/^[ ]*#[ ]*define[ ][ ]*/ /
14629t def
14630d
14631:def
14632s/\\$//
14633t bsnl
14634s/["\\]/\\&/g
14635s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14636D["\1"]=" \3"/p
14637s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14638d
14639:bsnl
14640s/["\\]/\\&/g
14641s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14642D["\1"]=" \3\\\\\\n"\\/p
14643t cont
14644s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14645t cont
14646d
14647:cont
14648n
14649s/.\{148\}/&'"$ac_delim"'/g
14650t clear
14651:clear
14652s/\\$//
14653t bsnlc
14654s/["\\]/\\&/g; s/^/"/; s/$/"/p
14655d
14656:bsnlc
14657s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14658b cont
14659' <confdefs.h | sed '
14660s/'"$ac_delim"'/"\\\
14661"/g' >>$CONFIG_STATUS || ac_write_fail=1
14662
14663cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14664 for (key in D) D_is_set[key] = 1
14665 FS = ""
14666}
14667/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14668 line = \$ 0
14669 split(line, arg, " ")
14670 if (arg[1] == "#") {
14671 defundef = arg[2]
14672 mac1 = arg[3]
14673 } else {
14674 defundef = substr(arg[1], 2)
14675 mac1 = arg[2]
14676 }
14677 split(mac1, mac2, "(") #)
14678 macro = mac2[1]
14679 prefix = substr(line, 1, index(line, defundef) - 1)
14680 if (D_is_set[macro]) {
14681 # Preserve the white space surrounding the "#".
14682 print prefix "define", macro P[macro] D[macro]
14683 next
14684 } else {
14685 # Replace #undef with comments. This is necessary, for example,
14686 # in the case of _POSIX_SOURCE, which is predefined and required
14687 # on some systems where configure will not decide to define it.
14688 if (defundef == "undef") {
14689 print "/*", prefix defundef, macro, "*/"
14690 next
14691 }
14692 }
14693}
14694{ print }
14695_ACAWK
14696_ACEOF
14697cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Benjamin Peterson79263252010-10-31 16:50:44 +000014698 as_fn_error "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014699fi # test -n "$CONFIG_HEADERS"
14700
14701
14702eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14703shift
14704for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014705do
14706 case $ac_tag in
14707 :[FHLC]) ac_mode=$ac_tag; continue;;
14708 esac
14709 case $ac_mode$ac_tag in
14710 :[FHL]*:*);;
Benjamin Peterson79263252010-10-31 16:50:44 +000014711 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014712 :[FH]-) ac_tag=-:-;;
14713 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14714 esac
14715 ac_save_IFS=$IFS
14716 IFS=:
14717 set x $ac_tag
14718 IFS=$ac_save_IFS
14719 shift
14720 ac_file=$1
14721 shift
14722
14723 case $ac_mode in
14724 :L) ac_source=$1;;
14725 :[FH])
14726 ac_file_inputs=
14727 for ac_f
14728 do
14729 case $ac_f in
14730 -) ac_f="$tmp/stdin";;
14731 *) # Look for the file first in the build tree, then in the source tree
14732 # (if the path is not absolute). The absolute path cannot be DOS-style,
14733 # because $ac_f cannot contain `:'.
14734 test -f "$ac_f" ||
14735 case $ac_f in
14736 [\\/$]*) false;;
14737 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14738 esac ||
Benjamin Peterson79263252010-10-31 16:50:44 +000014739 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014740 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014741 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14742 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014743 done
14744
14745 # Let's still pretend it is `configure' which instantiates (i.e., don't
14746 # use $as_me), people would be surprised to read:
14747 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014748 configure_input='Generated from '`
14749 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14750 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014751 if test x"$ac_file" != x-; then
14752 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014753 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14754$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014755 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014756 # Neutralize special characters interpreted by sed in replacement strings.
14757 case $configure_input in #(
14758 *\&* | *\|* | *\\* )
14759 ac_sed_conf_input=`$as_echo "$configure_input" |
14760 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14761 *) ac_sed_conf_input=$configure_input;;
14762 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014763
14764 case $ac_tag in
Matthias Kloseb9621712010-04-24 17:59:49 +000014765 *:-:* | *:-) cat >"$tmp/stdin" \
Benjamin Peterson79263252010-10-31 16:50:44 +000014766 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014767 esac
14768 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014769 esac
14770
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014771 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014772$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014773 X"$ac_file" : 'X\(//\)[^/]' \| \
14774 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014775 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014776$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014777 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14778 s//\1/
14779 q
14780 }
14781 /^X\(\/\/\)[^/].*/{
14782 s//\1/
14783 q
14784 }
14785 /^X\(\/\/\)$/{
14786 s//\1/
14787 q
14788 }
14789 /^X\(\/\).*/{
14790 s//\1/
14791 q
14792 }
14793 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014794 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014795 ac_builddir=.
14796
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014797case "$ac_dir" in
14798.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14799*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014800 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014801 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014802 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014803 case $ac_top_builddir_sub in
14804 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14805 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14806 esac ;;
14807esac
14808ac_abs_top_builddir=$ac_pwd
14809ac_abs_builddir=$ac_pwd$ac_dir_suffix
14810# for backward compatibility:
14811ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014812
14813case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014814 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014815 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014816 ac_top_srcdir=$ac_top_builddir_sub
14817 ac_abs_top_srcdir=$ac_pwd ;;
14818 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014819 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014820 ac_top_srcdir=$srcdir
14821 ac_abs_top_srcdir=$srcdir ;;
14822 *) # Relative name.
14823 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14824 ac_top_srcdir=$ac_top_build_prefix$srcdir
14825 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014826esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014827ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014828
Martin v. Löwis11437992002-04-12 09:54:03 +000014829
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014830 case $ac_mode in
14831 :F)
14832 #
14833 # CONFIG_FILE
14834 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014835
14836 case $INSTALL in
14837 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014838 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014839 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014840_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014841
Matthias Kloseb9621712010-04-24 17:59:49 +000014842cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014843# If the template does not know about datarootdir, expand it.
14844# FIXME: This hack should be removed a few years after 2.60.
14845ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014846ac_sed_dataroot='
14847/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014848 p
14849 q
14850}
14851/@datadir@/p
14852/@docdir@/p
14853/@infodir@/p
14854/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014855/@mandir@/p'
14856case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014857*datarootdir*) ac_datarootdir_seen=yes;;
14858*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014859 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14860$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014862cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014863 ac_datarootdir_hack='
14864 s&@datadir@&$datadir&g
14865 s&@docdir@&$docdir&g
14866 s&@infodir@&$infodir&g
14867 s&@localedir@&$localedir&g
14868 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000014869 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014870esac
14871_ACEOF
14872
14873# Neutralize VPATH when `$srcdir' = `.'.
14874# Shell code in configure.ac might set extrasub.
14875# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000014876cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14877ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014878$extrasub
14879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014880cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014881:t
14882/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000014883s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014884s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000014885s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014886s&@srcdir@&$ac_srcdir&;t t
14887s&@abs_srcdir@&$ac_abs_srcdir&;t t
14888s&@top_srcdir@&$ac_top_srcdir&;t t
14889s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14890s&@builddir@&$ac_builddir&;t t
14891s&@abs_builddir@&$ac_abs_builddir&;t t
14892s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14893s&@INSTALL@&$ac_INSTALL&;t t
14894$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000014895"
14896eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
Benjamin Peterson79263252010-10-31 16:50:44 +000014897 || as_fn_error "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014898
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014899test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14900 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14901 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014902 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Benjamin Peterson79263252010-10-31 16:50:44 +000014903which seems to be undefined. Please make sure it is defined." >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014904$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Benjamin Peterson79263252010-10-31 16:50:44 +000014905which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014906
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014907 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000014908 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +000014909 -) cat "$tmp/out" && rm -f "$tmp/out";;
14910 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
14911 esac \
Benjamin Peterson79263252010-10-31 16:50:44 +000014912 || as_fn_error "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014913 ;;
14914 :H)
14915 #
14916 # CONFIG_HEADER
14917 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014918 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014919 {
14920 $as_echo "/* $configure_input */" \
14921 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14922 } >"$tmp/config.h" \
Benjamin Peterson79263252010-10-31 16:50:44 +000014923 || as_fn_error "could not create $ac_file" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014924 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
14925 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14926$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014927 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014928 rm -f "$ac_file"
14929 mv "$tmp/config.h" "$ac_file" \
Benjamin Peterson79263252010-10-31 16:50:44 +000014930 || as_fn_error "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014931 fi
14932 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014933 $as_echo "/* $configure_input */" \
14934 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
Benjamin Peterson79263252010-10-31 16:50:44 +000014935 || as_fn_error "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014936 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014937 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014938
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014939
14940 esac
14941
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014942
14943 case $ac_file$ac_mode in
14944 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
14945
14946 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014947done # for ac_tag
14948
Guido van Rossum627b2d71993-12-24 10:39:16 +000014949
Matthias Kloseb9621712010-04-24 17:59:49 +000014950as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000014951_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014952ac_clean_files=$ac_clean_files_save
14953
Matthias Kloseb9621712010-04-24 17:59:49 +000014954test $ac_write_fail = 0 ||
Benjamin Peterson79263252010-10-31 16:50:44 +000014955 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014956
Martin v. Löwis11437992002-04-12 09:54:03 +000014957
14958# configure is writing to config.log, and then calls config.status.
14959# config.status does its own redirection, appending to config.log.
14960# Unfortunately, on DOS this fails, as config.log is still kept open
14961# by configure, so config.status won't be able to write to it; its
14962# output is simply discarded. So we exec the FD to /dev/null,
14963# effectively closing config.log, so it can be properly (re)opened and
14964# appended to by config.status. When coming back to configure, we
14965# need to make the FD available again.
14966if test "$no_create" != yes; then
14967 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000014968 ac_config_status_args=
14969 test "$silent" = yes &&
14970 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000014971 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000014972 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000014973 exec 5>>config.log
14974 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14975 # would make configure fail if this is the last instruction.
Benjamin Peterson79263252010-10-31 16:50:44 +000014976 $ac_cs_success || as_fn_exit $?
Matthias Kloseb9621712010-04-24 17:59:49 +000014977fi
14978if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
14979 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
14980$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014981fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000014982
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014983
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014984echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014985if test ! -f Modules/Setup
14986then
14987 cp $srcdir/Modules/Setup.dist Modules/Setup
14988fi
14989
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014990echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014991if test ! -f Modules/Setup.local
14992then
14993 echo "# Edit this file for local setup changes" >Modules/Setup.local
14994fi
14995
14996echo "creating Makefile"
14997$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
14998 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000014999 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015000mv config.c Modules