blob: 77b982ec551a99c8f794845294829961f243344d [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Benjamin Peterson79263252010-10-31 16:50:44 +00002# From configure.in Revision: 85697 .
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
742with_dbmliborder
743with_signal_module
744with_dec_threads
745with_threads
746with_thread
747enable_ipv6
748with_doc_strings
749with_tsc
750with_pymalloc
751with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000752with_fpectl
753with_libm
754with_libc
755enable_big_digits
756with_wide_unicode
757with_computed_gotos
758'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000759 ac_precious_vars='build_alias
760host_alias
761target_alias
762CC
763CFLAGS
764LDFLAGS
765LIBS
766CPPFLAGS
767CPP'
768
Guido van Rossum627b2d71993-12-24 10:39:16 +0000769
Guido van Rossum7f43da71994-08-01 12:15:30 +0000770# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000771ac_init_help=
772ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000773ac_unrecognized_opts=
774ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000775# The variables have the same names as the options, with
776# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000777cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000778exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000779no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000780no_recursion=
781prefix=NONE
782program_prefix=NONE
783program_suffix=NONE
784program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000785silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000786site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000787srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000788verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000789x_includes=NONE
790x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000791
792# Installation directory options.
793# These are left unexpanded so users can "make install exec_prefix=/foo"
794# and all the variables that are supposed to be based on exec_prefix
795# by default will actually change.
796# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000797# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000798bindir='${exec_prefix}/bin'
799sbindir='${exec_prefix}/sbin'
800libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000801datarootdir='${prefix}/share'
802datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000803sysconfdir='${prefix}/etc'
804sharedstatedir='${prefix}/com'
805localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000806includedir='${prefix}/include'
807oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000808docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
809infodir='${datarootdir}/info'
810htmldir='${docdir}'
811dvidir='${docdir}'
812pdfdir='${docdir}'
813psdir='${docdir}'
814libdir='${exec_prefix}/lib'
815localedir='${datarootdir}/locale'
816mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000817
Guido van Rossum7f43da71994-08-01 12:15:30 +0000818ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000819ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000820for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000821do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000822 # If the previous option needs an argument, assign it.
823 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000824 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000825 ac_prev=
826 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000827 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000828
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000829 case $ac_option in
Benjamin Peterson79263252010-10-31 16:50:44 +0000830 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
831 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000832 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000833
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000834 # Accept the important Cygnus configure options, so we can diagnose typos.
835
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000836 case $ac_dashdash$ac_option in
837 --)
838 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000840 -bindir | --bindir | --bindi | --bind | --bin | --bi)
841 ac_prev=bindir ;;
842 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000843 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000844
845 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000846 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000847 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000848 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000850 -cache-file | --cache-file | --cache-fil | --cache-fi \
851 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
852 ac_prev=cache_file ;;
853 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
854 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000855 cache_file=$ac_optarg ;;
856
857 --config-cache | -C)
858 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000859
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000861 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000863 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000864
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000865 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
866 | --dataroo | --dataro | --datar)
867 ac_prev=datarootdir ;;
868 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
869 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
870 datarootdir=$ac_optarg ;;
871
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000873 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000875 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson79263252010-10-31 16:50:44 +0000876 as_fn_error "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000877 ac_useropt_orig=$ac_useropt
878 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
879 case $ac_user_opts in
880 *"
881"enable_$ac_useropt"
882"*) ;;
883 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
884 ac_unrecognized_sep=', ';;
885 esac
886 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000887
888 -docdir | --docdir | --docdi | --doc | --do)
889 ac_prev=docdir ;;
890 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
891 docdir=$ac_optarg ;;
892
893 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
894 ac_prev=dvidir ;;
895 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
896 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897
898 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000899 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000900 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000901 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson79263252010-10-31 16:50:44 +0000902 as_fn_error "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000903 ac_useropt_orig=$ac_useropt
904 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
905 case $ac_user_opts in
906 *"
907"enable_$ac_useropt"
908"*) ;;
909 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
910 ac_unrecognized_sep=', ';;
911 esac
912 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
915 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
916 | --exec | --exe | --ex)
917 ac_prev=exec_prefix ;;
918 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
919 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
920 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922
923 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000924 # Obsolete; use --with-gas.
925 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000926
Martin v. Löwis11437992002-04-12 09:54:03 +0000927 -help | --help | --hel | --he | -h)
928 ac_init_help=long ;;
929 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
930 ac_init_help=recursive ;;
931 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
932 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933
934 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000936 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000938
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000939 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
940 ac_prev=htmldir ;;
941 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
942 | --ht=*)
943 htmldir=$ac_optarg ;;
944
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000945 -includedir | --includedir | --includedi | --included | --include \
946 | --includ | --inclu | --incl | --inc)
947 ac_prev=includedir ;;
948 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
949 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951
952 -infodir | --infodir | --infodi | --infod | --info | --inf)
953 ac_prev=infodir ;;
954 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000955 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000956
957 -libdir | --libdir | --libdi | --libd)
958 ac_prev=libdir ;;
959 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000960 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000961
962 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
963 | --libexe | --libex | --libe)
964 ac_prev=libexecdir ;;
965 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
966 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000967 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000968
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000969 -localedir | --localedir | --localedi | --localed | --locale)
970 ac_prev=localedir ;;
971 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
972 localedir=$ac_optarg ;;
973
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000974 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000975 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000976 ac_prev=localstatedir ;;
977 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000978 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000979 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000980
981 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
982 ac_prev=mandir ;;
983 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000984 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000985
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000987 # Obsolete; use --without-fp.
988 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989
990 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000991 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992 no_create=yes ;;
993
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000994 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
995 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
996 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000997
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000998 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
999 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1000 | --oldin | --oldi | --old | --ol | --o)
1001 ac_prev=oldincludedir ;;
1002 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1003 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1004 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001006
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1008 ac_prev=prefix ;;
1009 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001010 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011
1012 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1013 | --program-pre | --program-pr | --program-p)
1014 ac_prev=program_prefix ;;
1015 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1016 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001017 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
1019 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1020 | --program-suf | --program-su | --program-s)
1021 ac_prev=program_suffix ;;
1022 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1023 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025
1026 -program-transform-name | --program-transform-name \
1027 | --program-transform-nam | --program-transform-na \
1028 | --program-transform-n | --program-transform- \
1029 | --program-transform | --program-transfor \
1030 | --program-transfo | --program-transf \
1031 | --program-trans | --program-tran \
1032 | --progr-tra | --program-tr | --program-t)
1033 ac_prev=program_transform_name ;;
1034 -program-transform-name=* | --program-transform-name=* \
1035 | --program-transform-nam=* | --program-transform-na=* \
1036 | --program-transform-n=* | --program-transform-=* \
1037 | --program-transform=* | --program-transfor=* \
1038 | --program-transfo=* | --program-transf=* \
1039 | --program-trans=* | --program-tran=* \
1040 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001042
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001043 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1044 ac_prev=pdfdir ;;
1045 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1046 pdfdir=$ac_optarg ;;
1047
1048 -psdir | --psdir | --psdi | --psd | --ps)
1049 ac_prev=psdir ;;
1050 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1051 psdir=$ac_optarg ;;
1052
Guido van Rossum7f43da71994-08-01 12:15:30 +00001053 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1054 | -silent | --silent | --silen | --sile | --sil)
1055 silent=yes ;;
1056
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1058 ac_prev=sbindir ;;
1059 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1060 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001062
1063 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1064 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1065 | --sharedst | --shareds | --shared | --share | --shar \
1066 | --sha | --sh)
1067 ac_prev=sharedstatedir ;;
1068 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1069 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1070 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1071 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001073
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001074 -site | --site | --sit)
1075 ac_prev=site ;;
1076 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001078
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1080 ac_prev=srcdir ;;
1081 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001084 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1085 | --syscon | --sysco | --sysc | --sys | --sy)
1086 ac_prev=sysconfdir ;;
1087 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1088 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001089 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001090
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001094 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095
1096 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1097 verbose=yes ;;
1098
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 -version | --version | --versio | --versi | --vers | -V)
1100 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101
1102 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001103 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001104 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001105 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson79263252010-10-31 16:50:44 +00001106 as_fn_error "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001107 ac_useropt_orig=$ac_useropt
1108 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1109 case $ac_user_opts in
1110 *"
1111"with_$ac_useropt"
1112"*) ;;
1113 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1114 ac_unrecognized_sep=', ';;
1115 esac
1116 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001117
1118 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001119 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001120 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001121 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson79263252010-10-31 16:50:44 +00001122 as_fn_error "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001123 ac_useropt_orig=$ac_useropt
1124 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1125 case $ac_user_opts in
1126 *"
1127"with_$ac_useropt"
1128"*) ;;
1129 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1130 ac_unrecognized_sep=', ';;
1131 esac
1132 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001134 --x)
1135 # Obsolete; use --with-x.
1136 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137
1138 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1139 | --x-incl | --x-inc | --x-in | --x-i)
1140 ac_prev=x_includes ;;
1141 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1142 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144
1145 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1146 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1147 ac_prev=x_libraries ;;
1148 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1149 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001150 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001151
Benjamin Peterson79263252010-10-31 16:50:44 +00001152 -*) as_fn_error "unrecognized option: \`$ac_option'
1153Try \`$0 --help' for more information."
Guido van Rossum7f43da71994-08-01 12:15:30 +00001154 ;;
1155
Martin v. Löwis11437992002-04-12 09:54:03 +00001156 *=*)
1157 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1158 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001159 case $ac_envvar in #(
1160 '' | [0-9]* | *[!_$as_cr_alnum]* )
Benjamin Peterson79263252010-10-31 16:50:44 +00001161 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001162 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001163 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 export $ac_envvar ;;
1165
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001166 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001167 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001168 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001170 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001172 ;;
1173
1174 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001175done
1176
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001178 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Benjamin Peterson79263252010-10-31 16:50:44 +00001179 as_fn_error "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001180fi
1181
Matthias Kloseb9621712010-04-24 17:59:49 +00001182if test -n "$ac_unrecognized_opts"; then
1183 case $enable_option_checking in
1184 no) ;;
Benjamin Peterson79263252010-10-31 16:50:44 +00001185 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001186 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1187 esac
1188fi
1189
1190# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001191for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1192 datadir sysconfdir sharedstatedir localstatedir includedir \
1193 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1194 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001195do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001196 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001197 # Remove trailing slashes.
1198 case $ac_val in
1199 */ )
1200 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1201 eval $ac_var=\$ac_val;;
1202 esac
1203 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001204 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001205 [\\/$]* | ?:[\\/]* ) continue;;
1206 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001207 esac
Benjamin Peterson79263252010-10-31 16:50:44 +00001208 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001209done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001210
Martin v. Löwis11437992002-04-12 09:54:03 +00001211# There might be people who depend on the old broken behavior: `$host'
1212# used to hold the argument of --host etc.
1213# FIXME: To remove some day.
1214build=$build_alias
1215host=$host_alias
1216target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001217
Martin v. Löwis11437992002-04-12 09:54:03 +00001218# FIXME: To remove some day.
1219if test "x$host_alias" != x; then
1220 if test "x$build_alias" = x; then
1221 cross_compiling=maybe
Benjamin Peterson79263252010-10-31 16:50:44 +00001222 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1223 If a cross compiler is detected then cross compile mode will be used." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001224 elif test "x$build_alias" != "x$host_alias"; then
1225 cross_compiling=yes
1226 fi
1227fi
1228
1229ac_tool_prefix=
1230test -n "$host_alias" && ac_tool_prefix=$host_alias-
1231
1232test "$silent" = yes && exec 6>/dev/null
1233
Guido van Rossum627b2d71993-12-24 10:39:16 +00001234
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001235ac_pwd=`pwd` && test -n "$ac_pwd" &&
1236ac_ls_di=`ls -di .` &&
1237ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Benjamin Peterson79263252010-10-31 16:50:44 +00001238 as_fn_error "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001239test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Benjamin Peterson79263252010-10-31 16:50:44 +00001240 as_fn_error "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001241
1242
Guido van Rossum627b2d71993-12-24 10:39:16 +00001243# Find the source files, if location was not specified.
1244if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001245 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001246 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001247 ac_confdir=`$as_dirname -- "$as_myself" ||
1248$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1249 X"$as_myself" : 'X\(//\)[^/]' \| \
1250 X"$as_myself" : 'X\(//\)$' \| \
1251 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1252$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001253 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1254 s//\1/
1255 q
1256 }
1257 /^X\(\/\/\)[^/].*/{
1258 s//\1/
1259 q
1260 }
1261 /^X\(\/\/\)$/{
1262 s//\1/
1263 q
1264 }
1265 /^X\(\/\).*/{
1266 s//\1/
1267 q
1268 }
1269 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001270 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001271 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001272 srcdir=..
1273 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001274else
1275 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001276fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001277if test ! -r "$srcdir/$ac_unique_file"; then
1278 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Benjamin Peterson79263252010-10-31 16:50:44 +00001279 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001280fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001281ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1282ac_abs_confdir=`(
Benjamin Peterson79263252010-10-31 16:50:44 +00001283 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001284 pwd)`
1285# When building in place, set srcdir=.
1286if test "$ac_abs_confdir" = "$ac_pwd"; then
1287 srcdir=.
1288fi
1289# Remove unnecessary trailing slashes from srcdir.
1290# Double slashes in file names in object file debugging info
1291# mess up M-x gdb in Emacs.
1292case $srcdir in
1293*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1294esac
1295for ac_var in $ac_precious_vars; do
1296 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1297 eval ac_env_${ac_var}_value=\$${ac_var}
1298 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1299 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1300done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001301
Martin v. Löwis11437992002-04-12 09:54:03 +00001302#
1303# Report the --help message.
1304#
1305if test "$ac_init_help" = "long"; then
1306 # Omit some internal or obsolete options to make the list less imposing.
1307 # This message is too long to be a string in the A/UX 3.1 sh.
1308 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001309\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001310
1311Usage: $0 [OPTION]... [VAR=VALUE]...
1312
1313To assign environment variables (e.g., CC, CFLAGS...), specify them as
1314VAR=VALUE. See below for descriptions of some of the useful variables.
1315
1316Defaults for the options are specified in brackets.
1317
1318Configuration:
1319 -h, --help display this help and exit
1320 --help=short display options specific to this package
1321 --help=recursive display the short help of all the included packages
1322 -V, --version display version information and exit
Benjamin Peterson79263252010-10-31 16:50:44 +00001323 -q, --quiet, --silent do not print \`checking...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001324 --cache-file=FILE cache test results in FILE [disabled]
1325 -C, --config-cache alias for \`--cache-file=config.cache'
1326 -n, --no-create do not create output files
1327 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1328
Martin v. Löwis11437992002-04-12 09:54:03 +00001329Installation directories:
1330 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001331 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001332 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001333 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001334
1335By default, \`make install' will install all the files in
1336\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1337an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1338for instance \`--prefix=\$HOME'.
1339
1340For better control, use the options below.
1341
1342Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001343 --bindir=DIR user executables [EPREFIX/bin]
1344 --sbindir=DIR system admin executables [EPREFIX/sbin]
1345 --libexecdir=DIR program executables [EPREFIX/libexec]
1346 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1347 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1348 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1349 --libdir=DIR object code libraries [EPREFIX/lib]
1350 --includedir=DIR C header files [PREFIX/include]
1351 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1352 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1353 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1354 --infodir=DIR info documentation [DATAROOTDIR/info]
1355 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1356 --mandir=DIR man documentation [DATAROOTDIR/man]
1357 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1358 --htmldir=DIR html documentation [DOCDIR]
1359 --dvidir=DIR dvi documentation [DOCDIR]
1360 --pdfdir=DIR pdf documentation [DOCDIR]
1361 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001362_ACEOF
1363
1364 cat <<\_ACEOF
1365_ACEOF
1366fi
1367
1368if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001369 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001370 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001371 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001372 cat <<\_ACEOF
1373
1374Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001375 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001376 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1377 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001378 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001379 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001380 --enable-framework[=INSTALLDIR]
1381 Build (MacOSX|Darwin) framework
1382 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001383 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001384 --enable-ipv6 Enable ipv6 (with ipv4) support
1385 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001386 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001387 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001388
1389Optional Packages:
1390 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1391 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001392 --with-universal-archs=ARCH
1393 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001394 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001395 --with-framework-name=FRAMEWORK
1396 specify an alternate name of the framework built
1397 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001398 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001399 --with-cxx-main=<compiler>
1400 compile main() and link python executable with C++
1401 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001402 --with-suffix=.exe set executable suffix
1403 --with-pydebug build with Py_DEBUG defined
1404 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001405 --with-system-expat build pyexpat module using an installed expat
1406 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001407 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001408 --with-dbmliborder=db1:db2:...
1409 order to check db backends for dbm. Valid value is a
1410 colon separated string with the backend names
1411 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001412 --with-signal-module disable/enable signal module
1413 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1414 --with(out)-threads[=DIRECTORY]
1415 disable/enable thread support
1416 --with(out)-thread[=DIRECTORY]
1417 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001418 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001419 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001420 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001421 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001422 --with-fpectl enable SIGFPE catching
1423 --with-libm=STRING math library
1424 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001425 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001426 --with(out)-computed-gotos
1427 Use computed gotos in evaluation loop (enabled by
1428 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001429
1430Some influential environment variables:
1431 CC C compiler command
1432 CFLAGS C compiler flags
1433 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1434 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001435 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001436 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001437 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001438 CPP C preprocessor
1439
1440Use these variables to override the choices made by `configure' or to help
1441it to find libraries and programs with nonstandard names/locations.
1442
Georg Brandle2e15612009-05-20 18:25:10 +00001443Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001444_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001445ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001446fi
1447
1448if test "$ac_init_help" = "recursive"; then
1449 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001450 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001451 test -d "$ac_dir" ||
1452 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1453 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001454 ac_builddir=.
1455
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001456case "$ac_dir" in
1457.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1458*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001459 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001460 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001461 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001462 case $ac_top_builddir_sub in
1463 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1464 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1465 esac ;;
1466esac
1467ac_abs_top_builddir=$ac_pwd
1468ac_abs_builddir=$ac_pwd$ac_dir_suffix
1469# for backward compatibility:
1470ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001471
1472case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001473 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001474 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001475 ac_top_srcdir=$ac_top_builddir_sub
1476 ac_abs_top_srcdir=$ac_pwd ;;
1477 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001478 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001479 ac_top_srcdir=$srcdir
1480 ac_abs_top_srcdir=$srcdir ;;
1481 *) # Relative name.
1482 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1483 ac_top_srcdir=$ac_top_build_prefix$srcdir
1484 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001485esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001486ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001487
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001488 cd "$ac_dir" || { ac_status=$?; continue; }
1489 # Check for guested configure.
1490 if test -f "$ac_srcdir/configure.gnu"; then
1491 echo &&
1492 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1493 elif test -f "$ac_srcdir/configure"; then
1494 echo &&
1495 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001496 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001497 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001498 fi || ac_status=$?
1499 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001500 done
1501fi
1502
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001503test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001504if $ac_init_version; then
1505 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001506python configure 3.2
Benjamin Peterson79263252010-10-31 16:50:44 +00001507generated by GNU Autoconf 2.65
Martin v. Löwis11437992002-04-12 09:54:03 +00001508
Benjamin Peterson79263252010-10-31 16:50:44 +00001509Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001510This configure script is free software; the Free Software Foundation
1511gives unlimited permission to copy, distribute and modify it.
1512_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001513 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001514fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001515
1516## ------------------------ ##
1517## Autoconf initialization. ##
1518## ------------------------ ##
1519
1520# ac_fn_c_try_compile LINENO
1521# --------------------------
1522# Try to compile conftest.$ac_ext, and return whether this succeeded.
1523ac_fn_c_try_compile ()
1524{
1525 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1526 rm -f conftest.$ac_objext
1527 if { { ac_try="$ac_compile"
1528case "(($ac_try" in
1529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1530 *) ac_try_echo=$ac_try;;
1531esac
1532eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1533$as_echo "$ac_try_echo"; } >&5
1534 (eval "$ac_compile") 2>conftest.err
1535 ac_status=$?
1536 if test -s conftest.err; then
1537 grep -v '^ *+' conftest.err >conftest.er1
1538 cat conftest.er1 >&5
1539 mv -f conftest.er1 conftest.err
1540 fi
1541 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1542 test $ac_status = 0; } && {
1543 test -z "$ac_c_werror_flag" ||
1544 test ! -s conftest.err
1545 } && test -s conftest.$ac_objext; then :
1546 ac_retval=0
1547else
1548 $as_echo "$as_me: failed program was:" >&5
1549sed 's/^/| /' conftest.$ac_ext >&5
1550
1551 ac_retval=1
1552fi
1553 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1554 as_fn_set_status $ac_retval
1555
1556} # ac_fn_c_try_compile
1557
1558# ac_fn_c_try_cpp LINENO
1559# ----------------------
1560# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1561ac_fn_c_try_cpp ()
1562{
1563 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1564 if { { ac_try="$ac_cpp conftest.$ac_ext"
1565case "(($ac_try" in
1566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1567 *) ac_try_echo=$ac_try;;
1568esac
1569eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1570$as_echo "$ac_try_echo"; } >&5
1571 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1572 ac_status=$?
1573 if test -s conftest.err; then
1574 grep -v '^ *+' conftest.err >conftest.er1
1575 cat conftest.er1 >&5
1576 mv -f conftest.er1 conftest.err
1577 fi
1578 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Benjamin Peterson79263252010-10-31 16:50:44 +00001579 test $ac_status = 0; } >/dev/null && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001580 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1581 test ! -s conftest.err
1582 }; then :
1583 ac_retval=0
1584else
1585 $as_echo "$as_me: failed program was:" >&5
1586sed 's/^/| /' conftest.$ac_ext >&5
1587
1588 ac_retval=1
1589fi
1590 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1591 as_fn_set_status $ac_retval
1592
1593} # ac_fn_c_try_cpp
1594
1595# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1596# -------------------------------------------------------
1597# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1598# the include files in INCLUDES and setting the cache variable VAR
1599# accordingly.
1600ac_fn_c_check_header_mongrel ()
1601{
1602 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Benjamin Peterson79263252010-10-31 16:50:44 +00001603 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1605$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +00001606if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001607 $as_echo_n "(cached) " >&6
1608fi
1609eval ac_res=\$$3
1610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1611$as_echo "$ac_res" >&6; }
1612else
1613 # Is the header compilable?
1614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1615$as_echo_n "checking $2 usability... " >&6; }
1616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1617/* end confdefs.h. */
1618$4
1619#include <$2>
1620_ACEOF
1621if ac_fn_c_try_compile "$LINENO"; then :
1622 ac_header_compiler=yes
1623else
1624 ac_header_compiler=no
1625fi
1626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1628$as_echo "$ac_header_compiler" >&6; }
1629
1630# Is the header present?
1631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1632$as_echo_n "checking $2 presence... " >&6; }
1633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1634/* end confdefs.h. */
1635#include <$2>
1636_ACEOF
1637if ac_fn_c_try_cpp "$LINENO"; then :
1638 ac_header_preproc=yes
1639else
1640 ac_header_preproc=no
1641fi
Benjamin Peterson79263252010-10-31 16:50:44 +00001642rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1644$as_echo "$ac_header_preproc" >&6; }
1645
1646# So? What about this header?
1647case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1648 yes:no: )
1649 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1650$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1651 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1652$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1653 ;;
1654 no:yes:* )
1655 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1656$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1657 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1658$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1659 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1660$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1661 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1662$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1663 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1664$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00001665( cat <<\_ASBOX
1666## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001667## Report this to http://bugs.python.org/ ##
Benjamin Peterson79263252010-10-31 16:50:44 +00001668## -------------------------------------- ##
1669_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +00001670 ) | sed "s/^/$as_me: WARNING: /" >&2
1671 ;;
1672esac
1673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1674$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +00001675if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001676 $as_echo_n "(cached) " >&6
1677else
1678 eval "$3=\$ac_header_compiler"
1679fi
1680eval ac_res=\$$3
1681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1682$as_echo "$ac_res" >&6; }
1683fi
1684 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1685
1686} # ac_fn_c_check_header_mongrel
1687
1688# ac_fn_c_try_run LINENO
1689# ----------------------
1690# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1691# that executables *can* be run.
1692ac_fn_c_try_run ()
1693{
1694 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1695 if { { ac_try="$ac_link"
1696case "(($ac_try" in
1697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1698 *) ac_try_echo=$ac_try;;
1699esac
1700eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1701$as_echo "$ac_try_echo"; } >&5
1702 (eval "$ac_link") 2>&5
1703 ac_status=$?
1704 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1705 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1706 { { case "(($ac_try" in
1707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1708 *) ac_try_echo=$ac_try;;
1709esac
1710eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1711$as_echo "$ac_try_echo"; } >&5
1712 (eval "$ac_try") 2>&5
1713 ac_status=$?
1714 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1715 test $ac_status = 0; }; }; then :
1716 ac_retval=0
1717else
1718 $as_echo "$as_me: program exited with status $ac_status" >&5
1719 $as_echo "$as_me: failed program was:" >&5
1720sed 's/^/| /' conftest.$ac_ext >&5
1721
1722 ac_retval=$ac_status
1723fi
1724 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1725 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1726 as_fn_set_status $ac_retval
1727
1728} # ac_fn_c_try_run
1729
1730# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1731# -------------------------------------------------------
1732# Tests whether HEADER exists and can be compiled using the include files in
1733# INCLUDES, setting the cache variable VAR accordingly.
1734ac_fn_c_check_header_compile ()
1735{
1736 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1738$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +00001739if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001740 $as_echo_n "(cached) " >&6
1741else
1742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1743/* end confdefs.h. */
1744$4
1745#include <$2>
1746_ACEOF
1747if ac_fn_c_try_compile "$LINENO"; then :
1748 eval "$3=yes"
1749else
1750 eval "$3=no"
1751fi
1752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1753fi
1754eval ac_res=\$$3
1755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1756$as_echo "$ac_res" >&6; }
1757 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1758
1759} # ac_fn_c_check_header_compile
1760
1761# ac_fn_c_try_link LINENO
1762# -----------------------
1763# Try to link conftest.$ac_ext, and return whether this succeeded.
1764ac_fn_c_try_link ()
1765{
1766 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1767 rm -f conftest.$ac_objext conftest$ac_exeext
1768 if { { ac_try="$ac_link"
1769case "(($ac_try" in
1770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1771 *) ac_try_echo=$ac_try;;
1772esac
1773eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1774$as_echo "$ac_try_echo"; } >&5
1775 (eval "$ac_link") 2>conftest.err
1776 ac_status=$?
1777 if test -s conftest.err; then
1778 grep -v '^ *+' conftest.err >conftest.er1
1779 cat conftest.er1 >&5
1780 mv -f conftest.er1 conftest.err
1781 fi
1782 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1783 test $ac_status = 0; } && {
1784 test -z "$ac_c_werror_flag" ||
1785 test ! -s conftest.err
1786 } && test -s conftest$ac_exeext && {
1787 test "$cross_compiling" = yes ||
1788 $as_test_x conftest$ac_exeext
1789 }; then :
1790 ac_retval=0
1791else
1792 $as_echo "$as_me: failed program was:" >&5
1793sed 's/^/| /' conftest.$ac_ext >&5
1794
1795 ac_retval=1
1796fi
1797 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1798 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1799 # interfere with the next link command; also delete a directory that is
1800 # left behind by Apple's compiler. We do this before executing the actions.
1801 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1802 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1803 as_fn_set_status $ac_retval
1804
1805} # ac_fn_c_try_link
1806
1807# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1808# -------------------------------------------
1809# Tests whether TYPE exists after having included INCLUDES, setting cache
1810# variable VAR accordingly.
1811ac_fn_c_check_type ()
1812{
1813 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1815$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +00001816if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001817 $as_echo_n "(cached) " >&6
1818else
1819 eval "$3=no"
1820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1821/* end confdefs.h. */
1822$4
1823int
1824main ()
1825{
1826if (sizeof ($2))
1827 return 0;
1828 ;
1829 return 0;
1830}
1831_ACEOF
1832if ac_fn_c_try_compile "$LINENO"; then :
1833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1834/* end confdefs.h. */
1835$4
1836int
1837main ()
1838{
1839if (sizeof (($2)))
1840 return 0;
1841 ;
1842 return 0;
1843}
1844_ACEOF
1845if ac_fn_c_try_compile "$LINENO"; then :
1846
1847else
1848 eval "$3=yes"
1849fi
1850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1851fi
1852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1853fi
1854eval ac_res=\$$3
1855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1856$as_echo "$ac_res" >&6; }
1857 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1858
1859} # ac_fn_c_check_type
1860
1861# ac_fn_c_find_uintX_t LINENO BITS VAR
1862# ------------------------------------
1863# Finds an unsigned integer type with width BITS, setting cache variable VAR
1864# accordingly.
1865ac_fn_c_find_uintX_t ()
1866{
1867 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1869$as_echo_n "checking for uint$2_t... " >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +00001870if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001871 $as_echo_n "(cached) " >&6
1872else
1873 eval "$3=no"
1874 # Order is important - never check a type that is potentially smaller
1875 # than half of the expected target width.
1876 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1877 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1879/* end confdefs.h. */
1880$ac_includes_default
1881int
1882main ()
1883{
1884static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1885test_array [0] = 0
1886
1887 ;
1888 return 0;
1889}
1890_ACEOF
1891if ac_fn_c_try_compile "$LINENO"; then :
1892 case $ac_type in #(
1893 uint$2_t) :
1894 eval "$3=yes" ;; #(
1895 *) :
1896 eval "$3=\$ac_type" ;;
1897esac
1898fi
1899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson79263252010-10-31 16:50:44 +00001900 eval as_val=\$$3
1901 if test "x$as_val" = x""no; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001902
1903else
1904 break
1905fi
1906 done
1907fi
1908eval ac_res=\$$3
1909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1910$as_echo "$ac_res" >&6; }
1911 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1912
1913} # ac_fn_c_find_uintX_t
1914
1915# ac_fn_c_find_intX_t LINENO BITS VAR
1916# -----------------------------------
1917# Finds a signed integer type with width BITS, setting cache variable VAR
1918# accordingly.
1919ac_fn_c_find_intX_t ()
1920{
1921 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1923$as_echo_n "checking for int$2_t... " >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +00001924if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001925 $as_echo_n "(cached) " >&6
1926else
1927 eval "$3=no"
1928 # Order is important - never check a type that is potentially smaller
1929 # than half of the expected target width.
1930 for ac_type in int$2_t 'int' 'long int' \
1931 'long long int' 'short int' 'signed char'; do
1932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1933/* end confdefs.h. */
1934$ac_includes_default
Barry Warsaw278266f2010-10-14 17:38:46 +00001935 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001936int
1937main ()
1938{
Barry Warsaw278266f2010-10-14 17:38:46 +00001939static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001940test_array [0] = 0
1941
1942 ;
1943 return 0;
1944}
1945_ACEOF
1946if ac_fn_c_try_compile "$LINENO"; then :
1947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1948/* end confdefs.h. */
1949$ac_includes_default
Barry Warsaw278266f2010-10-14 17:38:46 +00001950 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001951int
1952main ()
1953{
Barry Warsaw278266f2010-10-14 17:38:46 +00001954static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001955 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1956test_array [0] = 0
1957
1958 ;
1959 return 0;
1960}
1961_ACEOF
1962if ac_fn_c_try_compile "$LINENO"; then :
1963
1964else
1965 case $ac_type in #(
1966 int$2_t) :
1967 eval "$3=yes" ;; #(
1968 *) :
1969 eval "$3=\$ac_type" ;;
1970esac
1971fi
1972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1973fi
1974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson79263252010-10-31 16:50:44 +00001975 eval as_val=\$$3
1976 if test "x$as_val" = x""no; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001977
1978else
1979 break
1980fi
1981 done
1982fi
1983eval ac_res=\$$3
1984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1985$as_echo "$ac_res" >&6; }
1986 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1987
1988} # ac_fn_c_find_intX_t
1989
1990# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1991# --------------------------------------------
1992# Tries to find the compile-time value of EXPR in a program that includes
1993# INCLUDES, setting VAR accordingly. Returns whether the value could be
1994# computed
1995ac_fn_c_compute_int ()
1996{
1997 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1998 if test "$cross_compiling" = yes; then
1999 # Depending upon the size, compute the lo and hi bounds.
2000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2001/* end confdefs.h. */
2002$4
2003int
2004main ()
2005{
2006static int test_array [1 - 2 * !(($2) >= 0)];
2007test_array [0] = 0
2008
2009 ;
2010 return 0;
2011}
2012_ACEOF
2013if ac_fn_c_try_compile "$LINENO"; then :
2014 ac_lo=0 ac_mid=0
2015 while :; do
2016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2017/* end confdefs.h. */
2018$4
2019int
2020main ()
2021{
2022static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2023test_array [0] = 0
2024
2025 ;
2026 return 0;
2027}
2028_ACEOF
2029if ac_fn_c_try_compile "$LINENO"; then :
2030 ac_hi=$ac_mid; break
2031else
2032 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2033 if test $ac_lo -le $ac_mid; then
2034 ac_lo= ac_hi=
2035 break
2036 fi
2037 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2038fi
2039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2040 done
2041else
2042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2043/* end confdefs.h. */
2044$4
2045int
2046main ()
2047{
2048static int test_array [1 - 2 * !(($2) < 0)];
2049test_array [0] = 0
2050
2051 ;
2052 return 0;
2053}
2054_ACEOF
2055if ac_fn_c_try_compile "$LINENO"; then :
2056 ac_hi=-1 ac_mid=-1
2057 while :; do
2058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2059/* end confdefs.h. */
2060$4
2061int
2062main ()
2063{
2064static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2065test_array [0] = 0
2066
2067 ;
2068 return 0;
2069}
2070_ACEOF
2071if ac_fn_c_try_compile "$LINENO"; then :
2072 ac_lo=$ac_mid; break
2073else
2074 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2075 if test $ac_mid -le $ac_hi; then
2076 ac_lo= ac_hi=
2077 break
2078 fi
2079 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2080fi
2081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2082 done
2083else
2084 ac_lo= ac_hi=
2085fi
2086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2087fi
2088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2089# Binary search between lo and hi bounds.
2090while test "x$ac_lo" != "x$ac_hi"; do
2091 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2093/* end confdefs.h. */
2094$4
2095int
2096main ()
2097{
2098static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2099test_array [0] = 0
2100
2101 ;
2102 return 0;
2103}
2104_ACEOF
2105if ac_fn_c_try_compile "$LINENO"; then :
2106 ac_hi=$ac_mid
2107else
2108 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2109fi
2110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2111done
2112case $ac_lo in #((
2113?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2114'') ac_retval=1 ;;
2115esac
2116 else
2117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2118/* end confdefs.h. */
2119$4
2120static long int longval () { return $2; }
2121static unsigned long int ulongval () { return $2; }
2122#include <stdio.h>
2123#include <stdlib.h>
2124int
2125main ()
2126{
2127
2128 FILE *f = fopen ("conftest.val", "w");
2129 if (! f)
2130 return 1;
2131 if (($2) < 0)
2132 {
2133 long int i = longval ();
2134 if (i != ($2))
2135 return 1;
2136 fprintf (f, "%ld", i);
2137 }
2138 else
2139 {
2140 unsigned long int i = ulongval ();
2141 if (i != ($2))
2142 return 1;
2143 fprintf (f, "%lu", i);
2144 }
2145 /* Do not output a trailing newline, as this causes \r\n confusion
2146 on some platforms. */
2147 return ferror (f) || fclose (f) != 0;
2148
2149 ;
2150 return 0;
2151}
2152_ACEOF
2153if ac_fn_c_try_run "$LINENO"; then :
2154 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2155else
2156 ac_retval=1
2157fi
2158rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2159 conftest.$ac_objext conftest.beam conftest.$ac_ext
2160rm -f conftest.val
2161
2162 fi
2163 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2164 as_fn_set_status $ac_retval
2165
2166} # ac_fn_c_compute_int
2167
2168# ac_fn_c_check_func LINENO FUNC VAR
2169# ----------------------------------
2170# Tests whether FUNC exists, setting the cache variable VAR accordingly
2171ac_fn_c_check_func ()
2172{
2173 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2175$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +00002176if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002177 $as_echo_n "(cached) " >&6
2178else
2179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2180/* end confdefs.h. */
2181/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2182 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2183#define $2 innocuous_$2
2184
2185/* System header to define __stub macros and hopefully few prototypes,
2186 which can conflict with char $2 (); below.
2187 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2188 <limits.h> exists even on freestanding compilers. */
2189
2190#ifdef __STDC__
2191# include <limits.h>
2192#else
2193# include <assert.h>
2194#endif
2195
2196#undef $2
2197
2198/* Override any GCC internal prototype to avoid an error.
2199 Use char because int might match the return type of a GCC
2200 builtin and then its argument prototype would still apply. */
2201#ifdef __cplusplus
2202extern "C"
2203#endif
2204char $2 ();
2205/* The GNU C library defines this for functions which it implements
2206 to always fail with ENOSYS. Some functions are actually named
2207 something starting with __ and the normal name is an alias. */
2208#if defined __stub_$2 || defined __stub___$2
2209choke me
2210#endif
2211
2212int
2213main ()
2214{
2215return $2 ();
2216 ;
2217 return 0;
2218}
2219_ACEOF
2220if ac_fn_c_try_link "$LINENO"; then :
2221 eval "$3=yes"
2222else
2223 eval "$3=no"
2224fi
2225rm -f core conftest.err conftest.$ac_objext \
2226 conftest$ac_exeext conftest.$ac_ext
2227fi
2228eval ac_res=\$$3
2229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2230$as_echo "$ac_res" >&6; }
2231 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2232
2233} # ac_fn_c_check_func
2234
2235# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2236# ----------------------------------------------------
2237# Tries to find if the field MEMBER exists in type AGGR, after including
2238# INCLUDES, setting cache variable VAR accordingly.
2239ac_fn_c_check_member ()
2240{
2241 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2243$as_echo_n "checking for $2.$3... " >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +00002244if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002245 $as_echo_n "(cached) " >&6
2246else
2247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2248/* end confdefs.h. */
2249$5
2250int
2251main ()
2252{
2253static $2 ac_aggr;
2254if (ac_aggr.$3)
2255return 0;
2256 ;
2257 return 0;
2258}
2259_ACEOF
2260if ac_fn_c_try_compile "$LINENO"; then :
2261 eval "$4=yes"
2262else
2263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2264/* end confdefs.h. */
2265$5
2266int
2267main ()
2268{
2269static $2 ac_aggr;
2270if (sizeof ac_aggr.$3)
2271return 0;
2272 ;
2273 return 0;
2274}
2275_ACEOF
2276if ac_fn_c_try_compile "$LINENO"; then :
2277 eval "$4=yes"
2278else
2279 eval "$4=no"
2280fi
2281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2282fi
2283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2284fi
2285eval ac_res=\$$4
2286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2287$as_echo "$ac_res" >&6; }
2288 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2289
2290} # ac_fn_c_check_member
2291
Benjamin Peterson79263252010-10-31 16:50:44 +00002292# ac_fn_c_check_decl LINENO SYMBOL VAR
2293# ------------------------------------
2294# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002295ac_fn_c_check_decl ()
2296{
2297 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Benjamin Peterson79263252010-10-31 16:50:44 +00002298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2299$as_echo_n "checking whether $2 is declared... " >&6; }
2300if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002301 $as_echo_n "(cached) " >&6
2302else
2303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2304/* end confdefs.h. */
2305$4
2306int
2307main ()
2308{
Benjamin Peterson79263252010-10-31 16:50:44 +00002309#ifndef $2
2310 (void) $2;
Matthias Kloseb9621712010-04-24 17:59:49 +00002311#endif
2312
2313 ;
2314 return 0;
2315}
2316_ACEOF
2317if ac_fn_c_try_compile "$LINENO"; then :
2318 eval "$3=yes"
2319else
2320 eval "$3=no"
2321fi
2322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2323fi
2324eval ac_res=\$$3
2325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2326$as_echo "$ac_res" >&6; }
2327 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2328
2329} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002330cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002331This file contains any messages produced by compilers while
2332running configure, to aid debugging if configure makes a mistake.
2333
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002334It was created by python $as_me 3.2, which was
Benjamin Peterson79263252010-10-31 16:50:44 +00002335generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002336
2337 $ $0 $@
2338
2339_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002340exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002341{
2342cat <<_ASUNAME
2343## --------- ##
2344## Platform. ##
2345## --------- ##
2346
2347hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2348uname -m = `(uname -m) 2>/dev/null || echo unknown`
2349uname -r = `(uname -r) 2>/dev/null || echo unknown`
2350uname -s = `(uname -s) 2>/dev/null || echo unknown`
2351uname -v = `(uname -v) 2>/dev/null || echo unknown`
2352
2353/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2354/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2355
2356/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2357/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2358/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002359/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002360/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2361/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2362/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2363
2364_ASUNAME
2365
2366as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2367for as_dir in $PATH
2368do
2369 IFS=$as_save_IFS
2370 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002371 $as_echo "PATH: $as_dir"
2372 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002373IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002374
2375} >&5
2376
2377cat >&5 <<_ACEOF
2378
2379
2380## ----------- ##
2381## Core tests. ##
2382## ----------- ##
2383
2384_ACEOF
2385
2386
2387# Keep a trace of the command line.
2388# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002389# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002390# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002391# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002392ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002393ac_configure_args0=
2394ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002395ac_must_keep_next=false
2396for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002397do
Skip Montanaro6dead952003-09-25 14:50:04 +00002398 for ac_arg
2399 do
2400 case $ac_arg in
2401 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2402 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2403 | -silent | --silent | --silen | --sile | --sil)
2404 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002405 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002406 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002407 esac
2408 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002409 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002410 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002411 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002412 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002413 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002414 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002415 case $ac_arg in
2416 *=* | --config-cache | -C | -disable-* | --disable-* \
2417 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2418 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2419 | -with-* | --with-* | -without-* | --without-* | --x)
2420 case "$ac_configure_args0 " in
2421 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2422 esac
2423 ;;
2424 -* ) ac_must_keep_next=true ;;
2425 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002426 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002427 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002428 ;;
2429 esac
2430 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002431done
Matthias Kloseb9621712010-04-24 17:59:49 +00002432{ ac_configure_args0=; unset ac_configure_args0;}
2433{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002434
2435# When interrupted or exit'd, cleanup temporary files, and complete
2436# config.log. We remove comments because anyway the quotes in there
2437# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002438# WARNING: Use '\'' to represent an apostrophe within the trap.
2439# 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 +00002440trap 'exit_status=$?
2441 # Save into config.log some information that might help in debugging.
2442 {
2443 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002444
Benjamin Peterson79263252010-10-31 16:50:44 +00002445 cat <<\_ASBOX
2446## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002447## Cache variables. ##
Benjamin Peterson79263252010-10-31 16:50:44 +00002448## ---------------- ##
2449_ASBOX
Martin v. Löwis11437992002-04-12 09:54:03 +00002450 echo
2451 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002452(
2453 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2454 eval ac_val=\$$ac_var
2455 case $ac_val in #(
2456 *${as_nl}*)
2457 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002458 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2459$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002460 esac
2461 case $ac_var in #(
2462 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002463 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2464 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002465 esac ;;
2466 esac
2467 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002468 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2470 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002471 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 "s/'\''/'\''\\\\'\'''\''/g;
2473 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2474 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002475 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002477 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478 esac |
2479 sort
2480)
Martin v. Löwis11437992002-04-12 09:54:03 +00002481 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002482
Benjamin Peterson79263252010-10-31 16:50:44 +00002483 cat <<\_ASBOX
2484## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002485## Output variables. ##
Benjamin Peterson79263252010-10-31 16:50:44 +00002486## ----------------- ##
2487_ASBOX
Skip Montanaro6dead952003-09-25 14:50:04 +00002488 echo
2489 for ac_var in $ac_subst_vars
2490 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491 eval ac_val=\$$ac_var
2492 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002493 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002495 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002496 done | sort
2497 echo
2498
2499 if test -n "$ac_subst_files"; then
Benjamin Peterson79263252010-10-31 16:50:44 +00002500 cat <<\_ASBOX
2501## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002502## File substitutions. ##
Benjamin Peterson79263252010-10-31 16:50:44 +00002503## ------------------- ##
2504_ASBOX
Skip Montanaro6dead952003-09-25 14:50:04 +00002505 echo
2506 for ac_var in $ac_subst_files
2507 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508 eval ac_val=\$$ac_var
2509 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002511 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002512 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002513 done | sort
2514 echo
2515 fi
2516
Martin v. Löwis11437992002-04-12 09:54:03 +00002517 if test -s confdefs.h; then
Benjamin Peterson79263252010-10-31 16:50:44 +00002518 cat <<\_ASBOX
2519## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002520## confdefs.h. ##
Benjamin Peterson79263252010-10-31 16:50:44 +00002521## ----------- ##
2522_ASBOX
Martin v. Löwis11437992002-04-12 09:54:03 +00002523 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002525 echo
2526 fi
2527 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002528 $as_echo "$as_me: caught signal $ac_signal"
2529 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002531 rm -f core *.core core.conftest.* &&
2532 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002534' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002535for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002536 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002537done
2538ac_signal=0
2539
2540# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002542
Matthias Kloseb9621712010-04-24 17:59:49 +00002543$as_echo "/* confdefs.h */" > confdefs.h
2544
Martin v. Löwis11437992002-04-12 09:54:03 +00002545# Predefined preprocessor variables.
2546
2547cat >>confdefs.h <<_ACEOF
2548#define PACKAGE_NAME "$PACKAGE_NAME"
2549_ACEOF
2550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551cat >>confdefs.h <<_ACEOF
2552#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2553_ACEOF
2554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555cat >>confdefs.h <<_ACEOF
2556#define PACKAGE_VERSION "$PACKAGE_VERSION"
2557_ACEOF
2558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_STRING "$PACKAGE_STRING"
2561_ACEOF
2562
Martin v. Löwis11437992002-04-12 09:54:03 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2565_ACEOF
2566
Matthias Kloseb9621712010-04-24 17:59:49 +00002567cat >>confdefs.h <<_ACEOF
2568#define PACKAGE_URL "$PACKAGE_URL"
2569_ACEOF
2570
Martin v. Löwis11437992002-04-12 09:54:03 +00002571
2572# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002573# Prefer an explicitly selected file to automatically selected ones.
2574ac_site_file1=NONE
2575ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576if test -n "$CONFIG_SITE"; then
Benjamin Peterson79263252010-10-31 16:50:44 +00002577 ac_site_file1=$CONFIG_SITE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002578elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002579 ac_site_file1=$prefix/share/config.site
2580 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002581else
Matthias Kloseb9621712010-04-24 17:59:49 +00002582 ac_site_file1=$ac_default_prefix/share/config.site
2583 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002584fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002585for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586do
Matthias Kloseb9621712010-04-24 17:59:49 +00002587 test "x$ac_site_file" = xNONE && continue
2588 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2589 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2590$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002591 sed 's/^/| /' "$ac_site_file" >&5
Benjamin Peterson79263252010-10-31 16:50:44 +00002592 . "$ac_site_file"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002593 fi
2594done
2595
2596if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002597 # Some versions of bash will fail to source /dev/null (special files
2598 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2599 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2600 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2601$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2604 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002605 esac
2606 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002607else
Matthias Kloseb9621712010-04-24 17:59:49 +00002608 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2609$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 >$cache_file
2611fi
2612
2613# Check that the precious variables saved in the cache have kept the same
2614# value.
2615ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2618 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002619 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2620 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 case $ac_old_set,$ac_new_set in
2622 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002623 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2624$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 +00002625 ac_cache_corrupted=: ;;
2626 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002627 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2628$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 ac_cache_corrupted=: ;;
2630 ,);;
2631 *)
2632 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 # differences in whitespace do not lead to failure.
2634 ac_old_val_w=`echo x $ac_old_val`
2635 ac_new_val_w=`echo x $ac_new_val`
2636 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2637 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2638$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2639 ac_cache_corrupted=:
2640 else
2641 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2642$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2643 eval $ac_var=\$ac_old_val
2644 fi
2645 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2646$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2648$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 fi;;
2650 esac
2651 # Pass precious variables to config.status.
2652 if test "$ac_new_set" = set; then
2653 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002654 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002655 *) ac_arg=$ac_var=$ac_new_val ;;
2656 esac
2657 case " $ac_configure_args " in
2658 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002659 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 esac
2661 fi
2662done
2663if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2665$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2667$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00002668 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002670## -------------------- ##
2671## Main body of script. ##
2672## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002673
Guido van Rossum7f43da71994-08-01 12:15:30 +00002674ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002675ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002676ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2677ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2678ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002679
Guido van Rossum627b2d71993-12-24 10:39:16 +00002680
Michael W. Hudson54241132001-12-07 15:38:26 +00002681
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002682ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002683
2684
Martin v. Löwis11437992002-04-12 09:54:03 +00002685
Benjamin Petersond23f8222009-04-05 19:13:16 +00002686if test "$prefix" != "/"; then
2687 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2688fi
2689
2690
Martin v. Löwis11437992002-04-12 09:54:03 +00002691
2692
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002693# We don't use PACKAGE_ variables, and they cause conflicts
2694# with other autoconf-based packages that include Python.h
2695grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2696rm confdefs.h
2697mv confdefs.h.new confdefs.h
2698
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002699
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002700VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002701
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002702# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002703
2704SOVERSION=1.0
2705
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002706# The later defininition of _XOPEN_SOURCE disables certain features
2707# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2708
Matthias Kloseb9621712010-04-24 17:59:49 +00002709$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002710
2711
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002712# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2713# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2714# them.
2715
Matthias Kloseb9621712010-04-24 17:59:49 +00002716$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002717
2718
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002719# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2720# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2721# them.
2722
Matthias Kloseb9621712010-04-24 17:59:49 +00002723$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002724
2725
Martin v. Löwisd6320502004-08-12 13:45:08 +00002726# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2727# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2728
Matthias Kloseb9621712010-04-24 17:59:49 +00002729$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002730
2731
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002732# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2733# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2734# them.
2735
Matthias Kloseb9621712010-04-24 17:59:49 +00002736$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002737
2738
2739
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002740define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002741
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002742# Arguments passed to configure.
2743
2744CONFIG_ARGS="$ac_configure_args"
2745
Matthias Kloseb9621712010-04-24 17:59:49 +00002746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2747$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002748# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002749if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002750 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002751 case $enableval in
2752 yes)
2753 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002754 if test ! -d "${enableval}"
2755 then
2756 enableval=/
2757 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002758 ;;
2759 esac
2760 case $enableval in
2761 no)
2762 UNIVERSALSDK=
2763 enable_universalsdk=
2764 ;;
2765 *)
2766 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002767 if test ! -d "${UNIVERSALSDK}"
2768 then
Benjamin Peterson79263252010-10-31 16:50:44 +00002769 as_fn_error "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002770 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002771 ;;
2772 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002773
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002774
Thomas Wouters477c8d52006-05-27 19:21:47 +00002775else
2776
2777 UNIVERSALSDK=
2778 enable_universalsdk=
2779
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002780fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002781
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002782if test -n "${UNIVERSALSDK}"
2783then
Matthias Kloseb9621712010-04-24 17:59:49 +00002784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2785$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002786else
Matthias Kloseb9621712010-04-24 17:59:49 +00002787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2788$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002789fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002790
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002791
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002792
2793
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002794UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002795
Matthias Kloseb9621712010-04-24 17:59:49 +00002796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2797$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002798
2799# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002800if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002801 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2803$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002804 UNIVERSAL_ARCHS="$withval"
2805
2806else
2807
Matthias Kloseb9621712010-04-24 17:59:49 +00002808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2809$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002810
2811fi
2812
2813
2814
2815
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002816
2817# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002818if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002819 withval=$with_framework_name;
2820 PYTHONFRAMEWORK=${withval}
2821 PYTHONFRAMEWORKDIR=${withval}.framework
2822 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2823
2824else
2825
2826 PYTHONFRAMEWORK=Python
2827 PYTHONFRAMEWORKDIR=Python.framework
2828 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2829
2830fi
2831
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002832# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002833if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002834 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002835 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002836 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002837 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002838 esac
2839 case $enableval in
2840 no)
2841 PYTHONFRAMEWORK=
2842 PYTHONFRAMEWORKDIR=no-framework
2843 PYTHONFRAMEWORKPREFIX=
2844 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002845 FRAMEWORKINSTALLFIRST=
2846 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002847 FRAMEWORKALTINSTALLFIRST=
2848 FRAMEWORKALTINSTALLLAST=
2849 if test "x${prefix}" = "xNONE"; then
2850 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2851 else
2852 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2853 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002854 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002855 ;;
2856 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002857 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002858 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002859 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002860 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002861 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2862 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002863 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002864
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002865 if test "x${prefix}" = "xNONE" ; then
2866 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002867
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002868 else
2869 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2870 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002871
2872 case "${enableval}" in
2873 /System*)
2874 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2875 if test "${prefix}" = "NONE" ; then
2876 # See below
2877 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2878 fi
2879 ;;
2880
2881 /Library*)
2882 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2883 ;;
2884
2885 */Library/Frameworks)
2886 MDIR="`dirname "${enableval}"`"
2887 MDIR="`dirname "${MDIR}"`"
2888 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2889
2890 if test "${prefix}" = "NONE"; then
2891 # User hasn't specified the
2892 # --prefix option, but wants to install
2893 # the framework in a non-default location,
2894 # ensure that the compatibility links get
2895 # installed relative to that prefix as well
2896 # instead of in /usr/local.
2897 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2898 fi
2899 ;;
2900
2901 *)
2902 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2903 ;;
2904 esac
2905
Jack Jansen127e56e2001-09-11 14:41:54 +00002906 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002907
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002908 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002909 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002910 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002911
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002912 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002913
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002914 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2915
2916 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2917
Jack Jansene578a632001-08-15 01:27:14 +00002918 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002919
Guido van Rossum563e7081996-09-10 18:20:48 +00002920else
Martin v. Löwis11437992002-04-12 09:54:03 +00002921
Jack Jansene578a632001-08-15 01:27:14 +00002922 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002923 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002924 PYTHONFRAMEWORKPREFIX=
2925 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002926 FRAMEWORKINSTALLFIRST=
2927 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002928 FRAMEWORKALTINSTALLFIRST=
2929 FRAMEWORKALTINSTALLLAST=
2930 if test "x${prefix}" = "xNONE" ; then
2931 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2932 else
2933 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2934 fi
Jack Jansene578a632001-08-15 01:27:14 +00002935 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002936
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002937
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002938fi
2939
Thomas Wouters477c8d52006-05-27 19:21:47 +00002940
2941
Michael W. Hudson54241132001-12-07 15:38:26 +00002942
2943
2944
2945
Jack Jansene578a632001-08-15 01:27:14 +00002946
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002947
2948
2949
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002950
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002951
Jack Jansene578a632001-08-15 01:27:14 +00002952##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002953## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002954## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002955##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002956# Set name for machine-dependent library files
2957
Matthias Kloseb9621712010-04-24 17:59:49 +00002958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2959$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002960if test -z "$MACHDEP"
2961then
Guido van Rossum563e7081996-09-10 18:20:48 +00002962 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002963 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002964 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002965 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002966 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002967 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002968 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002969 ac_md_system=`echo $ac_sys_system |
2970 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2971 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002972 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002973 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002974
Guido van Rossum07397971997-04-29 21:49:50 +00002975 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002976 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002977 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002978 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002979 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002980 esac
2981fi
Guido van Rossum91922671997-10-09 20:24:13 +00002982
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002983# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2984# disable features if it is defined, without any means to access these
2985# features as extensions. For these systems, we skip the definition of
2986# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2987# some feature, make sure there is no alternative way to access this
2988# feature. Also, when using wildcards, make sure you have verified the
2989# need for not defining _XOPEN_SOURCE on all systems matching the
2990# wildcard, and that the wildcard does not include future systems
2991# (which may remove their limitations).
2992case $ac_sys_system/$ac_sys_release in
2993 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2994 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002995 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00002996 # In addition, Stefan Krah confirms that issue #1244610 exists through
2997 # OpenBSD 4.6, but is fixed in 4.7.
2998 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002999 define_xopen_source=no
3000 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3001 # also defined. This can be overridden by defining _BSD_SOURCE
3002 # As this has a different meaning on Linux, only define it on OpenBSD
3003
Matthias Kloseb9621712010-04-24 17:59:49 +00003004$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003005
3006 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003007 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003008 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3009 # also defined. This can be overridden by defining _BSD_SOURCE
3010 # As this has a different meaning on Linux, only define it on OpenBSD
3011
Matthias Kloseb9621712010-04-24 17:59:49 +00003012$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003013
3014 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003015 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3016 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3017 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003018 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 +00003019 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003020 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3021 # request to enable features supported by the standard as a request
3022 # to disable features not supported by the standard. The best way
3023 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3024 # entirely and define __EXTENSIONS__ instead.
3025 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003026 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003027 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3028 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003029 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003030 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003031 define_xopen_source=no;;
3032 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003033 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003034 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003035 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003036 # On FreeBSD 4, the math functions C89 does not cover are never defined
3037 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3038 FreeBSD/4.*)
3039 define_xopen_source=no;;
3040 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3041 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3042 # identifies itself as Darwin/7.*
3043 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3044 # disables platform specific features beyond repair.
3045 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3046 # has no effect, don't bother defining them
3047 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003048 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003049 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003050 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003051 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3052 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3053 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003054 AIX/4)
3055 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003056 AIX/5)
3057 if test `uname -r` -eq 1; then
3058 define_xopen_source=no
3059 fi
3060 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003061 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3062 # defining NI_NUMERICHOST.
3063 QNX/6.3.2)
3064 define_xopen_source=no
3065 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003066
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003067esac
3068
3069if test $define_xopen_source = yes
3070then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003071
Matthias Kloseb9621712010-04-24 17:59:49 +00003072$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003073
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003074
3075 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3076 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3077 # several APIs are not declared. Since this is also needed in some
3078 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003079
Matthias Kloseb9621712010-04-24 17:59:49 +00003080$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003081
3082
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003083
Matthias Kloseb9621712010-04-24 17:59:49 +00003084$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003085
3086
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003087fi
3088
Guido van Rossum91922671997-10-09 20:24:13 +00003089#
3090# SGI compilers allow the specification of the both the ABI and the
3091# ISA on the command line. Depending on the values of these switches,
3092# different and often incompatable code will be generated.
3093#
3094# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3095# thus supply support for various ABI/ISA combinations. The MACHDEP
3096# variable is also adjusted.
3097#
3098
3099if test ! -z "$SGI_ABI"
3100then
3101 CC="cc $SGI_ABI"
3102 LDFLAGS="$SGI_ABI $LDFLAGS"
3103 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3104fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3106$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003107
Jack Jansen6b08a402004-06-03 12:41:45 +00003108# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3109# it may influence the way we can build extensions, so distutils
3110# needs to check it
3111
Thomas Wouters477c8d52006-05-27 19:21:47 +00003112
Jack Jansen6b08a402004-06-03 12:41:45 +00003113CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003114EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003115
Matthias Kloseb9621712010-04-24 17:59:49 +00003116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3117$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003118ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3120$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003121
Guido van Rossum627b2d71993-12-24 10:39:16 +00003122# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003123
3124# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3125# for debug/optimization stuff. BASECFLAGS is for flags that are required
3126# just to get things to compile and link. Users are free to override OPT
3127# when running configure or make. The build should not break if they do.
3128# BASECFLAGS should generally not be messed with, however.
3129
3130# XXX shouldn't some/most/all of this code be merged with the stuff later
3131# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3133$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003134
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003135# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003136if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003137 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003138 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003139 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003140 without_gcc=yes;;
3141 yes) CC=gcc
3142 without_gcc=no;;
3143 *) CC=$withval
3144 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003145 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003146else
Martin v. Löwis11437992002-04-12 09:54:03 +00003147
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003148 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003149 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003150 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003151 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003152 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003153fi
3154
Matthias Kloseb9621712010-04-24 17:59:49 +00003155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3156$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003157
Guido van Rossum8b131c51995-03-09 14:10:13 +00003158# If the user switches compilers, we can't believe the cache
3159if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3160then
Benjamin Peterson79263252010-10-31 16:50:44 +00003161 as_fn_error "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003162(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003163fi
3164
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003165# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3166# when the compiler supports them, but we don't always want -O2, and
3167# we set -g later.
3168if test -z "$CFLAGS"; then
3169 CFLAGS=
3170fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003171ac_ext=c
3172ac_cpp='$CPP $CPPFLAGS'
3173ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3174ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3175ac_compiler_gnu=$ac_cv_c_compiler_gnu
3176if test -n "$ac_tool_prefix"; then
3177 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3178set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3180$as_echo_n "checking for $ac_word... " >&6; }
3181if test "${ac_cv_prog_CC+set}" = set; then :
3182 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003183else
3184 if test -n "$CC"; then
3185 ac_cv_prog_CC="$CC" # Let the user override the test.
3186else
Martin v. Löwis11437992002-04-12 09:54:03 +00003187as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3188for as_dir in $PATH
3189do
3190 IFS=$as_save_IFS
3191 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003192 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003193 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 +00003194 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003195 $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 +00003196 break 2
3197 fi
3198done
Matthias Kloseb9621712010-04-24 17:59:49 +00003199 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003200IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003201
Jack Jansendd19cf82001-12-06 22:36:17 +00003202fi
3203fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003204CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003205if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3207$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003208else
Matthias Kloseb9621712010-04-24 17:59:49 +00003209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3210$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003211fi
3212
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003213
Martin v. Löwis11437992002-04-12 09:54:03 +00003214fi
3215if test -z "$ac_cv_prog_CC"; then
3216 ac_ct_CC=$CC
3217 # Extract the first word of "gcc", so it can be a program name with args.
3218set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3220$as_echo_n "checking for $ac_word... " >&6; }
3221if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3222 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003223else
3224 if test -n "$ac_ct_CC"; then
3225 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3226else
3227as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3228for as_dir in $PATH
3229do
3230 IFS=$as_save_IFS
3231 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003232 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003233 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 +00003234 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003235 $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 +00003236 break 2
3237 fi
3238done
Matthias Kloseb9621712010-04-24 17:59:49 +00003239 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003240IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003241
3242fi
3243fi
3244ac_ct_CC=$ac_cv_prog_ac_ct_CC
3245if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3247$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003248else
Matthias Kloseb9621712010-04-24 17:59:49 +00003249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3250$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003251fi
3252
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003253 if test "x$ac_ct_CC" = x; then
3254 CC=""
3255 else
3256 case $cross_compiling:$ac_tool_warned in
3257yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003258{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3259$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003260ac_tool_warned=yes ;;
3261esac
3262 CC=$ac_ct_CC
3263 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003264else
3265 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003266fi
3267
Jack Jansendd19cf82001-12-06 22:36:17 +00003268if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003269 if test -n "$ac_tool_prefix"; then
3270 # 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 +00003271set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3273$as_echo_n "checking for $ac_word... " >&6; }
3274if test "${ac_cv_prog_CC+set}" = set; then :
3275 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003276else
3277 if test -n "$CC"; then
3278 ac_cv_prog_CC="$CC" # Let the user override the test.
3279else
Martin v. Löwis11437992002-04-12 09:54:03 +00003280as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3281for as_dir in $PATH
3282do
3283 IFS=$as_save_IFS
3284 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003285 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003286 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003287 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003288 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003289 break 2
3290 fi
3291done
Matthias Kloseb9621712010-04-24 17:59:49 +00003292 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003293IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003294
3295fi
3296fi
3297CC=$ac_cv_prog_CC
3298if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3300$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003301else
Matthias Kloseb9621712010-04-24 17:59:49 +00003302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3303$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003304fi
3305
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003306
Martin v. Löwis11437992002-04-12 09:54:03 +00003307 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003308fi
3309if test -z "$CC"; then
3310 # Extract the first word of "cc", so it can be a program name with args.
3311set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3313$as_echo_n "checking for $ac_word... " >&6; }
3314if test "${ac_cv_prog_CC+set}" = set; then :
3315 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003316else
3317 if test -n "$CC"; then
3318 ac_cv_prog_CC="$CC" # Let the user override the test.
3319else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003320 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003321as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3322for as_dir in $PATH
3323do
3324 IFS=$as_save_IFS
3325 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003326 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003327 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 +00003328 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3329 ac_prog_rejected=yes
3330 continue
3331 fi
3332 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003333 $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 +00003334 break 2
3335 fi
3336done
Matthias Kloseb9621712010-04-24 17:59:49 +00003337 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003338IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003339
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003340if test $ac_prog_rejected = yes; then
3341 # We found a bogon in the path, so make sure we never use it.
3342 set dummy $ac_cv_prog_CC
3343 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003344 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003345 # We chose a different compiler from the bogus one.
3346 # However, it has the same basename, so the bogon will be chosen
3347 # first if we set CC to just the basename; use the full file name.
3348 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003349 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003350 fi
3351fi
3352fi
3353fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003354CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003355if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3357$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003358else
Matthias Kloseb9621712010-04-24 17:59:49 +00003359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3360$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003361fi
3362
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003363
Martin v. Löwis11437992002-04-12 09:54:03 +00003364fi
3365if test -z "$CC"; then
3366 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003367 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003368 do
3369 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3370set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3372$as_echo_n "checking for $ac_word... " >&6; }
3373if test "${ac_cv_prog_CC+set}" = set; then :
3374 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003375else
3376 if test -n "$CC"; then
3377 ac_cv_prog_CC="$CC" # Let the user override the test.
3378else
Martin v. Löwis11437992002-04-12 09:54:03 +00003379as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3380for as_dir in $PATH
3381do
3382 IFS=$as_save_IFS
3383 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003384 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003385 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 +00003386 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003387 $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 +00003388 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003389 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003390done
Matthias Kloseb9621712010-04-24 17:59:49 +00003391 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003392IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003393
3394fi
3395fi
3396CC=$ac_cv_prog_CC
3397if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3399$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003400else
Matthias Kloseb9621712010-04-24 17:59:49 +00003401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3402$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003403fi
3404
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003405
Martin v. Löwis11437992002-04-12 09:54:03 +00003406 test -n "$CC" && break
3407 done
3408fi
3409if test -z "$CC"; then
3410 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003411 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003412do
3413 # Extract the first word of "$ac_prog", so it can be a program name with args.
3414set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3416$as_echo_n "checking for $ac_word... " >&6; }
3417if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3418 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003419else
3420 if test -n "$ac_ct_CC"; then
3421 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3422else
3423as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3424for as_dir in $PATH
3425do
3426 IFS=$as_save_IFS
3427 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003428 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003429 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 +00003430 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003431 $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 +00003432 break 2
3433 fi
3434done
Matthias Kloseb9621712010-04-24 17:59:49 +00003435 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003436IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003437
Martin v. Löwis11437992002-04-12 09:54:03 +00003438fi
3439fi
3440ac_ct_CC=$ac_cv_prog_ac_ct_CC
3441if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3443$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003444else
Matthias Kloseb9621712010-04-24 17:59:49 +00003445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3446$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003447fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003448
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003449
Martin v. Löwis11437992002-04-12 09:54:03 +00003450 test -n "$ac_ct_CC" && break
3451done
Michael W. Hudson54241132001-12-07 15:38:26 +00003452
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003453 if test "x$ac_ct_CC" = x; then
3454 CC=""
3455 else
3456 case $cross_compiling:$ac_tool_warned in
3457yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003458{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3459$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003460ac_tool_warned=yes ;;
3461esac
3462 CC=$ac_ct_CC
3463 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003464fi
3465
3466fi
3467
3468
Matthias Kloseb9621712010-04-24 17:59:49 +00003469test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3470$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00003471as_fn_error "no acceptable C compiler found in \$PATH
3472See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003473
3474# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003475$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3476set X $ac_compile
3477ac_compiler=$2
3478for ac_option in --version -v -V -qversion; do
3479 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003480case "(($ac_try" in
3481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3482 *) ac_try_echo=$ac_try;;
3483esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003484eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3485$as_echo "$ac_try_echo"; } >&5
3486 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003487 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003488 if test -s conftest.err; then
3489 sed '10a\
3490... rest of stderr output deleted ...
3491 10q' conftest.err >conftest.er1
3492 cat conftest.er1 >&5
3493 fi
3494 rm -f conftest.er1 conftest.err
3495 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3496 test $ac_status = 0; }
3497done
Martin v. Löwis11437992002-04-12 09:54:03 +00003498
Matthias Kloseb9621712010-04-24 17:59:49 +00003499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003500/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003501
Martin v. Löwis11437992002-04-12 09:54:03 +00003502int
3503main ()
3504{
3505
3506 ;
3507 return 0;
3508}
3509_ACEOF
3510ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003511ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003512# Try to create an executable without -o first, disregard a.out.
3513# It will help us diagnose broken compilers, and finding out an intuition
3514# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3516$as_echo_n "checking whether the C compiler works... " >&6; }
3517ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3518
3519# The possible output files:
3520ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3521
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003522ac_rmfiles=
3523for ac_file in $ac_files
3524do
3525 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003526 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003527 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3528 esac
3529done
3530rm -f $ac_rmfiles
3531
Matthias Kloseb9621712010-04-24 17:59:49 +00003532if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003533case "(($ac_try" in
3534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3535 *) ac_try_echo=$ac_try;;
3536esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003537eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3538$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003539 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003540 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003541 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3542 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003543 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3544# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3545# in a Makefile. We should not override ac_cv_exeext if it was cached,
3546# so that the user can short-circuit this test for compilers unknown to
3547# Autoconf.
3548for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003549do
3550 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003551 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003552 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003553 ;;
3554 [ab].out )
3555 # We found the default executable, but exeext='' is most
3556 # certainly right.
3557 break;;
3558 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003559 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003560 then :; else
3561 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3562 fi
3563 # We set ac_cv_exeext here because the later test for it is not
3564 # safe: cross compilers may not add the suffix if given an `-o'
3565 # argument, so we may need to know it at that point already.
3566 # Even if this section looks crufty: it has the advantage of
3567 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003568 break;;
3569 * )
3570 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003571 esac
3572done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003573test "$ac_cv_exeext" = no && ac_cv_exeext=
3574
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003575else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003576 ac_file=''
3577fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003578if test -z "$ac_file"; then :
3579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3580$as_echo "no" >&6; }
3581$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003582sed 's/^/| /' conftest.$ac_ext >&5
3583
Matthias Kloseb9621712010-04-24 17:59:49 +00003584{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3585$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00003586{ as_fn_set_status 77
3587as_fn_error "C compiler cannot create executables
3588See \`config.log' for more details." "$LINENO" 5; }; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003589else
3590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3591$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003592fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3594$as_echo_n "checking for C compiler default output file name... " >&6; }
3595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3596$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003597ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003598
Matthias Kloseb9621712010-04-24 17:59:49 +00003599rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003600ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3602$as_echo_n "checking for suffix of executables... " >&6; }
3603if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003604case "(($ac_try" in
3605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3606 *) ac_try_echo=$ac_try;;
3607esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003608eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3609$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003610 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003611 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003612 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3613 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003614 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3615# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3616# work properly (i.e., refer to `conftest.exe'), while it won't with
3617# `rm'.
3618for ac_file in conftest.exe conftest conftest.*; do
3619 test -f "$ac_file" || continue
3620 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003621 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003622 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3623 break;;
3624 * ) break;;
3625 esac
3626done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003627else
Matthias Kloseb9621712010-04-24 17:59:49 +00003628 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3629$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00003630as_fn_error "cannot compute suffix of executables: cannot compile and link
3631See \`config.log' for more details." "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003633rm -f conftest conftest$ac_cv_exeext
3634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3635$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003636
3637rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003638EXEEXT=$ac_cv_exeext
3639ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003640cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3641/* end confdefs.h. */
3642#include <stdio.h>
3643int
3644main ()
3645{
3646FILE *f = fopen ("conftest.out", "w");
3647 return ferror (f) || fclose (f) != 0;
3648
3649 ;
3650 return 0;
3651}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003653ac_clean_files="$ac_clean_files conftest.out"
3654# Check that the compiler produces executables we can run. If not, either
3655# the compiler is broken, or we cross compile.
3656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3657$as_echo_n "checking whether we are cross compiling... " >&6; }
3658if test "$cross_compiling" != yes; then
3659 { { ac_try="$ac_link"
3660case "(($ac_try" in
3661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3662 *) ac_try_echo=$ac_try;;
3663esac
3664eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3665$as_echo "$ac_try_echo"; } >&5
3666 (eval "$ac_link") 2>&5
3667 ac_status=$?
3668 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3669 test $ac_status = 0; }
3670 if { ac_try='./conftest$ac_cv_exeext'
3671 { { case "(($ac_try" in
3672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3673 *) ac_try_echo=$ac_try;;
3674esac
3675eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3676$as_echo "$ac_try_echo"; } >&5
3677 (eval "$ac_try") 2>&5
3678 ac_status=$?
3679 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3680 test $ac_status = 0; }; }; then
3681 cross_compiling=no
3682 else
3683 if test "$cross_compiling" = maybe; then
3684 cross_compiling=yes
3685 else
3686 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3687$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00003688as_fn_error "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003689If you meant to cross compile, use \`--host'.
Benjamin Peterson79263252010-10-31 16:50:44 +00003690See \`config.log' for more details." "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003691 fi
3692 fi
3693fi
3694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3695$as_echo "$cross_compiling" >&6; }
3696
3697rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3698ac_clean_files=$ac_clean_files_save
3699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3700$as_echo_n "checking for suffix of object files... " >&6; }
3701if test "${ac_cv_objext+set}" = set; then :
3702 $as_echo_n "(cached) " >&6
3703else
3704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003705/* end confdefs.h. */
3706
3707int
3708main ()
3709{
3710
3711 ;
3712 return 0;
3713}
3714_ACEOF
3715rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003716if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003717case "(($ac_try" in
3718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3719 *) ac_try_echo=$ac_try;;
3720esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003721eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3722$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003723 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003724 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003725 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3726 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003727 for ac_file in conftest.o conftest.obj conftest.*; do
3728 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003729 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003730 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003731 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3732 break;;
3733 esac
3734done
3735else
Matthias Kloseb9621712010-04-24 17:59:49 +00003736 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003737sed 's/^/| /' conftest.$ac_ext >&5
3738
Matthias Kloseb9621712010-04-24 17:59:49 +00003739{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3740$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00003741as_fn_error "cannot compute suffix of object files: cannot compile
3742See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003743fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003744rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3747$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003748OBJEXT=$ac_cv_objext
3749ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3751$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3752if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3753 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003754else
Matthias Kloseb9621712010-04-24 17:59:49 +00003755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003756/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003757
Martin v. Löwis11437992002-04-12 09:54:03 +00003758int
3759main ()
3760{
3761#ifndef __GNUC__
3762 choke me
3763#endif
3764
3765 ;
3766 return 0;
3767}
3768_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003769if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003770 ac_compiler_gnu=yes
3771else
Matthias Kloseb9621712010-04-24 17:59:49 +00003772 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003773fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003775ac_cv_c_compiler_gnu=$ac_compiler_gnu
3776
3777fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3779$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3780if test $ac_compiler_gnu = yes; then
3781 GCC=yes
3782else
3783 GCC=
3784fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003785ac_test_CFLAGS=${CFLAGS+set}
3786ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3788$as_echo_n "checking whether $CC accepts -g... " >&6; }
3789if test "${ac_cv_prog_cc_g+set}" = set; then :
3790 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003791else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003792 ac_save_c_werror_flag=$ac_c_werror_flag
3793 ac_c_werror_flag=yes
3794 ac_cv_prog_cc_g=no
3795 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003797/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003798
Martin v. Löwis11437992002-04-12 09:54:03 +00003799int
3800main ()
3801{
3802
3803 ;
3804 return 0;
3805}
3806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003807if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003808 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003809else
Matthias Kloseb9621712010-04-24 17:59:49 +00003810 CFLAGS=""
3811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003812/* end confdefs.h. */
3813
3814int
3815main ()
3816{
3817
3818 ;
3819 return 0;
3820}
3821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003822if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003823
Matthias Kloseb9621712010-04-24 17:59:49 +00003824else
3825 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003826 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003828/* end confdefs.h. */
3829
3830int
3831main ()
3832{
3833
3834 ;
3835 return 0;
3836}
3837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003838if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003839 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003840fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003842fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3844fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3846 ac_c_werror_flag=$ac_save_c_werror_flag
3847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3849$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003850if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003851 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003852elif test $ac_cv_prog_cc_g = yes; then
3853 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003854 CFLAGS="-g -O2"
3855 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003856 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003857 fi
3858else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003859 if test "$GCC" = yes; then
3860 CFLAGS="-O2"
3861 else
3862 CFLAGS=
3863 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3866$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3867if test "${ac_cv_prog_cc_c89+set}" = set; then :
3868 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003869else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003870 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003871ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003873/* end confdefs.h. */
3874#include <stdarg.h>
3875#include <stdio.h>
3876#include <sys/types.h>
3877#include <sys/stat.h>
3878/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3879struct buf { int x; };
3880FILE * (*rcsopen) (struct buf *, struct stat *, int);
3881static char *e (p, i)
3882 char **p;
3883 int i;
3884{
3885 return p[i];
3886}
3887static char *f (char * (*g) (char **, int), char **p, ...)
3888{
3889 char *s;
3890 va_list v;
3891 va_start (v,p);
3892 s = g (p, va_arg (v,int));
3893 va_end (v);
3894 return s;
3895}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003896
3897/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3898 function prototypes and stuff, but not '\xHH' hex character constants.
3899 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003900 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003901 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3902 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003903 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003904int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3905
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003906/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3907 inside strings and character constants. */
3908#define FOO(x) 'x'
3909int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3910
Skip Montanaro6dead952003-09-25 14:50:04 +00003911int test (int i, double x);
3912struct s1 {int (*f) (int a);};
3913struct s2 {int (*f) (double a);};
3914int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3915int argc;
3916char **argv;
3917int
3918main ()
3919{
3920return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3921 ;
3922 return 0;
3923}
3924_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003925for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3926 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003927do
3928 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003929 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003930 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003931fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003932rm -f core conftest.err conftest.$ac_objext
3933 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003934done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003935rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003936CC=$ac_save_CC
3937
3938fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003939# AC_CACHE_VAL
3940case "x$ac_cv_prog_cc_c89" in
3941 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3943$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003944 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3946$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003947 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3950$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003951esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003952if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003953
Matthias Kloseb9621712010-04-24 17:59:49 +00003954fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003955
Martin v. Löwis11437992002-04-12 09:54:03 +00003956ac_ext=c
3957ac_cpp='$CPP $CPPFLAGS'
3958ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3959ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3960ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003961
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003962
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003963
3964
Matthias Kloseb9621712010-04-24 17:59:49 +00003965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3966$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003967
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003968# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003969if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003970 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003971
3972 case $withval in
3973 no) with_cxx_main=no
3974 MAINCC='$(CC)';;
3975 yes) with_cxx_main=yes
3976 MAINCC='$(CXX)';;
3977 *) with_cxx_main=yes
3978 MAINCC=$withval
3979 if test -z "$CXX"
3980 then
3981 CXX=$withval
3982 fi;;
3983 esac
3984else
3985
3986 with_cxx_main=no
3987 MAINCC='$(CC)'
3988
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003989fi
3990
Matthias Kloseb9621712010-04-24 17:59:49 +00003991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
3992$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003993
3994preset_cxx="$CXX"
3995if test -z "$CXX"
3996then
3997 case "$CC" in
3998 gcc) # Extract the first word of "g++", so it can be a program name with args.
3999set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4001$as_echo_n "checking for $ac_word... " >&6; }
4002if test "${ac_cv_path_CXX+set}" = set; then :
4003 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004004else
4005 case $CXX in
4006 [\\/]* | ?:[\\/]*)
4007 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4008 ;;
4009 *)
4010 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4011for as_dir in notfound
4012do
4013 IFS=$as_save_IFS
4014 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004015 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004016 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 +00004017 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004018 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004019 break 2
4020 fi
4021done
Matthias Kloseb9621712010-04-24 17:59:49 +00004022 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004023IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004024
4025 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4026 ;;
4027esac
4028fi
4029CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004030if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4032$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004033else
Matthias Kloseb9621712010-04-24 17:59:49 +00004034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4035$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004036fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004037
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004038 ;;
4039 cc) # Extract the first word of "c++", so it can be a program name with args.
4040set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4042$as_echo_n "checking for $ac_word... " >&6; }
4043if test "${ac_cv_path_CXX+set}" = set; then :
4044 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004045else
4046 case $CXX in
4047 [\\/]* | ?:[\\/]*)
4048 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4049 ;;
4050 *)
4051 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4052for as_dir in notfound
4053do
4054 IFS=$as_save_IFS
4055 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004056 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004057 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 +00004058 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004059 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004060 break 2
4061 fi
4062done
Matthias Kloseb9621712010-04-24 17:59:49 +00004063 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004064IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004065
4066 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4067 ;;
4068esac
4069fi
4070CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004071if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4073$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004074else
Matthias Kloseb9621712010-04-24 17:59:49 +00004075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4076$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004078
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004079 ;;
4080 esac
4081 if test "$CXX" = "notfound"
4082 then
4083 CXX=""
4084 fi
4085fi
4086if test -z "$CXX"
4087then
4088 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4089do
4090 # Extract the first word of "$ac_prog", so it can be a program name with args.
4091set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4093$as_echo_n "checking for $ac_word... " >&6; }
4094if test "${ac_cv_prog_CXX+set}" = set; then :
4095 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004096else
4097 if test -n "$CXX"; then
4098 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4099else
4100as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4101for as_dir in $PATH
4102do
4103 IFS=$as_save_IFS
4104 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004105 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004106 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 +00004107 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004108 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004109 break 2
4110 fi
4111done
Matthias Kloseb9621712010-04-24 17:59:49 +00004112 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004113IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004114
4115fi
4116fi
4117CXX=$ac_cv_prog_CXX
4118if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4120$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004121else
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4123$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004124fi
4125
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004126
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004127 test -n "$CXX" && break
4128done
4129test -n "$CXX" || CXX="notfound"
4130
4131 if test "$CXX" = "notfound"
4132 then
4133 CXX=""
4134 fi
4135fi
4136if test "$preset_cxx" != "$CXX"
4137then
Matthias Kloseb9621712010-04-24 17:59:49 +00004138 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004139
4140 By default, distutils will build C++ extension modules with \"$CXX\".
4141 If this is not intended, then set CXX on the configure command line.
4142 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004143$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004144
4145 By default, distutils will build C++ extension modules with \"$CXX\".
4146 If this is not intended, then set CXX on the configure command line.
4147 " >&2;}
4148fi
4149
4150
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004151# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004152
4153ac_ext=c
4154ac_cpp='$CPP $CPPFLAGS'
4155ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4156ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4157ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4159$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004160# On Suns, sometimes $CPP names a directory.
4161if test -n "$CPP" && test -d "$CPP"; then
4162 CPP=
4163fi
4164if test -z "$CPP"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004165 if test "${ac_cv_prog_CPP+set}" = set; then :
4166 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004167else
Martin v. Löwis11437992002-04-12 09:54:03 +00004168 # Double quotes because CPP needs to be expanded
4169 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4170 do
4171 ac_preproc_ok=false
4172for ac_c_preproc_warn_flag in '' yes
4173do
4174 # Use a header file that comes with gcc, so configuring glibc
4175 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004176 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4177 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004178 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004179 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004181/* end confdefs.h. */
4182#ifdef __STDC__
4183# include <limits.h>
4184#else
4185# include <assert.h>
4186#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004187 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004189if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004190
Matthias Kloseb9621712010-04-24 17:59:49 +00004191else
Martin v. Löwis11437992002-04-12 09:54:03 +00004192 # Broken: fails on valid input.
4193continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004194fi
Benjamin Peterson79263252010-10-31 16:50:44 +00004195rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004196
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004197 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004198 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004200/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004201#include <ac_nonexistent.h>
4202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004203if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004204 # Broken: success on invalid input.
4205continue
4206else
Martin v. Löwis11437992002-04-12 09:54:03 +00004207 # Passes both tests.
4208ac_preproc_ok=:
4209break
4210fi
Benjamin Peterson79263252010-10-31 16:50:44 +00004211rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004212
4213done
4214# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Benjamin Peterson79263252010-10-31 16:50:44 +00004215rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004216if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004217 break
4218fi
4219
4220 done
4221 ac_cv_prog_CPP=$CPP
4222
4223fi
4224 CPP=$ac_cv_prog_CPP
4225else
4226 ac_cv_prog_CPP=$CPP
4227fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4229$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004230ac_preproc_ok=false
4231for ac_c_preproc_warn_flag in '' yes
4232do
4233 # Use a header file that comes with gcc, so configuring glibc
4234 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004235 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4236 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004237 # On the NeXT, cc -E runs the code through the compiler's parser,
4238 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004240/* end confdefs.h. */
4241#ifdef __STDC__
4242# include <limits.h>
4243#else
4244# include <assert.h>
4245#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004246 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004248if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004249
Matthias Kloseb9621712010-04-24 17:59:49 +00004250else
Martin v. Löwis11437992002-04-12 09:54:03 +00004251 # Broken: fails on valid input.
4252continue
4253fi
Benjamin Peterson79263252010-10-31 16:50:44 +00004254rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004255
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004256 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004257 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004259/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004260#include <ac_nonexistent.h>
4261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004262if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004263 # Broken: success on invalid input.
4264continue
4265else
Martin v. Löwis11437992002-04-12 09:54:03 +00004266 # Passes both tests.
4267ac_preproc_ok=:
4268break
4269fi
Benjamin Peterson79263252010-10-31 16:50:44 +00004270rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004271
4272done
4273# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Benjamin Peterson79263252010-10-31 16:50:44 +00004274rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004275if $ac_preproc_ok; then :
4276
Martin v. Löwis11437992002-04-12 09:54:03 +00004277else
Matthias Kloseb9621712010-04-24 17:59:49 +00004278 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4279$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00004280as_fn_error "C preprocessor \"$CPP\" fails sanity check
4281See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004282fi
4283
4284ac_ext=c
4285ac_cpp='$CPP $CPPFLAGS'
4286ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4287ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4288ac_compiler_gnu=$ac_cv_c_compiler_gnu
4289
4290
Matthias Kloseb9621712010-04-24 17:59:49 +00004291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4292$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4293if test "${ac_cv_path_GREP+set}" = set; then :
4294 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004295else
Matthias Kloseb9621712010-04-24 17:59:49 +00004296 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004297 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004298 # Loop through the user's path and test for each of PROGNAME-LIST
4299 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004300for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4301do
4302 IFS=$as_save_IFS
4303 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004304 for ac_prog in grep ggrep; do
4305 for ac_exec_ext in '' $ac_executable_extensions; do
4306 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4307 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4308# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004309 # Check for GNU $ac_path_GREP
4310case `"$ac_path_GREP" --version 2>&1` in
4311*GNU*)
4312 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4313*)
4314 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004315 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004316 while :
4317 do
4318 cat "conftest.in" "conftest.in" >"conftest.tmp"
4319 mv "conftest.tmp" "conftest.in"
4320 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004321 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4323 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004324 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004325 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4326 # Best one so far, save it but keep looking for a better one
4327 ac_cv_path_GREP="$ac_path_GREP"
4328 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004329 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004330 # 10*(2^10) chars as input seems more than enough
4331 test $ac_count -gt 10 && break
4332 done
4333 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4334esac
4335
Matthias Kloseb9621712010-04-24 17:59:49 +00004336 $ac_path_GREP_found && break 3
4337 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004338 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004339 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004341 if test -z "$ac_cv_path_GREP"; then
Benjamin Peterson79263252010-10-31 16:50:44 +00004342 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 +00004343 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004344else
4345 ac_cv_path_GREP=$GREP
4346fi
4347
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004348fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4350$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004351 GREP="$ac_cv_path_GREP"
4352
4353
Matthias Kloseb9621712010-04-24 17:59:49 +00004354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4355$as_echo_n "checking for egrep... " >&6; }
4356if test "${ac_cv_path_EGREP+set}" = set; then :
4357 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004358else
4359 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4360 then ac_cv_path_EGREP="$GREP -E"
4361 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004362 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004363 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004364 # Loop through the user's path and test for each of PROGNAME-LIST
4365 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004366for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4367do
4368 IFS=$as_save_IFS
4369 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004370 for ac_prog in egrep; do
4371 for ac_exec_ext in '' $ac_executable_extensions; do
4372 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4373 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4374# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004375 # Check for GNU $ac_path_EGREP
4376case `"$ac_path_EGREP" --version 2>&1` in
4377*GNU*)
4378 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4379*)
4380 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004381 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004382 while :
4383 do
4384 cat "conftest.in" "conftest.in" >"conftest.tmp"
4385 mv "conftest.tmp" "conftest.in"
4386 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004387 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004388 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4389 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004390 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004391 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4392 # Best one so far, save it but keep looking for a better one
4393 ac_cv_path_EGREP="$ac_path_EGREP"
4394 ac_path_EGREP_max=$ac_count
4395 fi
4396 # 10*(2^10) chars as input seems more than enough
4397 test $ac_count -gt 10 && break
4398 done
4399 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4400esac
4401
Matthias Kloseb9621712010-04-24 17:59:49 +00004402 $ac_path_EGREP_found && break 3
4403 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004404 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004405 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004406IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004407 if test -z "$ac_cv_path_EGREP"; then
Benjamin Peterson79263252010-10-31 16:50:44 +00004408 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 +00004409 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004410else
4411 ac_cv_path_EGREP=$EGREP
4412fi
4413
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004414 fi
4415fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4417$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004418 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004419
4420
Matthias Kloseb9621712010-04-24 17:59:49 +00004421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4422$as_echo_n "checking for ANSI C header files... " >&6; }
4423if test "${ac_cv_header_stdc+set}" = set; then :
4424 $as_echo_n "(cached) " >&6
4425else
4426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004427/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004428#include <stdlib.h>
4429#include <stdarg.h>
4430#include <string.h>
4431#include <float.h>
4432
4433int
4434main ()
4435{
4436
4437 ;
4438 return 0;
4439}
4440_ACEOF
4441if ac_fn_c_try_compile "$LINENO"; then :
4442 ac_cv_header_stdc=yes
4443else
4444 ac_cv_header_stdc=no
4445fi
4446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4447
4448if test $ac_cv_header_stdc = yes; then
4449 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4451/* end confdefs.h. */
4452#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004453
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004454_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004455if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004456 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004457
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004458else
Matthias Kloseb9621712010-04-24 17:59:49 +00004459 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004460fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004461rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004462
Matthias Kloseb9621712010-04-24 17:59:49 +00004463fi
4464
4465if test $ac_cv_header_stdc = yes; then
4466 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4468/* end confdefs.h. */
4469#include <stdlib.h>
4470
4471_ACEOF
4472if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4473 $EGREP "free" >/dev/null 2>&1; then :
4474
4475else
4476 ac_cv_header_stdc=no
4477fi
4478rm -f conftest*
4479
4480fi
4481
4482if test $ac_cv_header_stdc = yes; then
4483 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4484 if test "$cross_compiling" = yes; then :
4485 :
4486else
4487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4488/* end confdefs.h. */
4489#include <ctype.h>
4490#include <stdlib.h>
4491#if ((' ' & 0x0FF) == 0x020)
4492# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4493# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4494#else
4495# define ISLOWER(c) \
4496 (('a' <= (c) && (c) <= 'i') \
4497 || ('j' <= (c) && (c) <= 'r') \
4498 || ('s' <= (c) && (c) <= 'z'))
4499# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4500#endif
4501
4502#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4503int
4504main ()
4505{
4506 int i;
4507 for (i = 0; i < 256; i++)
4508 if (XOR (islower (i), ISLOWER (i))
4509 || toupper (i) != TOUPPER (i))
4510 return 2;
4511 return 0;
4512}
4513_ACEOF
4514if ac_fn_c_try_run "$LINENO"; then :
4515
4516else
4517 ac_cv_header_stdc=no
4518fi
4519rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4520 conftest.$ac_objext conftest.beam conftest.$ac_ext
4521fi
4522
4523fi
4524fi
4525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4526$as_echo "$ac_cv_header_stdc" >&6; }
4527if test $ac_cv_header_stdc = yes; then
4528
4529$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4530
4531fi
4532
4533# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4534for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4535 inttypes.h stdint.h unistd.h
4536do :
4537 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4538ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4539"
Benjamin Peterson79263252010-10-31 16:50:44 +00004540eval as_val=\$$as_ac_Header
4541 if test "x$as_val" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004542 cat >>confdefs.h <<_ACEOF
4543#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4544_ACEOF
4545
4546fi
4547
4548done
4549
4550
4551
4552 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4553if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4554 MINIX=yes
4555else
4556 MINIX=
4557fi
4558
4559
4560 if test "$MINIX" = yes; then
4561
4562$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4563
4564
4565$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4566
4567
4568$as_echo "#define _MINIX 1" >>confdefs.h
4569
4570 fi
4571
4572
4573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4574$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4575if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4576 $as_echo_n "(cached) " >&6
4577else
4578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4579/* end confdefs.h. */
4580
4581# define __EXTENSIONS__ 1
4582 $ac_includes_default
4583int
4584main ()
4585{
4586
4587 ;
4588 return 0;
4589}
4590_ACEOF
4591if ac_fn_c_try_compile "$LINENO"; then :
4592 ac_cv_safe_to_define___extensions__=yes
4593else
4594 ac_cv_safe_to_define___extensions__=no
4595fi
4596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4597fi
4598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4599$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4600 test $ac_cv_safe_to_define___extensions__ = yes &&
4601 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4602
4603 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4604
4605 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4606
4607 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4608
4609 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4610
4611
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004612
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004613# Check for unsupported systems
4614case $ac_sys_system/$ac_sys_release in
4615atheos*|Linux*/1*)
4616 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4617 echo See README for details.
4618 exit 1;;
4619esac
4620
4621
Matthias Kloseb9621712010-04-24 17:59:49 +00004622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4623$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004624
4625# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004626if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004627 withval=$with_suffix;
4628 case $withval in
4629 no) EXEEXT=;;
4630 yes) EXEEXT=.exe;;
4631 *) EXEEXT=$withval;;
4632 esac
4633fi
4634
Matthias Kloseb9621712010-04-24 17:59:49 +00004635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4636$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004637
4638# Test whether we're running on a non-case-sensitive system, in which
4639# case we give a warning if no ext is given
4640
Matthias Kloseb9621712010-04-24 17:59:49 +00004641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4642$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004643if test ! -d CaseSensitiveTestDir; then
4644mkdir CaseSensitiveTestDir
4645fi
4646
4647if test -d casesensitivetestdir
4648then
Matthias Kloseb9621712010-04-24 17:59:49 +00004649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4650$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004651 BUILDEXEEXT=.exe
4652else
Matthias Kloseb9621712010-04-24 17:59:49 +00004653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4654$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004655 BUILDEXEEXT=$EXEEXT
4656fi
4657rmdir CaseSensitiveTestDir
4658
4659case $MACHDEP in
4660bsdos*)
4661 case $CC in
4662 gcc) CC="$CC -D_HAVE_BSDI";;
4663 esac;;
4664esac
4665
4666case $ac_sys_system in
4667hp*|HP*)
4668 case $CC in
4669 cc|*/cc) CC="$CC -Ae";;
4670 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004671esac
4672
4673
4674
Matthias Kloseb9621712010-04-24 17:59:49 +00004675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4676$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004677if test -z "$LIBRARY"
4678then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004679 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4682$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004683
4684# LDLIBRARY is the name of the library to link against (as opposed to the
4685# name of the library into which to insert object files). BLDLIBRARY is also
4686# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4687# is blank as the main program is not linked directly against LDLIBRARY.
4688# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4689# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4690# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4691# DLLLIBRARY is the shared (i.e., DLL) library.
4692#
4693# RUNSHARED is used to run shared python without installed libraries
4694#
4695# INSTSONAME is the name of the shared library that will be use to install
4696# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004697#
4698# LDVERSION is the shared library version number, normally the Python version
4699# with the ABI build flags appended.
4700
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004701
4702
4703
4704
4705
4706
4707LDLIBRARY="$LIBRARY"
4708BLDLIBRARY='$(LDLIBRARY)'
4709INSTSONAME='$(LDLIBRARY)'
4710DLLLIBRARY=''
4711LDLIBRARYDIR=''
4712RUNSHARED=''
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004713LDVERSION="$(VERSION)"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004714
4715# LINKCC is the command that links the python executable -- default is $(CC).
4716# If CXX is set, and if it is needed to link a main function that was
4717# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4718# python might then depend on the C++ runtime
4719# This is altered for AIX in order to build the export list before
4720# linking.
4721
Matthias Kloseb9621712010-04-24 17:59:49 +00004722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4723$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004724if test -z "$LINKCC"
4725then
4726 LINKCC='$(PURIFY) $(MAINCC)'
4727 case $ac_sys_system in
4728 AIX*)
4729 exp_extra="\"\""
4730 if test $ac_sys_release -ge 5 -o \
4731 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4732 exp_extra="."
4733 fi
4734 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004735 QNX*)
4736 # qcc must be used because the other compilers do not
4737 # support -N.
4738 LINKCC=qcc;;
4739 esac
4740fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4742$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004743
4744# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4745# make sure we default having it set to "no": this is used by
4746# distutils.unixccompiler to know if it should add --enable-new-dtags
4747# to linker command lines, and failing to detect GNU ld simply results
4748# in the same bahaviour as before.
4749
Matthias Kloseb9621712010-04-24 17:59:49 +00004750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4751$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004752ac_prog=ld
4753if test "$GCC" = yes; then
4754 ac_prog=`$CC -print-prog-name=ld`
4755fi
4756case `"$ac_prog" -V 2>&1 < /dev/null` in
4757 *GNU*)
4758 GNULD=yes;;
4759 *)
4760 GNULD=no;;
4761esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4763$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004764
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4766$as_echo_n "checking for inline... " >&6; }
4767if test "${ac_cv_c_inline+set}" = set; then :
4768 $as_echo_n "(cached) " >&6
4769else
4770 ac_cv_c_inline=no
4771for ac_kw in inline __inline__ __inline; do
4772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4773/* end confdefs.h. */
4774#ifndef __cplusplus
4775typedef int foo_t;
4776static $ac_kw foo_t static_foo () {return 0; }
4777$ac_kw foo_t foo () {return 0; }
4778#endif
4779
4780_ACEOF
4781if ac_fn_c_try_compile "$LINENO"; then :
4782 ac_cv_c_inline=$ac_kw
4783fi
4784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4785 test "$ac_cv_c_inline" != no && break
4786done
4787
4788fi
4789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4790$as_echo "$ac_cv_c_inline" >&6; }
4791
4792case $ac_cv_c_inline in
4793 inline | yes) ;;
4794 *)
4795 case $ac_cv_c_inline in
4796 no) ac_val=;;
4797 *) ac_val=$ac_cv_c_inline;;
4798 esac
4799 cat >>confdefs.h <<_ACEOF
4800#ifndef __cplusplus
4801#define inline $ac_val
4802#endif
4803_ACEOF
4804 ;;
4805esac
4806
4807if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004808
4809$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004810
4811
4812fi
4813
4814
Matthias Kloseb9621712010-04-24 17:59:49 +00004815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4816$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004817# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004818if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004819 enableval=$enable_shared;
4820fi
4821
4822
4823if test -z "$enable_shared"
4824then
4825 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004826 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004827 enable_shared="yes";;
4828 *)
4829 enable_shared="no";;
4830 esac
4831fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4833$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004834
Matthias Kloseb9621712010-04-24 17:59:49 +00004835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4836$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004837# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004838if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004839 enableval=$enable_profiling; ac_save_cc="$CC"
4840 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004841 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004842 ac_enable_profiling="no"
4843else
Matthias Kloseb9621712010-04-24 17:59:49 +00004844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004845/* end confdefs.h. */
4846int main() { return 0; }
4847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004848if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004849 ac_enable_profiling="yes"
4850else
Matthias Kloseb9621712010-04-24 17:59:49 +00004851 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004852fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004853rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4854 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004855fi
4856
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004857 CC="$ac_save_cc"
4858fi
4859
Matthias Kloseb9621712010-04-24 17:59:49 +00004860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4861$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004862
4863case "$ac_enable_profiling" in
4864 "yes")
4865 BASECFLAGS="-pg $BASECFLAGS"
4866 LDFLAGS="-pg $LDFLAGS"
4867 ;;
4868esac
4869
Matthias Kloseb9621712010-04-24 17:59:49 +00004870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4871$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004872
4873# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4874# library that we build, but we do not want to link against it (we
4875# will find it with a -framework option). For this reason there is an
4876# extra variable BLDLIBRARY against which Python and the extension
4877# modules are linked, BLDLIBRARY. This is normally the same as
4878# LDLIBRARY, but empty for MacOSX framework builds.
4879if test "$enable_framework"
4880then
4881 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4882 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4883 BLDLIBRARY=''
4884else
4885 BLDLIBRARY='$(LDLIBRARY)'
4886fi
4887
4888# Other platforms follow
4889if test $enable_shared = "yes"; then
4890
Matthias Kloseb9621712010-04-24 17:59:49 +00004891$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004892
4893 case $ac_sys_system in
4894 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004895 LDLIBRARY='libpython$(LDVERSION).dll.a'
4896 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004897 ;;
4898 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004899 LDLIBRARY='libpython$(LDVERSION).so'
4900 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004901 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4902 INSTSONAME="$LDLIBRARY".$SOVERSION
4903 ;;
4904 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004905 LDLIBRARY='libpython$(LDVERSION).so'
4906 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004907 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4908 case $ac_sys_system in
4909 FreeBSD*)
4910 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4911 ;;
4912 esac
4913 INSTSONAME="$LDLIBRARY".$SOVERSION
4914 ;;
4915 hp*|HP*)
4916 case `uname -m` in
4917 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004918 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004919 ;;
4920 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004921 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004922 ;;
4923 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004924 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004925 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4926 ;;
4927 OSF*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004928 LDLIBRARY='libpython$(LDVERSION).so'
4929 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004930 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4931 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004932 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004933 LDLIBRARY='libpython$(LDVERSION).dylib'
4934 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004935 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4936 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004937 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004938 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004939 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4940 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004941
4942 esac
4943else # shared is disabled
4944 case $ac_sys_system in
4945 CYGWIN*)
4946 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004947 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004948 ;;
4949 esac
4950fi
4951
Matthias Kloseb9621712010-04-24 17:59:49 +00004952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4953$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004954
4955if test -n "$ac_tool_prefix"; then
4956 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4957set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4959$as_echo_n "checking for $ac_word... " >&6; }
4960if test "${ac_cv_prog_RANLIB+set}" = set; then :
4961 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004962else
4963 if test -n "$RANLIB"; then
4964 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4965else
4966as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4967for as_dir in $PATH
4968do
4969 IFS=$as_save_IFS
4970 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004971 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004972 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4973 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004974 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004975 break 2
4976 fi
4977done
Matthias Kloseb9621712010-04-24 17:59:49 +00004978 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004979IFS=$as_save_IFS
4980
4981fi
4982fi
4983RANLIB=$ac_cv_prog_RANLIB
4984if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4986$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004987else
Matthias Kloseb9621712010-04-24 17:59:49 +00004988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4989$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004990fi
4991
4992
4993fi
4994if test -z "$ac_cv_prog_RANLIB"; then
4995 ac_ct_RANLIB=$RANLIB
4996 # Extract the first word of "ranlib", so it can be a program name with args.
4997set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4999$as_echo_n "checking for $ac_word... " >&6; }
5000if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5001 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005002else
5003 if test -n "$ac_ct_RANLIB"; then
5004 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5005else
5006as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5007for as_dir in $PATH
5008do
5009 IFS=$as_save_IFS
5010 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005011 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005012 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5013 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005014 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005015 break 2
5016 fi
5017done
Matthias Kloseb9621712010-04-24 17:59:49 +00005018 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005019IFS=$as_save_IFS
5020
5021fi
5022fi
5023ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5024if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5026$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005027else
Matthias Kloseb9621712010-04-24 17:59:49 +00005028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5029$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005030fi
5031
5032 if test "x$ac_ct_RANLIB" = x; then
5033 RANLIB=":"
5034 else
5035 case $cross_compiling:$ac_tool_warned in
5036yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005037{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5038$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005039ac_tool_warned=yes ;;
5040esac
5041 RANLIB=$ac_ct_RANLIB
5042 fi
5043else
5044 RANLIB="$ac_cv_prog_RANLIB"
5045fi
5046
5047
5048for ac_prog in ar aal
5049do
5050 # Extract the first word of "$ac_prog", so it can be a program name with args.
5051set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5053$as_echo_n "checking for $ac_word... " >&6; }
5054if test "${ac_cv_prog_AR+set}" = set; then :
5055 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005056else
5057 if test -n "$AR"; then
5058 ac_cv_prog_AR="$AR" # Let the user override the test.
5059else
5060as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5061for as_dir in $PATH
5062do
5063 IFS=$as_save_IFS
5064 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005065 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005066 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5067 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005069 break 2
5070 fi
5071done
Matthias Kloseb9621712010-04-24 17:59:49 +00005072 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005073IFS=$as_save_IFS
5074
5075fi
5076fi
5077AR=$ac_cv_prog_AR
5078if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5080$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005081else
Matthias Kloseb9621712010-04-24 17:59:49 +00005082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5083$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005084fi
5085
5086
5087 test -n "$AR" && break
5088done
5089test -n "$AR" || AR="ar"
5090
5091
5092# tweak ARFLAGS only if the user didn't set it on the command line
5093
5094if test -z "$ARFLAGS"
5095then
5096 ARFLAGS="rc"
5097fi
5098
5099
5100# Extract the first word of "svnversion", so it can be a program name with args.
5101set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5103$as_echo_n "checking for $ac_word... " >&6; }
5104if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
5105 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005106else
5107 if test -n "$SVNVERSION"; then
5108 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5109else
5110as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5111for as_dir in $PATH
5112do
5113 IFS=$as_save_IFS
5114 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005115 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005116 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5117 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005118 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005119 break 2
5120 fi
5121done
Matthias Kloseb9621712010-04-24 17:59:49 +00005122 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005123IFS=$as_save_IFS
5124
5125 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5126fi
5127fi
5128SVNVERSION=$ac_cv_prog_SVNVERSION
5129if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5131$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005132else
Matthias Kloseb9621712010-04-24 17:59:49 +00005133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5134$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005135fi
5136
5137
5138if test $SVNVERSION = found
5139then
5140 SVNVERSION="svnversion \$(srcdir)"
5141else
5142 SVNVERSION="echo Unversioned directory"
5143fi
5144
5145case $MACHDEP in
5146bsdos*|hp*|HP*)
5147 # install -d does not work on BSDI or HP-UX
5148 if test -z "$INSTALL"
5149 then
5150 INSTALL="${srcdir}/install-sh -c"
5151 fi
5152esac
5153ac_aux_dir=
5154for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Benjamin Peterson79263252010-10-31 16:50:44 +00005155 for ac_t in install-sh install.sh shtool; do
5156 if test -f "$ac_dir/$ac_t"; then
5157 ac_aux_dir=$ac_dir
5158 ac_install_sh="$ac_aux_dir/$ac_t -c"
5159 break 2
5160 fi
5161 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005162done
5163if test -z "$ac_aux_dir"; then
Benjamin Peterson79263252010-10-31 16:50:44 +00005164 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005165fi
5166
5167# These three variables are undocumented and unsupported,
5168# and are intended to be withdrawn in a future Autoconf release.
5169# They can cause serious problems if a builder's source tree is in a directory
5170# whose full name contains unusual characters.
5171ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5172ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5173ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5174
5175
5176# Find a good install program. We prefer a C program (faster),
5177# so one script is as good as another. But avoid the broken or
5178# incompatible versions:
5179# SysV /etc/install, /usr/sbin/install
5180# SunOS /usr/etc/install
5181# IRIX /sbin/install
5182# AIX /bin/install
5183# AmigaOS /C/install, which installs bootblocks on floppy discs
5184# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5185# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5186# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5187# OS/2's system install, which has a completely different semantic
5188# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005189# Reject install programs that cannot install multiple files.
5190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5191$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005192if test -z "$INSTALL"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005193if test "${ac_cv_path_install+set}" = set; then :
5194 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005195else
5196 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5197for as_dir in $PATH
5198do
5199 IFS=$as_save_IFS
5200 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005201 # Account for people who put trailing slashes in PATH elements.
5202case $as_dir/ in #((
5203 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005204 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005205 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005206 /usr/ucb/* ) ;;
5207 *)
5208 # OSF1 and SCO ODT 3.0 have their own names for install.
5209 # Don't use installbsd from OSF since it installs stuff as root
5210 # by default.
5211 for ac_prog in ginstall scoinst install; do
5212 for ac_exec_ext in '' $ac_executable_extensions; do
5213 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5214 if test $ac_prog = install &&
5215 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5216 # AIX install. It has an incompatible calling convention.
5217 :
5218 elif test $ac_prog = install &&
5219 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5220 # program-specific install script used by HP pwplus--don't use.
5221 :
5222 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005223 rm -rf conftest.one conftest.two conftest.dir
5224 echo one > conftest.one
5225 echo two > conftest.two
5226 mkdir conftest.dir
5227 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5228 test -s conftest.one && test -s conftest.two &&
5229 test -s conftest.dir/conftest.one &&
5230 test -s conftest.dir/conftest.two
5231 then
5232 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5233 break 3
5234 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005235 fi
5236 fi
5237 done
5238 done
5239 ;;
5240esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005241
5242 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005243IFS=$as_save_IFS
5244
Matthias Kloseb9621712010-04-24 17:59:49 +00005245rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005246
5247fi
5248 if test "${ac_cv_path_install+set}" = set; then
5249 INSTALL=$ac_cv_path_install
5250 else
5251 # As a last resort, use the slow shell script. Don't cache a
5252 # value for INSTALL within a source directory, because that will
5253 # break other packages using the cache if that directory is
5254 # removed, or if the value is a relative name.
5255 INSTALL=$ac_install_sh
5256 fi
5257fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5259$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005260
5261# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5262# It thinks the first close brace ends the variable substitution.
5263test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5264
5265test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5266
5267test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5268
5269
5270# Not every filesystem supports hard links
5271
5272if test -z "$LN" ; then
5273 case $ac_sys_system in
5274 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005275 *) LN=ln;;
5276 esac
5277fi
5278
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005279# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005280
5281ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005282
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005283# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5285$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005286
5287# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005288if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005289 withval=$with_pydebug;
5290if test "$withval" != no
5291then
5292
Matthias Kloseb9621712010-04-24 17:59:49 +00005293$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005294
Matthias Kloseb9621712010-04-24 17:59:49 +00005295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5296$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005297 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005298 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005299else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5300$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005301fi
5302else
Matthias Kloseb9621712010-04-24 17:59:49 +00005303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5304$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005305fi
5306
5307
5308# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5309# merged with this chunk of code?
5310
5311# Optimizer/debugger flags
5312# ------------------------
5313# (The following bit of code is complicated enough - please keep things
5314# indented properly. Just pretend you're editing Python code. ;-)
5315
5316# There are two parallel sets of case statements below, one that checks to
5317# see if OPT was set and one that does BASECFLAGS setting based upon
5318# compiler and platform. BASECFLAGS tweaks need to be made even if the
5319# user set OPT.
5320
5321# tweak OPT based on compiler and platform, only if the user didn't set
5322# it on the command line
5323
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005324if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005325then
5326 case $GCC in
5327 yes)
5328 if test "$CC" != 'g++' ; then
5329 STRICT_PROTO="-Wstrict-prototypes"
5330 fi
5331 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5332 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5333 WRAP="-fwrapv"
5334 fi
5335 case $ac_cv_prog_cc_g in
5336 yes)
5337 if test "$Py_DEBUG" = 'true' ; then
5338 # Optimization messes up debuggers, so turn it off for
5339 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005340 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005341 else
5342 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5343 fi
5344 ;;
5345 *)
5346 OPT="-O3 -Wall $STRICT_PROTO"
5347 ;;
5348 esac
5349 case $ac_sys_system in
5350 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5351 ;;
5352 esac
5353 ;;
5354
5355 *)
5356 OPT="-O"
5357 ;;
5358 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005359fi
5360
5361
5362
5363# The -arch flags for universal builds on OSX
5364UNIVERSAL_ARCH_FLAGS=
5365
5366
5367# tweak BASECFLAGS based on compiler and platform
5368case $GCC in
5369yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005370 # Python doesn't violate C99 aliasing rules, but older versions of
5371 # GCC produce warnings for legal Python code. Enable
5372 # -fno-strict-aliasing on versions of GCC that support but produce
5373 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5375$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005376 ac_save_cc="$CC"
5377 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005378 save_CFLAGS="$CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +00005379 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
5380 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005381else
Matthias Kloseb9621712010-04-24 17:59:49 +00005382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005383/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005384
Matthias Kloseb159a552010-04-25 21:00:44 +00005385
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005386int
5387main ()
5388{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005389
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005390 ;
5391 return 0;
5392}
Matthias Kloseb159a552010-04-25 21:00:44 +00005393
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005395if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005396
5397 CC="$ac_save_cc -fstrict-aliasing"
5398 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005400/* end confdefs.h. */
5401
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005402 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005403int
5404main ()
5405{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005406double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005407 ;
5408 return 0;
5409}
Matthias Kloseb159a552010-04-25 21:00:44 +00005410
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005412if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005413
5414 ac_cv_no_strict_aliasing=no
5415
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005416else
Matthias Kloseb159a552010-04-25 21:00:44 +00005417
5418 ac_cv_no_strict_aliasing=yes
5419
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005420fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005422
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005423else
Matthias Kloseb159a552010-04-25 21:00:44 +00005424
5425 ac_cv_no_strict_aliasing=no
5426
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005427fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005429fi
5430
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005431 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005432 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5434$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005435 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005436 then
5437 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5438 fi
5439
5440 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5441 # support. Without this, treatment of subnormals doesn't follow
5442 # the standard.
5443 case $ac_sys_machine in
5444 alpha*)
5445 BASECFLAGS="$BASECFLAGS -mieee"
5446 ;;
5447 esac
5448
5449 case $ac_sys_system in
5450 SCO_SV*)
5451 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5452 ;;
5453 # is there any other compiler on Darwin besides gcc?
5454 Darwin*)
5455 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5456 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005457 if test "${CC}" = gcc
5458 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5460$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005461 case "${UNIVERSALSDK}" in
5462 */MacOSX10.4u.sdk)
5463 # Build using 10.4 SDK, force usage of gcc when the
5464 # compiler is gcc, otherwise the user will get very
5465 # confusing error messages when building on OSX 10.6
5466 CC=gcc-4.0
5467 CPP=cpp-4.0
5468 ;;
5469 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5471$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005472 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005473
5474
5475 if test "${enable_universalsdk}"; then
5476 UNIVERSAL_ARCH_FLAGS=""
5477 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5478 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5479 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005480 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005481 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5482 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005483 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005484 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005485
5486 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5487 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005488 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005489 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005490
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005491 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5492 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005493 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005494 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005495
5496 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5497 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005498 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005499 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005500
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005501 else
Benjamin Peterson79263252010-10-31 16:50:44 +00005502 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 +00005503
5504 fi
5505
5506
Ronald Oussoren666028b2010-04-18 19:07:43 +00005507 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5508 if test "${UNIVERSALSDK}" != "/"
5509 then
5510 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5511 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005512 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005513 fi
5514 fi
5515
5516 # Calculate the right deployment target for this build.
5517 #
5518 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5519 if test ${cur_target} '>' 10.2; then
5520 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005521 if test ${enable_universalsdk}; then
5522 if test "${UNIVERSAL_ARCHS}" = "all"; then
5523 # Ensure that the default platform for a
5524 # 4-way universal build is OSX 10.5,
5525 # that's the first OS release where
5526 # 4-way builds make sense.
5527 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005528
5529 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5530 cur_target='10.5'
5531
5532 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5533 cur_target='10.5'
5534
5535 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5536 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005537 fi
5538 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005539 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005540 # On Intel macs default to a deployment
5541 # target of 10.4, that's the first OSX
5542 # release with Intel support.
5543 cur_target="10.4"
5544 fi
5545 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005546 fi
5547 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5548
5549 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5550 # environment with a value that is the same as what we'll use
5551 # in the Makefile to ensure that we'll get the same compiler
5552 # environment during configure and build time.
5553 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5554 export MACOSX_DEPLOYMENT_TARGET
5555 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5556
5557 ;;
5558 OSF*)
5559 BASECFLAGS="$BASECFLAGS -mieee"
5560 ;;
5561 esac
5562 ;;
5563
5564*)
5565 case $ac_sys_system in
5566 OpenUNIX*|UnixWare*)
5567 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5568 ;;
5569 OSF*)
5570 BASECFLAGS="$BASECFLAGS -ieee -std"
5571 ;;
5572 SCO_SV*)
5573 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5574 ;;
5575 esac
5576 ;;
5577esac
5578
5579if test "$Py_DEBUG" = 'true'; then
5580 :
5581else
5582 OPT="-DNDEBUG $OPT"
5583fi
5584
5585if test "$ac_arch_flags"
5586then
5587 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5588fi
5589
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005590# Check whether GCC supports PyArg_ParseTuple format
5591if test "$GCC" = "yes"
5592then
Matthias Kloseb9621712010-04-24 17:59:49 +00005593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5594$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005595 save_CFLAGS=$CFLAGS
5596 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005598/* end confdefs.h. */
5599
5600 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005601int
5602main ()
5603{
5604
5605 ;
5606 return 0;
5607}
Matthias Kloseb159a552010-04-25 21:00:44 +00005608
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005609_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005610if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005611
Matthias Kloseb159a552010-04-25 21:00:44 +00005612
Matthias Kloseb9621712010-04-24 17:59:49 +00005613$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005614
Matthias Kloseb159a552010-04-25 21:00:44 +00005615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005616$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005617
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005618else
Matthias Kloseb159a552010-04-25 21:00:44 +00005619
5620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005621$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005622
5623fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5625 CFLAGS=$save_CFLAGS
5626fi
5627
5628# On some compilers, pthreads are available without further options
5629# (e.g. MacOS X). On some of these systems, the compiler will not
5630# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5631# So we have to see first whether pthreads are available without
5632# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5634$as_echo_n "checking whether pthreads are available without options... " >&6; }
5635if test "${ac_cv_pthread_is_default+set}" = set; then :
5636 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005637else
Matthias Kloseb9621712010-04-24 17:59:49 +00005638 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005639 ac_cv_pthread_is_default=no
5640else
Matthias Kloseb9621712010-04-24 17:59:49 +00005641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005642/* end confdefs.h. */
5643
5644#include <pthread.h>
5645
5646void* routine(void* p){return NULL;}
5647
5648int main(){
5649 pthread_t p;
5650 if(pthread_create(&p,NULL,routine,NULL)!=0)
5651 return 1;
5652 (void)pthread_detach(p);
5653 return 0;
5654}
5655
5656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005657if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658
5659 ac_cv_pthread_is_default=yes
5660 ac_cv_kthread=no
5661 ac_cv_pthread=no
5662
5663else
Matthias Kloseb9621712010-04-24 17:59:49 +00005664 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005666rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5667 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005668fi
5669
5670
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671fi
5672
Matthias Kloseb9621712010-04-24 17:59:49 +00005673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5674$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675
5676
5677if test $ac_cv_pthread_is_default = yes
5678then
5679 ac_cv_kpthread=no
5680else
5681# -Kpthread, if available, provides the right #defines
5682# and linker options to make pthread_create available
5683# Some compilers won't report that they do not support -Kpthread,
5684# so we need to run a program to see whether it really made the
5685# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5687$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
5688if test "${ac_cv_kpthread+set}" = set; then :
5689 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690else
5691 ac_save_cc="$CC"
5692CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005693if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005694 ac_cv_kpthread=no
5695else
Matthias Kloseb9621712010-04-24 17:59:49 +00005696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697/* end confdefs.h. */
5698
5699#include <pthread.h>
5700
5701void* routine(void* p){return NULL;}
5702
5703int main(){
5704 pthread_t p;
5705 if(pthread_create(&p,NULL,routine,NULL)!=0)
5706 return 1;
5707 (void)pthread_detach(p);
5708 return 0;
5709}
5710
5711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005712if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713 ac_cv_kpthread=yes
5714else
Matthias Kloseb9621712010-04-24 17:59:49 +00005715 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005717rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5718 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005719fi
5720
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005721CC="$ac_save_cc"
5722fi
5723
Matthias Kloseb9621712010-04-24 17:59:49 +00005724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5725$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726fi
5727
5728if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5729then
5730# -Kthread, if available, provides the right #defines
5731# and linker options to make pthread_create available
5732# Some compilers won't report that they do not support -Kthread,
5733# so we need to run a program to see whether it really made the
5734# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5736$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
5737if test "${ac_cv_kthread+set}" = set; then :
5738 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739else
5740 ac_save_cc="$CC"
5741CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005742if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743 ac_cv_kthread=no
5744else
Matthias Kloseb9621712010-04-24 17:59:49 +00005745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746/* end confdefs.h. */
5747
5748#include <pthread.h>
5749
5750void* routine(void* p){return NULL;}
5751
5752int main(){
5753 pthread_t p;
5754 if(pthread_create(&p,NULL,routine,NULL)!=0)
5755 return 1;
5756 (void)pthread_detach(p);
5757 return 0;
5758}
5759
5760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005761if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762 ac_cv_kthread=yes
5763else
Matthias Kloseb9621712010-04-24 17:59:49 +00005764 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005766rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5767 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768fi
5769
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770CC="$ac_save_cc"
5771fi
5772
Matthias Kloseb9621712010-04-24 17:59:49 +00005773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5774$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775fi
5776
5777if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5778then
5779# -pthread, if available, provides the right #defines
5780# and linker options to make pthread_create available
5781# Some compilers won't report that they do not support -pthread,
5782# so we need to run a program to see whether it really made the
5783# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5785$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
5786if test "${ac_cv_thread+set}" = set; then :
5787 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788else
5789 ac_save_cc="$CC"
5790CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005791if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005792 ac_cv_pthread=no
5793else
Matthias Kloseb9621712010-04-24 17:59:49 +00005794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005795/* end confdefs.h. */
5796
5797#include <pthread.h>
5798
5799void* routine(void* p){return NULL;}
5800
5801int main(){
5802 pthread_t p;
5803 if(pthread_create(&p,NULL,routine,NULL)!=0)
5804 return 1;
5805 (void)pthread_detach(p);
5806 return 0;
5807}
5808
5809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005810if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005811 ac_cv_pthread=yes
5812else
Matthias Kloseb9621712010-04-24 17:59:49 +00005813 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005815rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5816 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817fi
5818
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005819CC="$ac_save_cc"
5820fi
5821
Matthias Kloseb9621712010-04-24 17:59:49 +00005822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5823$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005824fi
5825
5826# If we have set a CC compiler flag for thread support then
5827# check if it works for CXX, too.
5828ac_cv_cxx_thread=no
5829if test ! -z "$CXX"
5830then
Matthias Kloseb9621712010-04-24 17:59:49 +00005831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5832$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833ac_save_cxx="$CXX"
5834
5835if test "$ac_cv_kpthread" = "yes"
5836then
5837 CXX="$CXX -Kpthread"
5838 ac_cv_cxx_thread=yes
5839elif test "$ac_cv_kthread" = "yes"
5840then
5841 CXX="$CXX -Kthread"
5842 ac_cv_cxx_thread=yes
5843elif test "$ac_cv_pthread" = "yes"
5844then
5845 CXX="$CXX -pthread"
5846 ac_cv_cxx_thread=yes
5847fi
5848
5849if test $ac_cv_cxx_thread = yes
5850then
5851 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5852 $CXX -c conftest.$ac_ext 2>&5
5853 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5854 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5855 then
5856 ac_cv_cxx_thread=yes
5857 else
5858 ac_cv_cxx_thread=no
5859 fi
5860 rm -fr conftest*
5861fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5863$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864fi
5865CXX="$ac_save_cxx"
5866
5867
5868# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5870$as_echo_n "checking for ANSI C header files... " >&6; }
5871if test "${ac_cv_header_stdc+set}" = set; then :
5872 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873else
Matthias Kloseb9621712010-04-24 17:59:49 +00005874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005875/* end confdefs.h. */
5876#include <stdlib.h>
5877#include <stdarg.h>
5878#include <string.h>
5879#include <float.h>
5880
5881int
5882main ()
5883{
5884
5885 ;
5886 return 0;
5887}
5888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005889if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005890 ac_cv_header_stdc=yes
5891else
Matthias Kloseb9621712010-04-24 17:59:49 +00005892 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5895
5896if test $ac_cv_header_stdc = yes; then
5897 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899/* end confdefs.h. */
5900#include <string.h>
5901
5902_ACEOF
5903if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005904 $EGREP "memchr" >/dev/null 2>&1; then :
5905
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906else
5907 ac_cv_header_stdc=no
5908fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005909rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910
5911fi
5912
5913if test $ac_cv_header_stdc = yes; then
5914 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916/* end confdefs.h. */
5917#include <stdlib.h>
5918
5919_ACEOF
5920if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005921 $EGREP "free" >/dev/null 2>&1; then :
5922
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923else
5924 ac_cv_header_stdc=no
5925fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005926rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927
5928fi
5929
5930if test $ac_cv_header_stdc = yes; then
5931 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00005932 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933 :
5934else
Matthias Kloseb9621712010-04-24 17:59:49 +00005935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936/* end confdefs.h. */
5937#include <ctype.h>
5938#include <stdlib.h>
5939#if ((' ' & 0x0FF) == 0x020)
5940# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5941# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5942#else
5943# define ISLOWER(c) \
5944 (('a' <= (c) && (c) <= 'i') \
5945 || ('j' <= (c) && (c) <= 'r') \
5946 || ('s' <= (c) && (c) <= 'z'))
5947# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5948#endif
5949
5950#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5951int
5952main ()
5953{
5954 int i;
5955 for (i = 0; i < 256; i++)
5956 if (XOR (islower (i), ISLOWER (i))
5957 || toupper (i) != TOUPPER (i))
5958 return 2;
5959 return 0;
5960}
5961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005962if ac_fn_c_try_run "$LINENO"; then :
5963
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005964else
Matthias Kloseb9621712010-04-24 17:59:49 +00005965 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005967rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5968 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005969fi
5970
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971fi
5972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5974$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975if test $ac_cv_header_stdc = yes; then
5976
Matthias Kloseb9621712010-04-24 17:59:49 +00005977$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005978
5979fi
5980
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005981for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5982fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005983ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005984shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005985unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005986sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5987sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005988sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005989sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005990sys/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 +00005991sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00005992bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005993do :
5994 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5995ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Benjamin Peterson79263252010-10-31 16:50:44 +00005996eval as_val=\$$as_ac_Header
5997 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00005998 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005999#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006000_ACEOF
6001
6002fi
6003
Guido van Rossum627b2d71993-12-24 10:39:16 +00006004done
6005
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006006ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006007for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006008 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6010$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +00006011if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006012 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006013else
Matthias Kloseb9621712010-04-24 17:59:49 +00006014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006015/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006016#include <sys/types.h>
6017#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006018
Martin v. Löwis11437992002-04-12 09:54:03 +00006019int
6020main ()
6021{
6022if ((DIR *) 0)
6023return 0;
6024 ;
6025 return 0;
6026}
6027_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006028if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006029 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006030else
Matthias Kloseb9621712010-04-24 17:59:49 +00006031 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006032fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006034fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006035eval ac_res=\$$as_ac_Header
6036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6037$as_echo "$ac_res" >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +00006038eval as_val=\$$as_ac_Header
6039 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006040 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006041#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006042_ACEOF
6043
6044ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006045fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006046
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006047done
6048# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6049if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6051$as_echo_n "checking for library containing opendir... " >&6; }
6052if test "${ac_cv_search_opendir+set}" = set; then :
6053 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006054else
Martin v. Löwis11437992002-04-12 09:54:03 +00006055 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006057/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006058
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006059/* Override any GCC internal prototype to avoid an error.
6060 Use char because int might match the return type of a GCC
6061 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006062#ifdef __cplusplus
6063extern "C"
6064#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006065char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006066int
6067main ()
6068{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006069return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006070 ;
6071 return 0;
6072}
6073_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006074for ac_lib in '' dir; do
6075 if test -z "$ac_lib"; then
6076 ac_res="none required"
6077 else
6078 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006079 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006080 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006081 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006082 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006083fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006084rm -f core conftest.err conftest.$ac_objext \
6085 conftest$ac_exeext
6086 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006087 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006088fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006089done
Matthias Kloseb9621712010-04-24 17:59:49 +00006090if test "${ac_cv_search_opendir+set}" = set; then :
6091
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006092else
6093 ac_cv_search_opendir=no
6094fi
6095rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006096LIBS=$ac_func_search_save_LIBS
6097fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6099$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006100ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006101if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006102 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006103
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006104fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006105
Michael W. Hudson54241132001-12-07 15:38:26 +00006106else
Matthias Kloseb9621712010-04-24 17:59:49 +00006107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6108$as_echo_n "checking for library containing opendir... " >&6; }
6109if test "${ac_cv_search_opendir+set}" = set; then :
6110 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006111else
6112 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006114/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006115
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006116/* Override any GCC internal prototype to avoid an error.
6117 Use char because int might match the return type of a GCC
6118 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006119#ifdef __cplusplus
6120extern "C"
6121#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006122char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006123int
6124main ()
6125{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006126return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006127 ;
6128 return 0;
6129}
6130_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006131for ac_lib in '' x; do
6132 if test -z "$ac_lib"; then
6133 ac_res="none required"
6134 else
6135 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006136 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006137 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006138 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006139 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006140fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006141rm -f core conftest.err conftest.$ac_objext \
6142 conftest$ac_exeext
6143 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006144 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006145fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006146done
Matthias Kloseb9621712010-04-24 17:59:49 +00006147if test "${ac_cv_search_opendir+set}" = set; then :
6148
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006149else
6150 ac_cv_search_opendir=no
6151fi
6152rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006153LIBS=$ac_func_search_save_LIBS
6154fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6156$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006157ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006158if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006159 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006160
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006161fi
6162
6163fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006164
Matthias Kloseb9621712010-04-24 17:59:49 +00006165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6166$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
6167if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
6168 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006169else
Matthias Kloseb9621712010-04-24 17:59:49 +00006170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006171/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006172#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006173int
6174main ()
6175{
6176return makedev(0, 0);
6177 ;
6178 return 0;
6179}
6180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006181if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006182 ac_cv_header_sys_types_h_makedev=yes
6183else
Matthias Kloseb9621712010-04-24 17:59:49 +00006184 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006185fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006186rm -f core conftest.err conftest.$ac_objext \
6187 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006188
6189fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6191$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006192
6193if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006194ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
6195if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006196
Matthias Kloseb9621712010-04-24 17:59:49 +00006197$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006198
6199fi
6200
6201
6202
6203 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006204 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
6205if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006206
Matthias Kloseb9621712010-04-24 17:59:49 +00006207$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006208
6209fi
6210
6211
6212 fi
6213fi
6214
Michael W. Hudson54241132001-12-07 15:38:26 +00006215
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006216# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006217for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006218do :
6219 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006220#ifdef HAVE_CURSES_H
6221#include <curses.h>
6222#endif
6223
Matthias Kloseb9621712010-04-24 17:59:49 +00006224"
6225if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006226 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006227#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006228_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006229
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006230fi
6231
6232done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006233
6234
Martin v. Löwis11017b12006-01-14 18:12:57 +00006235# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006236for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006237do :
6238 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 +00006239#ifdef HAVE_ASM_TYPES_H
6240#include <asm/types.h>
6241#endif
6242#ifdef HAVE_SYS_SOCKET_H
6243#include <sys/socket.h>
6244#endif
6245
Matthias Kloseb9621712010-04-24 17:59:49 +00006246"
6247if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006248 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006249#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006250_ACEOF
6251
6252fi
6253
6254done
6255
6256
Guido van Rossum627b2d71993-12-24 10:39:16 +00006257# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006258was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6260$as_echo_n "checking for clock_t in time.h... " >&6; }
6261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006262/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006263#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006264
6265_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006266if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006267 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006268 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006269else
Martin v. Löwis11437992002-04-12 09:54:03 +00006270
6271
Matthias Kloseb9621712010-04-24 17:59:49 +00006272$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006273
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006274
Guido van Rossum627b2d71993-12-24 10:39:16 +00006275fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006276rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006277
Matthias Kloseb9621712010-04-24 17:59:49 +00006278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6279$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006280
Neal Norwitz11690112002-07-30 01:08:28 +00006281# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6283$as_echo_n "checking for makedev... " >&6; }
6284cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006285/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006286
Jesus Cea740f53a2010-04-28 11:35:30 +00006287#if defined(MAJOR_IN_MKDEV)
6288#include <sys/mkdev.h>
6289#elif defined(MAJOR_IN_SYSMACROS)
6290#include <sys/sysmacros.h>
6291#else
6292#include <sys/types.h>
6293#endif
6294
Neal Norwitz11690112002-07-30 01:08:28 +00006295int
6296main ()
6297{
Jesus Cea740f53a2010-04-28 11:35:30 +00006298
6299 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006300 ;
6301 return 0;
6302}
Matthias Kloseb159a552010-04-25 21:00:44 +00006303
Neal Norwitz11690112002-07-30 01:08:28 +00006304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006305if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006306 ac_cv_has_makedev=yes
6307else
Matthias Kloseb9621712010-04-24 17:59:49 +00006308 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006309fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006310rm -f core conftest.err conftest.$ac_objext \
6311 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006312if test "$ac_cv_has_makedev" = "no"; then
6313 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006315/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006316
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006317#define _OSF_SOURCE 1
6318#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006319
Neal Norwitz11690112002-07-30 01:08:28 +00006320int
6321main ()
6322{
6323 makedev(0, 0)
6324 ;
6325 return 0;
6326}
6327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006328if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006329 ac_cv_has_makedev=yes
6330else
Matthias Kloseb9621712010-04-24 17:59:49 +00006331 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006332fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006333rm -f core conftest.err conftest.$ac_objext \
6334 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006335 if test "$ac_cv_has_makedev" = "yes"; then
6336
Matthias Kloseb9621712010-04-24 17:59:49 +00006337$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006338
6339 fi
6340fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6342$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006343if test "$ac_cv_has_makedev" = "yes"; then
6344
Matthias Kloseb9621712010-04-24 17:59:49 +00006345$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006346
6347fi
6348
Martin v. Löwis399a6892002-10-04 10:22:02 +00006349# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6350# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6351# defined, but the compiler does not support pragma redefine_extname,
6352# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6353# structures (such as rlimit64) without declaring them. As a
6354# work-around, disable LFS on such configurations
6355
6356use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6358$as_echo_n "checking Solaris LFS bug... " >&6; }
6359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006360/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006361
6362#define _LARGEFILE_SOURCE 1
6363#define _FILE_OFFSET_BITS 64
6364#include <sys/resource.h>
6365
Martin v. Löwis399a6892002-10-04 10:22:02 +00006366int
6367main ()
6368{
6369struct rlimit foo;
6370 ;
6371 return 0;
6372}
6373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006374if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006375 sol_lfs_bug=no
6376else
Matthias Kloseb9621712010-04-24 17:59:49 +00006377 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6381$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006382if test "$sol_lfs_bug" = "yes"; then
6383 use_lfs=no
6384fi
6385
6386if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006387# Two defines needed to enable largefile support on various platforms
6388# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006389
Matthias Kloseb9621712010-04-24 17:59:49 +00006390$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006391
6392
Matthias Kloseb9621712010-04-24 17:59:49 +00006393$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006394
Martin v. Löwis399a6892002-10-04 10:22:02 +00006395fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006396
Guido van Rossum84e7b241996-08-19 21:59:00 +00006397# Add some code to confdefs.h so that the test for off_t works on SCO
6398cat >> confdefs.h <<\EOF
6399#if defined(SCO_DS)
6400#undef _OFF_T
6401#endif
6402EOF
6403
Guido van Rossumef2255b2000-03-10 22:30:29 +00006404# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006405ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
6406if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006407
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006408else
Martin v. Löwis11437992002-04-12 09:54:03 +00006409
6410cat >>confdefs.h <<_ACEOF
6411#define mode_t int
6412_ACEOF
6413
6414fi
6415
Matthias Kloseb9621712010-04-24 17:59:49 +00006416ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
6417if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006418
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006419else
Martin v. Löwis11437992002-04-12 09:54:03 +00006420
6421cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006422#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006423_ACEOF
6424
6425fi
6426
Matthias Kloseb9621712010-04-24 17:59:49 +00006427ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6428if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006429
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006430else
Martin v. Löwis11437992002-04-12 09:54:03 +00006431
6432cat >>confdefs.h <<_ACEOF
6433#define pid_t int
6434_ACEOF
6435
6436fi
6437
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006438
Martin v. Löwis11437992002-04-12 09:54:03 +00006439cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006440#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006441_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006442
Matthias Kloseb9621712010-04-24 17:59:49 +00006443ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6444if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006445
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006446else
Martin v. Löwis11437992002-04-12 09:54:03 +00006447
6448cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006449#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006450_ACEOF
6451
6452fi
6453
Matthias Kloseb9621712010-04-24 17:59:49 +00006454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6455$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
6456if test "${ac_cv_type_uid_t+set}" = set; then :
6457 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006458else
Matthias Kloseb9621712010-04-24 17:59:49 +00006459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006460/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006461#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006462
6463_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006464if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006465 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006466 ac_cv_type_uid_t=yes
6467else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006468 ac_cv_type_uid_t=no
6469fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006470rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006471
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006472fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6474$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006475if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006476
Matthias Kloseb9621712010-04-24 17:59:49 +00006477$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006478
6479
Matthias Kloseb9621712010-04-24 17:59:49 +00006480$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006481
6482fi
6483
Matthias Kloseb9621712010-04-24 17:59:49 +00006484ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6485case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006486 no|yes) ;; #(
6487 *)
6488
Matthias Kloseb9621712010-04-24 17:59:49 +00006489$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006490
6491
6492cat >>confdefs.h <<_ACEOF
6493#define uint32_t $ac_cv_c_uint32_t
6494_ACEOF
6495;;
6496 esac
6497
Matthias Kloseb9621712010-04-24 17:59:49 +00006498ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6499case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006500 no|yes) ;; #(
6501 *)
6502
Matthias Kloseb9621712010-04-24 17:59:49 +00006503$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006504
6505
6506cat >>confdefs.h <<_ACEOF
6507#define uint64_t $ac_cv_c_uint64_t
6508_ACEOF
6509;;
6510 esac
6511
Matthias Kloseb9621712010-04-24 17:59:49 +00006512ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6513case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006514 no|yes) ;; #(
6515 *)
6516
6517cat >>confdefs.h <<_ACEOF
6518#define int32_t $ac_cv_c_int32_t
6519_ACEOF
6520;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006521esac
6522
Matthias Kloseb9621712010-04-24 17:59:49 +00006523ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6524case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006525 no|yes) ;; #(
6526 *)
6527
6528cat >>confdefs.h <<_ACEOF
6529#define int64_t $ac_cv_c_int64_t
6530_ACEOF
6531;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006532esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006533
Matthias Kloseb9621712010-04-24 17:59:49 +00006534ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
6535if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006536
Matthias Kloseb9621712010-04-24 17:59:49 +00006537$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006538
6539fi
6540
Jack Jansendd19cf82001-12-06 22:36:17 +00006541
Michael W. Hudson54241132001-12-07 15:38:26 +00006542# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006543# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006544# The cast to long int works around a bug in the HP C Compiler
6545# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6546# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6547# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6549$as_echo_n "checking size of int... " >&6; }
6550if test "${ac_cv_sizeof_int+set}" = set; then :
6551 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006552else
Matthias Kloseb9621712010-04-24 17:59:49 +00006553 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 +00006554
Martin v. Löwis11437992002-04-12 09:54:03 +00006555else
Matthias Kloseb9621712010-04-24 17:59:49 +00006556 if test "$ac_cv_type_int" = yes; then
6557 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6558$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00006559{ as_fn_set_status 77
6560as_fn_error "cannot compute sizeof (int)
6561See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006562 else
6563 ac_cv_sizeof_int=0
6564 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006565fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006566
Martin v. Löwis11437992002-04-12 09:54:03 +00006567fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6569$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006570
6571
6572
Martin v. Löwis11437992002-04-12 09:54:03 +00006573cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006574#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006575_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006576
6577
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006578# The cast to long int works around a bug in the HP C Compiler
6579# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6580# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6581# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6583$as_echo_n "checking size of long... " >&6; }
6584if test "${ac_cv_sizeof_long+set}" = set; then :
6585 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006586else
Matthias Kloseb9621712010-04-24 17:59:49 +00006587 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 +00006588
Martin v. Löwis11437992002-04-12 09:54:03 +00006589else
Matthias Kloseb9621712010-04-24 17:59:49 +00006590 if test "$ac_cv_type_long" = yes; then
6591 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6592$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00006593{ as_fn_set_status 77
6594as_fn_error "cannot compute sizeof (long)
6595See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006596 else
6597 ac_cv_sizeof_long=0
6598 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006599fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006600
Martin v. Löwis11437992002-04-12 09:54:03 +00006601fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6603$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006604
6605
6606
Martin v. Löwis11437992002-04-12 09:54:03 +00006607cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006608#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006609_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006610
6611
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006612# The cast to long int works around a bug in the HP C Compiler
6613# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6614# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6615# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6617$as_echo_n "checking size of void *... " >&6; }
6618if test "${ac_cv_sizeof_void_p+set}" = set; then :
6619 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006620else
Matthias Kloseb9621712010-04-24 17:59:49 +00006621 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 +00006622
Martin v. Löwis11437992002-04-12 09:54:03 +00006623else
Matthias Kloseb9621712010-04-24 17:59:49 +00006624 if test "$ac_cv_type_void_p" = yes; then
6625 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6626$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00006627{ as_fn_set_status 77
6628as_fn_error "cannot compute sizeof (void *)
6629See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006630 else
6631 ac_cv_sizeof_void_p=0
6632 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006633fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006634
Martin v. Löwis11437992002-04-12 09:54:03 +00006635fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6637$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006638
6639
6640
Martin v. Löwis11437992002-04-12 09:54:03 +00006641cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006642#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006643_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006644
6645
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006646# The cast to long int works around a bug in the HP C Compiler
6647# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6648# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6649# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6651$as_echo_n "checking size of short... " >&6; }
6652if test "${ac_cv_sizeof_short+set}" = set; then :
6653 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006654else
Matthias Kloseb9621712010-04-24 17:59:49 +00006655 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 +00006656
Martin v. Löwis11437992002-04-12 09:54:03 +00006657else
Matthias Kloseb9621712010-04-24 17:59:49 +00006658 if test "$ac_cv_type_short" = yes; then
6659 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6660$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00006661{ as_fn_set_status 77
6662as_fn_error "cannot compute sizeof (short)
6663See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006664 else
6665 ac_cv_sizeof_short=0
6666 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006668
Martin v. Löwis11437992002-04-12 09:54:03 +00006669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6671$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006672
6673
6674
Martin v. Löwis11437992002-04-12 09:54:03 +00006675cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006676#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006677_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006678
6679
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006680# The cast to long int works around a bug in the HP C Compiler
6681# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6682# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6683# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6685$as_echo_n "checking size of float... " >&6; }
6686if test "${ac_cv_sizeof_float+set}" = set; then :
6687 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006688else
Matthias Kloseb9621712010-04-24 17:59:49 +00006689 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 +00006690
Martin v. Löwis11437992002-04-12 09:54:03 +00006691else
Matthias Kloseb9621712010-04-24 17:59:49 +00006692 if test "$ac_cv_type_float" = yes; then
6693 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6694$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00006695{ as_fn_set_status 77
6696as_fn_error "cannot compute sizeof (float)
6697See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006698 else
6699 ac_cv_sizeof_float=0
6700 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006701fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006702
Martin v. Löwis11437992002-04-12 09:54:03 +00006703fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6705$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006706
6707
6708
Martin v. Löwis11437992002-04-12 09:54:03 +00006709cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006710#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006711_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006712
6713
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006714# The cast to long int works around a bug in the HP C Compiler
6715# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6716# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6717# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6719$as_echo_n "checking size of double... " >&6; }
6720if test "${ac_cv_sizeof_double+set}" = set; then :
6721 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006722else
Matthias Kloseb9621712010-04-24 17:59:49 +00006723 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 +00006724
Martin v. Löwis11437992002-04-12 09:54:03 +00006725else
Matthias Kloseb9621712010-04-24 17:59:49 +00006726 if test "$ac_cv_type_double" = yes; then
6727 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6728$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00006729{ as_fn_set_status 77
6730as_fn_error "cannot compute sizeof (double)
6731See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006732 else
6733 ac_cv_sizeof_double=0
6734 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006735fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006736
Martin v. Löwis11437992002-04-12 09:54:03 +00006737fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6739$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006740
6741
6742
Martin v. Löwis11437992002-04-12 09:54:03 +00006743cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006744#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006745_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006746
6747
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006748# The cast to long int works around a bug in the HP C Compiler
6749# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6750# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6751# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6753$as_echo_n "checking size of fpos_t... " >&6; }
6754if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
6755 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006756else
Matthias Kloseb9621712010-04-24 17:59:49 +00006757 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 +00006758
Martin v. Löwis11437992002-04-12 09:54:03 +00006759else
Matthias Kloseb9621712010-04-24 17:59:49 +00006760 if test "$ac_cv_type_fpos_t" = yes; then
6761 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6762$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00006763{ as_fn_set_status 77
6764as_fn_error "cannot compute sizeof (fpos_t)
6765See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006766 else
6767 ac_cv_sizeof_fpos_t=0
6768 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006770
Martin v. Löwis11437992002-04-12 09:54:03 +00006771fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6773$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006774
6775
6776
Martin v. Löwis11437992002-04-12 09:54:03 +00006777cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006778#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006779_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006780
Michael W. Hudson54241132001-12-07 15:38:26 +00006781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006782# The cast to long int works around a bug in the HP C Compiler
6783# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6784# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6785# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6787$as_echo_n "checking size of size_t... " >&6; }
6788if test "${ac_cv_sizeof_size_t+set}" = set; then :
6789 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006790else
Matthias Kloseb9621712010-04-24 17:59:49 +00006791 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 +00006792
Martin v. Löwis18e16552006-02-15 17:27:45 +00006793else
Matthias Kloseb9621712010-04-24 17:59:49 +00006794 if test "$ac_cv_type_size_t" = yes; then
6795 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6796$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00006797{ as_fn_set_status 77
6798as_fn_error "cannot compute sizeof (size_t)
6799See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006800 else
6801 ac_cv_sizeof_size_t=0
6802 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006803fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006804
Martin v. Löwis18e16552006-02-15 17:27:45 +00006805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6807$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006808
6809
6810
Martin v. Löwis18e16552006-02-15 17:27:45 +00006811cat >>confdefs.h <<_ACEOF
6812#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6813_ACEOF
6814
6815
Christian Heimes400adb02008-02-01 08:12:03 +00006816# The cast to long int works around a bug in the HP C Compiler
6817# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6818# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6819# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6821$as_echo_n "checking size of pid_t... " >&6; }
6822if test "${ac_cv_sizeof_pid_t+set}" = set; then :
6823 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006824else
Matthias Kloseb9621712010-04-24 17:59:49 +00006825 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 +00006826
Christian Heimes400adb02008-02-01 08:12:03 +00006827else
Matthias Kloseb9621712010-04-24 17:59:49 +00006828 if test "$ac_cv_type_pid_t" = yes; then
6829 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6830$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00006831{ as_fn_set_status 77
6832as_fn_error "cannot compute sizeof (pid_t)
6833See \`config.log' for more details." "$LINENO" 5; }; }
Christian Heimes400adb02008-02-01 08:12:03 +00006834 else
6835 ac_cv_sizeof_pid_t=0
6836 fi
6837fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006838
Christian Heimes400adb02008-02-01 08:12:03 +00006839fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6841$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006842
6843
6844
6845cat >>confdefs.h <<_ACEOF
6846#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6847_ACEOF
6848
6849
Michael W. Hudson54241132001-12-07 15:38:26 +00006850
Matthias Kloseb9621712010-04-24 17:59:49 +00006851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6852$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006853have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006855/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006856
Martin v. Löwis11437992002-04-12 09:54:03 +00006857int
6858main ()
6859{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006860long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006861 ;
6862 return 0;
6863}
6864_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006865if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006866
6867
Matthias Kloseb9621712010-04-24 17:59:49 +00006868$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006869
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006870 have_long_long=yes
6871
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006872fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6875$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006876if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006877# The cast to long int works around a bug in the HP C Compiler
6878# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6879# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6880# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6882$as_echo_n "checking size of long long... " >&6; }
6883if test "${ac_cv_sizeof_long_long+set}" = set; then :
6884 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006885else
Matthias Kloseb9621712010-04-24 17:59:49 +00006886 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 +00006887
Martin v. Löwis11437992002-04-12 09:54:03 +00006888else
Matthias Kloseb9621712010-04-24 17:59:49 +00006889 if test "$ac_cv_type_long_long" = yes; then
6890 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6891$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00006892{ as_fn_set_status 77
6893as_fn_error "cannot compute sizeof (long long)
6894See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006895 else
6896 ac_cv_sizeof_long_long=0
6897 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006898fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006899
Martin v. Löwis11437992002-04-12 09:54:03 +00006900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6902$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006903
6904
6905
Martin v. Löwis11437992002-04-12 09:54:03 +00006906cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006907#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006908_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006909
Michael W. Hudson54241132001-12-07 15:38:26 +00006910
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006911fi
6912
Matthias Kloseb9621712010-04-24 17:59:49 +00006913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6914$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006915have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006917/* end confdefs.h. */
6918
6919int
6920main ()
6921{
6922long double x; x = (long double)0;
6923 ;
6924 return 0;
6925}
6926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006927if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006928
6929
Matthias Kloseb9621712010-04-24 17:59:49 +00006930$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006931
6932 have_long_double=yes
6933
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006934fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
6937$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006938if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006939# The cast to long int works around a bug in the HP C Compiler
6940# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6941# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6942# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
6944$as_echo_n "checking size of long double... " >&6; }
6945if test "${ac_cv_sizeof_long_double+set}" = set; then :
6946 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006947else
Matthias Kloseb9621712010-04-24 17:59:49 +00006948 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 +00006949
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006950else
Matthias Kloseb9621712010-04-24 17:59:49 +00006951 if test "$ac_cv_type_long_double" = yes; then
6952 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6953$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00006954{ as_fn_set_status 77
6955as_fn_error "cannot compute sizeof (long double)
6956See \`config.log' for more details." "$LINENO" 5; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006957 else
6958 ac_cv_sizeof_long_double=0
6959 fi
6960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006961
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006962fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
6964$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006965
6966
6967
6968cat >>confdefs.h <<_ACEOF
6969#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
6970_ACEOF
6971
6972
6973fi
6974
6975
Matthias Kloseb9621712010-04-24 17:59:49 +00006976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
6977$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00006978have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00006980/* end confdefs.h. */
6981
6982int
6983main ()
6984{
6985_Bool x; x = (_Bool)0;
6986 ;
6987 return 0;
6988}
6989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006990if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00006991
6992
Matthias Kloseb9621712010-04-24 17:59:49 +00006993$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00006994
6995 have_c99_bool=yes
6996
Thomas Woutersb2137042007-02-01 18:02:27 +00006997fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7000$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007001if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007002# The cast to long int works around a bug in the HP C Compiler
7003# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7004# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7005# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7007$as_echo_n "checking size of _Bool... " >&6; }
7008if test "${ac_cv_sizeof__Bool+set}" = set; then :
7009 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007010else
Matthias Kloseb9621712010-04-24 17:59:49 +00007011 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 +00007012
Thomas Woutersb2137042007-02-01 18:02:27 +00007013else
Matthias Kloseb9621712010-04-24 17:59:49 +00007014 if test "$ac_cv_type__Bool" = yes; then
7015 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7016$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00007017{ as_fn_set_status 77
7018as_fn_error "cannot compute sizeof (_Bool)
7019See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007020 else
7021 ac_cv_sizeof__Bool=0
7022 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007023fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007024
Thomas Woutersb2137042007-02-01 18:02:27 +00007025fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7027$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007028
7029
7030
Thomas Woutersb2137042007-02-01 18:02:27 +00007031cat >>confdefs.h <<_ACEOF
7032#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7033_ACEOF
7034
7035
7036fi
7037
Matthias Kloseb9621712010-04-24 17:59:49 +00007038ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007039 #include <stdint.h>
7040 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007041 #ifdef HAVE_INTTYPES_H
7042 #include <inttypes.h>
7043 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007044"
7045if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007046
7047cat >>confdefs.h <<_ACEOF
7048#define HAVE_UINTPTR_T 1
7049_ACEOF
7050
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007051# The cast to long int works around a bug in the HP C Compiler
7052# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7053# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7054# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7056$as_echo_n "checking size of uintptr_t... " >&6; }
7057if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
7058 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007059else
Matthias Kloseb9621712010-04-24 17:59:49 +00007060 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 +00007061
Martin v. Löwis11437992002-04-12 09:54:03 +00007062else
Matthias Kloseb9621712010-04-24 17:59:49 +00007063 if test "$ac_cv_type_uintptr_t" = yes; then
7064 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7065$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00007066{ as_fn_set_status 77
7067as_fn_error "cannot compute sizeof (uintptr_t)
7068See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007069 else
7070 ac_cv_sizeof_uintptr_t=0
7071 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007072fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007073
Martin v. Löwis11437992002-04-12 09:54:03 +00007074fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7076$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007077
7078
7079
Martin v. Löwis11437992002-04-12 09:54:03 +00007080cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007081#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007082_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007083
Michael W. Hudson54241132001-12-07 15:38:26 +00007084
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007085fi
7086
Thomas Wouters89f507f2006-12-13 04:49:30 +00007087
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007088# The cast to long int works around a bug in the HP C Compiler
7089# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7090# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7091# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7093$as_echo_n "checking size of off_t... " >&6; }
7094if test "${ac_cv_sizeof_off_t+set}" = set; then :
7095 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007096else
Matthias Kloseb9621712010-04-24 17:59:49 +00007097 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007098#ifdef HAVE_SYS_TYPES_H
7099#include <sys/types.h>
7100#endif
7101
Matthias Kloseb9621712010-04-24 17:59:49 +00007102"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007103
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007104else
Matthias Kloseb9621712010-04-24 17:59:49 +00007105 if test "$ac_cv_type_off_t" = yes; then
7106 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7107$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00007108{ as_fn_set_status 77
7109as_fn_error "cannot compute sizeof (off_t)
7110See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007111 else
7112 ac_cv_sizeof_off_t=0
7113 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007114fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007115
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007116fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7118$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007119
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007120
7121
Martin v. Löwis11437992002-04-12 09:54:03 +00007122cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007123#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007124_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007125
Michael W. Hudson54241132001-12-07 15:38:26 +00007126
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007127
Matthias Kloseb9621712010-04-24 17:59:49 +00007128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7129$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007130if test "$have_long_long" = yes
7131then
7132if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007133 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007134
Matthias Kloseb9621712010-04-24 17:59:49 +00007135$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007136
Matthias Kloseb9621712010-04-24 17:59:49 +00007137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7138$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007139else
Matthias Kloseb9621712010-04-24 17:59:49 +00007140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7141$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007142fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007143else
Matthias Kloseb9621712010-04-24 17:59:49 +00007144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7145$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007146fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007147
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007148# The cast to long int works around a bug in the HP C Compiler
7149# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7150# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7151# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7153$as_echo_n "checking size of time_t... " >&6; }
7154if test "${ac_cv_sizeof_time_t+set}" = set; then :
7155 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007156else
Matthias Kloseb9621712010-04-24 17:59:49 +00007157 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007158#ifdef HAVE_SYS_TYPES_H
7159#include <sys/types.h>
7160#endif
7161#ifdef HAVE_TIME_H
7162#include <time.h>
7163#endif
7164
Matthias Kloseb9621712010-04-24 17:59:49 +00007165"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007166
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007167else
Matthias Kloseb9621712010-04-24 17:59:49 +00007168 if test "$ac_cv_type_time_t" = yes; then
7169 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7170$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00007171{ as_fn_set_status 77
7172as_fn_error "cannot compute sizeof (time_t)
7173See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007174 else
7175 ac_cv_sizeof_time_t=0
7176 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007177fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007178
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007179fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7181$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007182
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007183
7184
Martin v. Löwis11437992002-04-12 09:54:03 +00007185cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007186#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007187_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007188
Michael W. Hudson54241132001-12-07 15:38:26 +00007189
7190
Trent Mick635f6fb2000-08-23 21:33:05 +00007191# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007192ac_save_cc="$CC"
7193if test "$ac_cv_kpthread" = "yes"
7194then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007195elif test "$ac_cv_kthread" = "yes"
7196then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007197elif test "$ac_cv_pthread" = "yes"
7198then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007199fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007200
Matthias Kloseb9621712010-04-24 17:59:49 +00007201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7202$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007203have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007205/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007206
7207 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007208int
7209main ()
7210{
Guido van Rossum12580492000-09-24 16:47:19 +00007211pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007212 ;
7213 return 0;
7214}
Matthias Kloseb159a552010-04-25 21:00:44 +00007215
Martin v. Löwis11437992002-04-12 09:54:03 +00007216_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007217if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007218 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007219fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7222$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007223if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007224 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007225# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7226# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7227# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7229$as_echo_n "checking size of pthread_t... " >&6; }
7230if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
7231 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007232else
Matthias Kloseb9621712010-04-24 17:59:49 +00007233 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007234#ifdef HAVE_PTHREAD_H
7235#include <pthread.h>
7236#endif
7237
Matthias Kloseb9621712010-04-24 17:59:49 +00007238"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007239
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007240else
Matthias Kloseb9621712010-04-24 17:59:49 +00007241 if test "$ac_cv_type_pthread_t" = yes; then
7242 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7243$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00007244{ as_fn_set_status 77
7245as_fn_error "cannot compute sizeof (pthread_t)
7246See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007247 else
7248 ac_cv_sizeof_pthread_t=0
7249 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007250fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007251
Trent Mick635f6fb2000-08-23 21:33:05 +00007252fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7254$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007255
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007256
7257
Martin v. Löwis11437992002-04-12 09:54:03 +00007258cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007259#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007260_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007261
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007262
Trent Mick635f6fb2000-08-23 21:33:05 +00007263fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007264CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007265
Michael W. Hudson54241132001-12-07 15:38:26 +00007266
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007267case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007268 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007269 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7270 ;;
7271 Darwin/*)
7272 OTHER_LIBTOOL_OPT=""
7273 ;;
7274esac
7275
7276
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007277ARCH_RUN_32BIT=""
7278
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007279case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007280 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007281 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7282 if test "${enable_universalsdk}"; then
7283 :
7284 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007285 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007286 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007287 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007288 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007289 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007290 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007291 if test ${gcc_version} '<' 4.0
7292 then
7293 LIBTOOL_CRUFT="-lcc_dynamic"
7294 else
7295 LIBTOOL_CRUFT=""
7296 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007297 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007298 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007299else
Matthias Kloseb9621712010-04-24 17:59:49 +00007300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007301/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007302
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007303 #include <unistd.h>
7304 int main(int argc, char*argv[])
7305 {
7306 if (sizeof(long) == 4) {
7307 return 0;
7308 } else {
7309 return 1;
7310 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007311 }
7312
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007314if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007315 ac_osx_32bit=yes
7316else
Matthias Kloseb9621712010-04-24 17:59:49 +00007317 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007318fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007319rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7320 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007321fi
7322
7323
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007324 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007325 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007326 i386)
7327 MACOSX_DEFAULT_ARCH="i386"
7328 ;;
7329 ppc)
7330 MACOSX_DEFAULT_ARCH="ppc"
7331 ;;
7332 *)
Benjamin Peterson79263252010-10-31 16:50:44 +00007333 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007334 ;;
7335 esac
7336 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007337 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007338 i386)
7339 MACOSX_DEFAULT_ARCH="x86_64"
7340 ;;
7341 ppc)
7342 MACOSX_DEFAULT_ARCH="ppc64"
7343 ;;
7344 *)
Benjamin Peterson79263252010-10-31 16:50:44 +00007345 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007346 ;;
7347 esac
7348
7349 #ARCH_RUN_32BIT="true"
7350 fi
7351
7352 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007353 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007354 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007355esac
7356
Matthias Kloseb9621712010-04-24 17:59:49 +00007357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7358$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007359if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007360then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007361 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007362 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007363 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007364
Matthias Kloseb9621712010-04-24 17:59:49 +00007365$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007366
Matthias Kloseb9621712010-04-24 17:59:49 +00007367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7368$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007369 if test $enable_shared = "yes"
7370 then
Benjamin Peterson79263252010-10-31 16:50:44 +00007371 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 +00007372 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007373else
Matthias Kloseb9621712010-04-24 17:59:49 +00007374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7375$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007376fi
7377
Matthias Kloseb9621712010-04-24 17:59:49 +00007378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7379$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007380case $ac_sys_system/$ac_sys_release in
7381 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007382
Matthias Kloseb9621712010-04-24 17:59:49 +00007383$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007384
Matthias Kloseb9621712010-04-24 17:59:49 +00007385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7386$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007387 ;;
7388 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7390$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007391 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007392esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007393
Guido van Rossum0a516c91994-09-12 10:58:40 +00007394# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007395
Michael W. Hudson54241132001-12-07 15:38:26 +00007396
7397
7398
7399
Benjamin Peterson99f03762010-04-11 22:15:28 +00007400
Thomas Wouters477c8d52006-05-27 19:21:47 +00007401
Georg Brandlb1441c72009-01-03 22:33:39 +00007402
Thomas Wouters477c8d52006-05-27 19:21:47 +00007403cat >>confdefs.h <<_ACEOF
7404#define SHLIB_EXT "$SO"
7405_ACEOF
7406
Guido van Rossum0a516c91994-09-12 10:58:40 +00007407# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007408# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007409# (Shared libraries in this instance are shared modules to be loaded into
7410# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7412$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007413if test -z "$LDSHARED"
7414then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007415 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007416 AIX*)
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00007417 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp -L\$(srcdir)"
Guido van Rossumce608b02001-09-28 15:59:38 +00007418 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007419 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007420 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007421 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007422 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007423 if test "$GCC" = "yes" ; then
7424 LDSHARED='$(CC) -shared'
7425 LDCXXSHARED='$(CXX) -shared'
7426 else
7427 LDSHARED='$(CC) -G'
7428 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007429 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007430 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007431 if test "$GCC" = "yes" ; then
7432 LDSHARED='$(CC) -shared'
7433 LDCXXSHARED='$(CXX) -shared'
7434 else
7435 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007436 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007437 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007438 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007439 LDSHARED='$(CC) -bundle'
7440 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007441 if test "$enable_framework" ; then
7442 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007443 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7444 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007445 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007446 else
7447 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007448 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007449 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007450 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007451 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007452 LDSHARED='$(CC) -bundle'
7453 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007454 if test "$enable_framework" ; then
7455 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007456 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7457 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007458 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007459 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007460 # No framework, use the Python app as bundle-loader
7461 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007462 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007463 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007464 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007465 Darwin/*)
7466 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7467 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007468
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007469 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007470 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007471 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007472 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007473 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007474 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7475 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007476 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007477 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007478 LDSHARED='$(CC) -bundle'
7479 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007480 if test "$enable_framework" ; then
7481 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007482 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7483 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007484 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007485 else
7486 # No framework, use the Python app as bundle-loader
7487 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7488 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007489 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007490 fi
7491 fi
7492 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007493 Linux*|GNU*|QNX*)
7494 LDSHARED='$(CC) -shared'
7495 LDCXXSHARED='$(CXX) -shared';;
7496 BSD/OS*/4*)
7497 LDSHARED="gcc -shared"
7498 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007499 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007500 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007501 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007502 LDSHARED='$(CC) -shared'
7503 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007504 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007505 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007506 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007507 OpenBSD*)
7508 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7509 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007510 LDSHARED='$(CC) -shared $(CCSHARED)'
7511 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007512 else
7513 case `uname -r` in
7514 [01].* | 2.[0-7] | 2.[0-7].*)
7515 LDSHARED="ld -Bshareable ${LDFLAGS}"
7516 ;;
7517 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007518 LDSHARED='$(CC) -shared $(CCSHARED)'
7519 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007520 ;;
7521 esac
7522 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007523 NetBSD*|DragonFly*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007524 LDSHARED="cc -shared"
7525 LDCXXSHARED="c++ -shared";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007526 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007527 if test "$GCC" = "yes" ; then
7528 LDSHARED='$(CC) -shared'
7529 LDCXXSHARED='$(CXX) -shared'
7530 else
7531 LDSHARED='$(CC) -G'
7532 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007533 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007534 SCO_SV*)
7535 LDSHARED='$(CC) -Wl,-G,-Bexport'
7536 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7537 CYGWIN*)
7538 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7539 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007540 *) LDSHARED="ld";;
7541 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007542fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7544$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007545LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007546BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007547# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007548# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7550$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007551if test -z "$CCSHARED"
7552then
Guido van Rossum07397971997-04-29 21:49:50 +00007553 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007554 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007555 then CCSHARED="-fPIC";
7556 elif test `uname -p` = sparc;
7557 then CCSHARED="-xcode=pic32";
7558 else CCSHARED="-Kpic";
7559 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007560 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007561 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007562 else CCSHARED="+z";
7563 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007564 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007565 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007566 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007567 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007568 if test "$GCC" = "yes"
7569 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007570 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007571 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007572 SCO_SV*)
7573 if test "$GCC" = "yes"
7574 then CCSHARED="-fPIC"
7575 else CCSHARED="-Kpic -belf"
7576 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007577 IRIX*/6*) case $CC in
7578 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007579 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007580 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007581 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007582fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7584$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007585# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007586# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7588$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007589if test -z "$LINKFORSHARED"
7590then
Guido van Rossum07397971997-04-29 21:49:50 +00007591 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007592 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007593 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007594 LINKFORSHARED="-Wl,-E -Wl,+s";;
7595# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007596 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007597 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007598 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007599 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007600 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007601 if test "$enable_framework"
7602 then
Jack Jansenda49e192005-01-07 13:08:22 +00007603 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007604 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007605 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007606 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007607 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007608 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007609 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007610 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7611 then
7612 LINKFORSHARED="-Wl,--export-dynamic"
7613 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007614 SunOS/5*) case $CC in
7615 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007616 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007617 then
7618 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007619 fi;;
7620 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007621 CYGWIN*)
7622 if test $enable_shared = "no"
7623 then
7624 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7625 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007626 QNX*)
7627 # -Wl,-E causes the symbols to be added to the dynamic
7628 # symbol table so that they can be found when a module
7629 # is loaded. -N 2048K causes the stack size to be set
7630 # to 2048 kilobytes so that the stack doesn't overflow
7631 # when running test_compile.py.
7632 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007633 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007634fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7636$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007637
Michael W. Hudson54241132001-12-07 15:38:26 +00007638
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007639
Matthias Kloseb9621712010-04-24 17:59:49 +00007640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7641$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007642if test ! "$LIBRARY" = "$LDLIBRARY"
7643then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007644 case $ac_sys_system in
7645 CYGWIN*)
7646 # Cygwin needs CCSHARED when building extension DLLs
7647 # but not when building the interpreter DLL.
7648 CFLAGSFORSHARED='';;
7649 *)
7650 CFLAGSFORSHARED='$(CCSHARED)'
7651 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007652fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7654$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007655
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007656# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7657# library (with --enable-shared).
7658# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007659# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7660# if it is not required, since it creates a dependency of the shared library
7661# to LIBS. This, in turn, means that applications linking the shared libpython
7662# don't need to link LIBS explicitly. The default should be only changed
7663# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007664
Matthias Kloseb9621712010-04-24 17:59:49 +00007665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7666$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007667case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007668 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007669 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007670esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7672$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007673
7674
Guido van Rossum627b2d71993-12-24 10:39:16 +00007675# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7677$as_echo_n "checking for dlopen in -ldl... " >&6; }
7678if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
7679 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007680else
Martin v. Löwis11437992002-04-12 09:54:03 +00007681 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007682LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007683cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007684/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007685
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007686/* Override any GCC internal prototype to avoid an error.
7687 Use char because int might match the return type of a GCC
7688 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007689#ifdef __cplusplus
7690extern "C"
7691#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007692char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007693int
7694main ()
7695{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007696return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007697 ;
7698 return 0;
7699}
7700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007701if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007702 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007703else
Matthias Kloseb9621712010-04-24 17:59:49 +00007704 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007705fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007706rm -f core conftest.err conftest.$ac_objext \
7707 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007708LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007709fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7711$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
7712if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007713 cat >>confdefs.h <<_ACEOF
7714#define HAVE_LIBDL 1
7715_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007716
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007717 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007718
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007719fi
7720 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7722$as_echo_n "checking for shl_load in -ldld... " >&6; }
7723if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
7724 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007725else
Martin v. Löwis11437992002-04-12 09:54:03 +00007726 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007727LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007729/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007730
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007731/* Override any GCC internal prototype to avoid an error.
7732 Use char because int might match the return type of a GCC
7733 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007734#ifdef __cplusplus
7735extern "C"
7736#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007737char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007738int
7739main ()
7740{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007741return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007742 ;
7743 return 0;
7744}
7745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007746if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007747 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007748else
Matthias Kloseb9621712010-04-24 17:59:49 +00007749 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007751rm -f core conftest.err conftest.$ac_objext \
7752 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007753LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7756$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
7757if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007758 cat >>confdefs.h <<_ACEOF
7759#define HAVE_LIBDLD 1
7760_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007761
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007762 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007763
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007764fi
7765 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007766
Georg Brandlb1441c72009-01-03 22:33:39 +00007767# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007768if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7770$as_echo_n "checking for library containing sem_init... " >&6; }
7771if test "${ac_cv_search_sem_init+set}" = set; then :
7772 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007773else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007774 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007776/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007777
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007778/* Override any GCC internal prototype to avoid an error.
7779 Use char because int might match the return type of a GCC
7780 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007781#ifdef __cplusplus
7782extern "C"
7783#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007784char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007785int
7786main ()
7787{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007788return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007789 ;
7790 return 0;
7791}
7792_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007793for ac_lib in '' pthread rt posix4; do
7794 if test -z "$ac_lib"; then
7795 ac_res="none required"
7796 else
7797 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007798 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007799 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007800 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007801 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007802fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007803rm -f core conftest.err conftest.$ac_objext \
7804 conftest$ac_exeext
7805 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007806 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007807fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007808done
Matthias Kloseb9621712010-04-24 17:59:49 +00007809if test "${ac_cv_search_sem_init+set}" = set; then :
7810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007811else
7812 ac_cv_search_sem_init=no
7813fi
7814rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007815LIBS=$ac_func_search_save_LIBS
7816fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7818$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007819ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007820if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007821 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007822
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007823fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007824 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007825 # posix4 on Solaris 2.6
7826 # pthread (first!) on Linux
7827fi
7828
Martin v. Löwis19d17342003-06-14 21:03:05 +00007829# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7831$as_echo_n "checking for textdomain in -lintl... " >&6; }
7832if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
7833 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007834else
7835 ac_check_lib_save_LIBS=$LIBS
7836LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007838/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007839
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007840/* Override any GCC internal prototype to avoid an error.
7841 Use char because int might match the return type of a GCC
7842 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007843#ifdef __cplusplus
7844extern "C"
7845#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007846char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007847int
7848main ()
7849{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007850return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007851 ;
7852 return 0;
7853}
7854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007855if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007856 ac_cv_lib_intl_textdomain=yes
7857else
Matthias Kloseb9621712010-04-24 17:59:49 +00007858 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007860rm -f core conftest.err conftest.$ac_objext \
7861 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007862LIBS=$ac_check_lib_save_LIBS
7863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7865$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
7866if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007867
Matthias Kloseb9621712010-04-24 17:59:49 +00007868$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007869
Brett Cannonc6d936e2009-06-07 20:09:53 +00007870 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007871fi
7872
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007873
7874# checks for system dependent C++ extensions support
7875case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007876 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7877$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007879/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007880
7881 #include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007882int
7883main ()
7884{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007885loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007886 ;
7887 return 0;
7888}
Matthias Kloseb159a552010-04-25 21:00:44 +00007889
Martin v. Löwis11437992002-04-12 09:54:03 +00007890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007891if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007892
Matthias Kloseb159a552010-04-25 21:00:44 +00007893
Matthias Kloseb9621712010-04-24 17:59:49 +00007894$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007895
Matthias Kloseb159a552010-04-25 21:00:44 +00007896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007897$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007898
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007899else
Matthias Kloseb159a552010-04-25 21:00:44 +00007900
7901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007902$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007903
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007905rm -f core conftest.err conftest.$ac_objext \
7906 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007907 *) ;;
7908esac
7909
Guido van Rossum70c7f481998-03-26 18:44:10 +00007910# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7912$as_echo_n "checking for t_open in -lnsl... " >&6; }
7913if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
7914 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007915else
Martin v. Löwis11437992002-04-12 09:54:03 +00007916 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007917LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007919/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007920
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007921/* Override any GCC internal prototype to avoid an error.
7922 Use char because int might match the return type of a GCC
7923 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007924#ifdef __cplusplus
7925extern "C"
7926#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007927char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007928int
7929main ()
7930{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007931return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007932 ;
7933 return 0;
7934}
7935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007936if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007937 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007938else
Matthias Kloseb9621712010-04-24 17:59:49 +00007939 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007941rm -f core conftest.err conftest.$ac_objext \
7942 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007943LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007944fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
7946$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
7947if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007948 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007949fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00007950 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00007951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
7952$as_echo_n "checking for socket in -lsocket... " >&6; }
7953if test "${ac_cv_lib_socket_socket+set}" = set; then :
7954 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007955else
Martin v. Löwis11437992002-04-12 09:54:03 +00007956 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007957LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007959/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007960
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007961/* Override any GCC internal prototype to avoid an error.
7962 Use char because int might match the return type of a GCC
7963 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007964#ifdef __cplusplus
7965extern "C"
7966#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007967char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007968int
7969main ()
7970{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007971return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007972 ;
7973 return 0;
7974}
7975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007976if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007977 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007978else
Matthias Kloseb9621712010-04-24 17:59:49 +00007979 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007980fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007981rm -f core conftest.err conftest.$ac_objext \
7982 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007983LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007984fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
7986$as_echo "$ac_cv_lib_socket_socket" >&6; }
7987if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00007988 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00007989fi
7990 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00007991
Matthias Kloseb9621712010-04-24 17:59:49 +00007992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
7993$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007994
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007995# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00007996if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007997 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00007998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
7999$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008000LIBS="$withval $LIBS"
8001
8002else
Matthias Kloseb9621712010-04-24 17:59:49 +00008003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8004$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008005fi
8006
Guido van Rossum7f43da71994-08-01 12:15:30 +00008007
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008008if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008009 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8010set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8012$as_echo_n "checking for $ac_word... " >&6; }
8013if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8014 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008015else
8016 case $PKG_CONFIG in
8017 [\\/]* | ?:[\\/]*)
8018 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8019 ;;
8020 *)
8021 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8022for as_dir in $PATH
8023do
8024 IFS=$as_save_IFS
8025 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008026 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008027 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8028 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008029 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008030 break 2
8031 fi
8032done
Matthias Kloseb9621712010-04-24 17:59:49 +00008033 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008034IFS=$as_save_IFS
8035
8036 ;;
8037esac
8038fi
8039PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8040if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8042$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008043else
Matthias Kloseb9621712010-04-24 17:59:49 +00008044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8045$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008046fi
8047
8048
8049fi
8050if test -z "$ac_cv_path_PKG_CONFIG"; then
8051 ac_pt_PKG_CONFIG=$PKG_CONFIG
8052 # Extract the first word of "pkg-config", so it can be a program name with args.
8053set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8055$as_echo_n "checking for $ac_word... " >&6; }
8056if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
8057 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008058else
8059 case $ac_pt_PKG_CONFIG in
8060 [\\/]* | ?:[\\/]*)
8061 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8062 ;;
8063 *)
8064 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8065for as_dir in $PATH
8066do
8067 IFS=$as_save_IFS
8068 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008069 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008070 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8071 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008072 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008073 break 2
8074 fi
8075done
Matthias Kloseb9621712010-04-24 17:59:49 +00008076 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008077IFS=$as_save_IFS
8078
8079 ;;
8080esac
8081fi
8082ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8083if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8085$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008086else
Matthias Kloseb9621712010-04-24 17:59:49 +00008087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8088$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008089fi
8090
8091 if test "x$ac_pt_PKG_CONFIG" = x; then
8092 PKG_CONFIG=""
8093 else
8094 case $cross_compiling:$ac_tool_warned in
8095yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008096{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8097$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008098ac_tool_warned=yes ;;
8099esac
8100 PKG_CONFIG=$ac_pt_PKG_CONFIG
8101 fi
8102else
8103 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8104fi
8105
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008106
8107# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8109$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008110
8111# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008112if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008113 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008114else
8115 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008116fi
8117
8118
Matthias Kloseb9621712010-04-24 17:59:49 +00008119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8120$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008121
8122# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8124$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008125
8126# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008127if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008128 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008129else
8130 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008131fi
8132
8133
8134if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008135 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8136else
8137 LIBFFI_INCLUDEDIR=""
8138fi
8139
8140
Matthias Kloseb9621712010-04-24 17:59:49 +00008141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8142$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008143
Matthias Klose55708cc2009-04-30 08:06:49 +00008144# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8146$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008147
8148# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008149if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008150 withval=$with_dbmliborder;
8151if test x$with_dbmliborder = xyes
8152then
Benjamin Peterson79263252010-10-31 16:50:44 +00008153as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008154else
8155 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8156 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8157 then
Benjamin Peterson79263252010-10-31 16:50:44 +00008158 as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008159 fi
8160 done
8161fi
8162fi
8163
Matthias Kloseb9621712010-04-24 17:59:49 +00008164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8165$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008166
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008167# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008168
8169
Matthias Kloseb9621712010-04-24 17:59:49 +00008170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8171$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008172
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008173# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008174if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008175 withval=$with_signal_module;
8176fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008177
8178
8179if test -z "$with_signal_module"
8180then with_signal_module="yes"
8181fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8183$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008184
8185if test "${with_signal_module}" = "yes"; then
8186 USE_SIGNAL_MODULE=""
8187 SIGNAL_OBJS=""
8188else
8189 USE_SIGNAL_MODULE="#"
8190 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8191fi
8192
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008193# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008194
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008195USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008196
Matthias Kloseb9621712010-04-24 17:59:49 +00008197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8198$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008199
Guido van Rossumec2f0731997-01-22 20:54:01 +00008200
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008201# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008202if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008203 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8205$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008206LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008207if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008208 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008209fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008210else
Matthias Kloseb9621712010-04-24 17:59:49 +00008211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8212$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008213fi
8214
Martin v. Löwis11437992002-04-12 09:54:03 +00008215
8216# Templates for things AC_DEFINEd more than once.
8217# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008218
8219
Martin v. Löwis11437992002-04-12 09:54:03 +00008220
8221
Matthias Kloseb9621712010-04-24 17:59:49 +00008222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8223$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008224
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008225# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008226if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008227 withval=$with_threads;
8228fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008229
8230
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008231# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008232
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008233# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008234if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008235 withval=$with_thread; with_threads=$with_thread
8236fi
8237
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008238
8239if test -z "$with_threads"
8240then with_threads="yes"
8241fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8243$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008244
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008245
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008246if test "$with_threads" = "no"
8247then
8248 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008249elif test "$ac_cv_pthread_is_default" = yes
8250then
Matthias Kloseb9621712010-04-24 17:59:49 +00008251 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008252
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008253 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008254 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008255
8256 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008257 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008258elif test "$ac_cv_kpthread" = "yes"
8259then
8260 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008261 if test "$ac_cv_cxx_thread" = "yes"; then
8262 CXX="$CXX -Kpthread"
8263 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008264 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008265
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008266 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008267 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008268elif test "$ac_cv_kthread" = "yes"
8269then
8270 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008271 if test "$ac_cv_cxx_thread" = "yes"; then
8272 CXX="$CXX -Kthread"
8273 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008274 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008275
8276 posix_threads=yes
8277 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008278elif test "$ac_cv_pthread" = "yes"
8279then
8280 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008281 if test "$ac_cv_cxx_thread" = "yes"; then
8282 CXX="$CXX -pthread"
8283 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008284 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008285
8286 posix_threads=yes
8287 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008288else
8289 if test ! -z "$with_threads" -a -d "$with_threads"
8290 then LDFLAGS="$LDFLAGS -L$with_threads"
8291 fi
8292 if test ! -z "$withval" -a -d "$withval"
8293 then LDFLAGS="$LDFLAGS -L$withval"
8294 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008295
8296 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008297 # define _POSIX_THREADS in unistd.h. Some apparently don't
8298 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8300$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008302/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008303
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008304#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008305#ifdef _POSIX_THREADS
8306yes
8307#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008308
8309_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008310if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008311 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008312 unistd_defines_pthreads=yes
8313else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008314 unistd_defines_pthreads=no
8315fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008316rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008317
Matthias Kloseb9621712010-04-24 17:59:49 +00008318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8319$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008320
Matthias Kloseb9621712010-04-24 17:59:49 +00008321 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008322
Matthias Kloseb9621712010-04-24 17:59:49 +00008323 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
8324if test "x$ac_cv_header_cthreads_h" = x""yes; then :
8325 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008326
Matthias Kloseb9621712010-04-24 17:59:49 +00008327 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008328
Martin v. Löwis11437992002-04-12 09:54:03 +00008329
Matthias Kloseb9621712010-04-24 17:59:49 +00008330$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008331
8332 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008333 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008334else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008335
Matthias Kloseb9621712010-04-24 17:59:49 +00008336 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
8337if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
8338 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008339
Matthias Kloseb9621712010-04-24 17:59:49 +00008340 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008341
Martin v. Löwis11437992002-04-12 09:54:03 +00008342
Matthias Kloseb9621712010-04-24 17:59:49 +00008343$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008344
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008345 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008346else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008347
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008348 # Just looking for pthread_create in libpthread is not enough:
8349 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8350 # So we really have to include pthread.h, and then link.
8351 _libs=$LIBS
8352 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8354$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008356/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008357#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008358
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008359void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008360int
8361main ()
8362{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008363
8364pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008365 ;
8366 return 0;
8367}
8368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008369if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008370
Matthias Kloseb9621712010-04-24 17:59:49 +00008371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8372$as_echo "yes" >&6; }
8373 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008374
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008375 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008376 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008377else
Martin v. Löwis11437992002-04-12 09:54:03 +00008378
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008379 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008380 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
8381if test "x$ac_cv_func_pthread_detach" = x""yes; then :
8382 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008383
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008384 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008385 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008386else
Guido van Rossumad678af1998-10-02 14:42:15 +00008387
Matthias Kloseb9621712010-04-24 17:59:49 +00008388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8389$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
8390if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
8391 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008392else
Martin v. Löwis11437992002-04-12 09:54:03 +00008393 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008394LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008395cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008396/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008397
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008398/* Override any GCC internal prototype to avoid an error.
8399 Use char because int might match the return type of a GCC
8400 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008401#ifdef __cplusplus
8402extern "C"
8403#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008404char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008405int
8406main ()
8407{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008408return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008409 ;
8410 return 0;
8411}
8412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008413if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008414 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008415else
Matthias Kloseb9621712010-04-24 17:59:49 +00008416 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008417fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008418rm -f core conftest.err conftest.$ac_objext \
8419 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008420LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008421fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8423$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
8424if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
8425 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008426
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008427 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008428 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008429 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008430else
Greg Steinadf63d62000-07-05 10:38:09 +00008431
Matthias Kloseb9621712010-04-24 17:59:49 +00008432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8433$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
8434if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
8435 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008436else
Martin v. Löwis11437992002-04-12 09:54:03 +00008437 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008438LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008440/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008441
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008442/* Override any GCC internal prototype to avoid an error.
8443 Use char because int might match the return type of a GCC
8444 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008445#ifdef __cplusplus
8446extern "C"
8447#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008448char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008449int
8450main ()
8451{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008452return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008453 ;
8454 return 0;
8455}
8456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008457if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008458 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008459else
Matthias Kloseb9621712010-04-24 17:59:49 +00008460 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008461fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008462rm -f core conftest.err conftest.$ac_objext \
8463 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008464LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008465fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8467$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
8468if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
8469 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008470
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008471 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008472 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008473 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008474else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008475
Matthias Kloseb9621712010-04-24 17:59:49 +00008476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8477$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
8478if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
8479 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008480else
Martin v. Löwis11437992002-04-12 09:54:03 +00008481 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008482LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008484/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008485
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008486/* Override any GCC internal prototype to avoid an error.
8487 Use char because int might match the return type of a GCC
8488 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008489#ifdef __cplusplus
8490extern "C"
8491#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008492char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008493int
8494main ()
8495{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008496return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008497 ;
8498 return 0;
8499}
8500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008501if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008502 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008503else
Matthias Kloseb9621712010-04-24 17:59:49 +00008504 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008505fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008506rm -f core conftest.err conftest.$ac_objext \
8507 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008508LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008509fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8511$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
8512if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
8513 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008514
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008515 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008516 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008517 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008518else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008519
Matthias Kloseb9621712010-04-24 17:59:49 +00008520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8521$as_echo_n "checking for pthread_create in -lcma... " >&6; }
8522if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
8523 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008524else
Martin v. Löwis11437992002-04-12 09:54:03 +00008525 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008526LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008528/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008529
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008530/* Override any GCC internal prototype to avoid an error.
8531 Use char because int might match the return type of a GCC
8532 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008533#ifdef __cplusplus
8534extern "C"
8535#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008536char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008537int
8538main ()
8539{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008540return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008541 ;
8542 return 0;
8543}
8544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008545if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008546 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008547else
Matthias Kloseb9621712010-04-24 17:59:49 +00008548 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008549fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008550rm -f core conftest.err conftest.$ac_objext \
8551 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008552LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008553fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8555$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
8556if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
8557 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008558
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008559 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008560 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008561 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008562else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008563
Martin v. Löwis130fb172001-07-19 11:00:41 +00008564 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008565fi
8566
Guido van Rossum627b2d71993-12-24 10:39:16 +00008567
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008568fi
8569
Guido van Rossum0be3e491997-05-22 20:33:33 +00008570fi
8571
Guido van Rossum49545951997-12-02 19:28:29 +00008572fi
8573
Guido van Rossumb93a8621998-05-07 13:27:32 +00008574fi
8575
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008577rm -f core conftest.err conftest.$ac_objext \
8578 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008579fi
8580
Martin v. Löwis11437992002-04-12 09:54:03 +00008581
8582fi
8583
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008584
Michael W. Hudson54241132001-12-07 15:38:26 +00008585
Matthias Kloseb9621712010-04-24 17:59:49 +00008586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8587$as_echo_n "checking for usconfig in -lmpc... " >&6; }
8588if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
8589 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008590else
Martin v. Löwis11437992002-04-12 09:54:03 +00008591 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008592LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008594/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008595
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008596/* Override any GCC internal prototype to avoid an error.
8597 Use char because int might match the return type of a GCC
8598 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008599#ifdef __cplusplus
8600extern "C"
8601#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008602char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008603int
8604main ()
8605{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008606return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008607 ;
8608 return 0;
8609}
8610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008611if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008612 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008613else
Matthias Kloseb9621712010-04-24 17:59:49 +00008614 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008615fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008616rm -f core conftest.err conftest.$ac_objext \
8617 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008618LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008619fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8621$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
8622if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
8623 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008624
Martin v. Löwis130fb172001-07-19 11:00:41 +00008625 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008626 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008627 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008628fi
8629
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008630
Neal Norwitza978ab02002-11-02 16:58:05 +00008631 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8633$as_echo_n "checking for thr_create in -lthread... " >&6; }
8634if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
8635 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008636else
Martin v. Löwis11437992002-04-12 09:54:03 +00008637 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008638LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008639cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008640/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008641
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008642/* Override any GCC internal prototype to avoid an error.
8643 Use char because int might match the return type of a GCC
8644 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008645#ifdef __cplusplus
8646extern "C"
8647#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008648char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008649int
8650main ()
8651{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008652return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008653 ;
8654 return 0;
8655}
8656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008657if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008658 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008659else
Matthias Kloseb9621712010-04-24 17:59:49 +00008660 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008661fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008662rm -f core conftest.err conftest.$ac_objext \
8663 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008664LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8667$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
8668if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
8669 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008670
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008671 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008672 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008673 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008674fi
8675
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008676 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008677
Martin v. Löwis130fb172001-07-19 11:00:41 +00008678 if test "$USE_THREAD_MODULE" != "#"
8679 then
8680 # If the above checks didn't disable threads, (at least) OSF1
8681 # needs this '-threads' argument during linking.
8682 case $ac_sys_system in
8683 OSF1) LDLAST=-threads;;
8684 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008685 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008686fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008687
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008688if test "$posix_threads" = "yes"; then
8689 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008690
Matthias Kloseb9621712010-04-24 17:59:49 +00008691$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008692
8693 fi
8694
8695 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8696 case $ac_sys_system/$ac_sys_release in
8697 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008698$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008699
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008700 ;;
8701 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008702$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008703
8704 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008705 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008706$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008707
8708 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008709 AIX/6)
8710$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8711
8712 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008713 esac
8714
Matthias Kloseb9621712010-04-24 17:59:49 +00008715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8716$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
8717 if test "${ac_cv_pthread_system_supported+set}" = set; then :
8718 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008719else
Matthias Kloseb9621712010-04-24 17:59:49 +00008720 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008721 ac_cv_pthread_system_supported=no
8722else
Matthias Kloseb9621712010-04-24 17:59:49 +00008723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008724/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008725#include <pthread.h>
8726 void *foo(void *parm) {
8727 return NULL;
8728 }
8729 main() {
8730 pthread_attr_t attr;
8731 pthread_t id;
8732 if (pthread_attr_init(&attr)) exit(-1);
8733 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8734 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8735 exit(0);
8736 }
8737_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008738if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008739 ac_cv_pthread_system_supported=yes
8740else
Matthias Kloseb9621712010-04-24 17:59:49 +00008741 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008743rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8744 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008745fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008746
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008747
Guido van Rossum627b2d71993-12-24 10:39:16 +00008748fi
8749
Matthias Kloseb9621712010-04-24 17:59:49 +00008750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8751$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008752 if test "$ac_cv_pthread_system_supported" = "yes"; then
8753
Matthias Kloseb9621712010-04-24 17:59:49 +00008754$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008755
8756 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008757 for ac_func in pthread_sigmask
8758do :
8759 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
8760if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008761 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008762#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008763_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008764 case $ac_sys_system in
8765 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008766
Matthias Kloseb9621712010-04-24 17:59:49 +00008767$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008768
8769 ;;
8770 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008771fi
8772done
8773
8774fi
8775
8776
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008777# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008778
Matthias Kloseb9621712010-04-24 17:59:49 +00008779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8780$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008781# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008782if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008783 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008784 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8786$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008787 ipv6=no
8788 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008789 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8790$as_echo "yes" >&6; }
8791 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008792
8793 ipv6=yes
8794 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008795 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008796else
Martin v. Löwis11437992002-04-12 09:54:03 +00008797
Matthias Kloseb9621712010-04-24 17:59:49 +00008798 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008799
Matthias Kloseb9621712010-04-24 17:59:49 +00008800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8801$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008802 ipv6=no
8803
8804else
Matthias Kloseb9621712010-04-24 17:59:49 +00008805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008806/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008807 /* AF_INET6 available check */
8808#include <sys/types.h>
8809#include <sys/socket.h>
8810main()
8811{
8812 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8813 exit(1);
8814 else
8815 exit(0);
8816}
8817
Martin v. Löwis11437992002-04-12 09:54:03 +00008818_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008819if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008820
Matthias Kloseb9621712010-04-24 17:59:49 +00008821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8822$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008823 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008824
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008825else
Matthias Kloseb159a552010-04-25 21:00:44 +00008826
Matthias Kloseb9621712010-04-24 17:59:49 +00008827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8828$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008829 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008830
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008831fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008832rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8833 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008834fi
8835
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008836
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008837if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8839$as_echo_n "checking if RFC2553 API is available... " >&6; }
8840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008841/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008842
8843 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008844#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008845int
8846main ()
8847{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008848struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008849 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008850 ;
8851 return 0;
8852}
Matthias Kloseb159a552010-04-25 21:00:44 +00008853
Martin v. Löwis11437992002-04-12 09:54:03 +00008854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008855if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008856
8857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008858$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008859 ipv6=yes
8860
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008861else
Matthias Kloseb159a552010-04-25 21:00:44 +00008862
8863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008864$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008865 ipv6=no
8866
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008869fi
8870
8871if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008872 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008873
8874fi
8875
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008876fi
8877
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008878
8879ipv6type=unknown
8880ipv6lib=none
8881ipv6trylibc=no
8882
8883if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8885$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008886 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8887 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008888 case $i in
8889 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008891/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008892
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008893#include <netinet/in.h>
8894#ifdef IPV6_INRIA_VERSION
8895yes
8896#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008897_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008898if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008899 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008900 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008901fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008902rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008903
8904 ;;
8905 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008907/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008908
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008909#include <netinet/in.h>
8910#ifdef __KAME__
8911yes
8912#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008913_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008914if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008915 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008916 ipv6type=$i;
8917 ipv6lib=inet6
8918 ipv6libdir=/usr/local/v6/lib
8919 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008920fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008921rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008922
8923 ;;
8924 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008926/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008927
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008928#include <features.h>
8929#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
8930yes
8931#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008932_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008933if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008934 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008935 ipv6type=$i;
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-inet6)
8942 if test -d /usr/inet6; then
8943 ipv6type=$i
8944 ipv6lib=inet6
8945 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00008946 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008947 fi
8948 ;;
8949 solaris)
8950 if test -f /etc/netconfig; then
8951 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
8952 ipv6type=$i
8953 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008954 fi
8955 fi
8956 ;;
8957 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00008958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008959/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008960
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008961#include <sys/param.h>
8962#ifdef _TOSHIBA_INET6
8963yes
8964#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008965_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008966if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008967 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008968 ipv6type=$i;
8969 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008970 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008971fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008972rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008973
8974 ;;
8975 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00008976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008977/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008978
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008979#include </usr/local/v6/include/sys/v6config.h>
8980#ifdef __V6D__
8981yes
8982#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008983_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008984if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008985 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008986 ipv6type=$i;
8987 ipv6lib=v6;
8988 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00008989 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008990fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008991rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008992
8993 ;;
8994 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00008995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008996/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008997
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008998#include <sys/param.h>
8999#ifdef _ZETA_MINAMI_INET6
9000yes
9001#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009002_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009003if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009004 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009005 ipv6type=$i;
9006 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009007 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009008fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009009rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009010
9011 ;;
9012 esac
9013 if test "$ipv6type" != "unknown"; then
9014 break
9015 fi
9016 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9018$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009019fi
9020
9021if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9022 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9023 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9024 echo "using lib$ipv6lib"
9025 else
9026 if test $ipv6trylibc = "yes"; then
9027 echo "using libc"
9028 else
9029 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9030 echo "You need to fetch lib$ipv6lib.a from appropriate"
9031 echo 'ipv6 kit and compile beforehand.'
9032 exit 1
9033 fi
9034 fi
9035fi
9036
Matthias Kloseb9621712010-04-24 17:59:49 +00009037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9038$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009040/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009041
9042 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009043int
9044main ()
9045{
9046FSIORefNum fRef = 0
9047 ;
9048 return 0;
9049}
Matthias Kloseb159a552010-04-25 21:00:44 +00009050
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009052if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009053
Matthias Kloseb159a552010-04-25 21:00:44 +00009054
Matthias Kloseb9621712010-04-24 17:59:49 +00009055$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009056
Matthias Kloseb9621712010-04-24 17:59:49 +00009057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9058$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009059
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009060else
Matthias Kloseb159a552010-04-25 21:00:44 +00009061
Matthias Kloseb9621712010-04-24 17:59:49 +00009062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9063$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009064
9065fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9067
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009068# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9070$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009071
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009072# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009073if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009074 withval=$with_doc_strings;
9075fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009076
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009077
9078if test -z "$with_doc_strings"
9079then with_doc_strings="yes"
9080fi
9081if test "$with_doc_strings" != "no"
9082then
9083
Matthias Kloseb9621712010-04-24 17:59:49 +00009084$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009085
9086fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9088$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009089
Antoine Pitrou042b1282010-08-13 21:15:58 +00009090# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9092$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009093
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009094# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009095if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009096 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009097if test "$withval" != no
9098then
9099
Matthias Kloseb9621712010-04-24 17:59:49 +00009100$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009101
Matthias Kloseb9621712010-04-24 17:59:49 +00009102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9103$as_echo "yes" >&6; }
9104else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9105$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009106fi
9107else
Matthias Kloseb9621712010-04-24 17:59:49 +00009108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9109$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009110fi
9111
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009112
9113# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9115$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009116
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009117# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009118if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009119 withval=$with_pymalloc;
9120fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009121
Neil Schemenauera35c6882001-02-27 04:45:05 +00009122
Neil Schemenauer16c22972002-03-22 15:34:49 +00009123if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009124then
9125 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009126 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009127fi
9128if test "$with_pymalloc" != "no"
9129then
Martin v. Löwis11437992002-04-12 09:54:03 +00009130
Matthias Kloseb9621712010-04-24 17:59:49 +00009131$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009132
9133fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9135$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009136
Benjamin Peterson05159c42009-12-03 03:01:27 +00009137# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9139$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009140
9141# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009142if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009143 withval=$with_valgrind;
9144else
9145 with_valgrind=no
9146fi
9147
Matthias Kloseb9621712010-04-24 17:59:49 +00009148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9149$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009150if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009151 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
9152if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009153
Matthias Kloseb9621712010-04-24 17:59:49 +00009154$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009155
9156else
Benjamin Peterson79263252010-10-31 16:50:44 +00009157 as_fn_error "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009158
9159fi
9160
9161
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009162 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009163fi
9164
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009165# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009166
Guido van Rossum98935bf2001-09-05 19:13:16 +00009167DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009168
Guido van Rossume97ee181999-12-20 21:27:22 +00009169# the dlopen() function means we might want to use dynload_shlib.o. some
9170# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009171for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009172do :
9173 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
9174if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009175 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009176#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009177_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009178
Guido van Rossume97ee181999-12-20 21:27:22 +00009179fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009180done
Guido van Rossume97ee181999-12-20 21:27:22 +00009181
Michael W. Hudson54241132001-12-07 15:38:26 +00009182
Guido van Rossume97ee181999-12-20 21:27:22 +00009183# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9184# loading of modules.
9185
Matthias Kloseb9621712010-04-24 17:59:49 +00009186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9187$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009188if test -z "$DYNLOADFILE"
9189then
9190 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009191 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9192 if test "$ac_cv_func_dlopen" = yes
9193 then DYNLOADFILE="dynload_shlib.o"
9194 else DYNLOADFILE="dynload_aix.o"
9195 fi
9196 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009197 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009198 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9199 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009200 *)
9201 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9202 # out any dynamic loading
9203 if test "$ac_cv_func_dlopen" = yes
9204 then DYNLOADFILE="dynload_shlib.o"
9205 else DYNLOADFILE="dynload_stub.o"
9206 fi
9207 ;;
9208 esac
9209fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9211$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009212if test "$DYNLOADFILE" != "dynload_stub.o"
9213then
Martin v. Löwis11437992002-04-12 09:54:03 +00009214
Matthias Kloseb9621712010-04-24 17:59:49 +00009215$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009216
9217fi
9218
Neil Schemenauer4e425612001-06-19 15:44:15 +00009219# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9220
Michael W. Hudson54241132001-12-07 15:38:26 +00009221
Matthias Kloseb9621712010-04-24 17:59:49 +00009222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9223$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009224if test -z "$MACHDEP_OBJS"
9225then
Jack Jansene578a632001-08-15 01:27:14 +00009226 MACHDEP_OBJS=$extra_machdep_objs
9227else
9228 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009229fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9231$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009232
Guido van Rossum627b2d71993-12-24 10:39:16 +00009233# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009234for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Martin v. Löwis823725e2008-03-24 13:39:54 +00009235 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009236 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009237 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009238 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009239 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009240 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009241 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9242 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009243 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009244 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009245 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009246 truncate uname unsetenv utimes waitpid wait3 wait4 \
9247 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009248do :
9249 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9250ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Peterson79263252010-10-31 16:50:44 +00009251eval as_val=\$$as_ac_var
9252 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009253 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009254#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009255_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009256
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009257fi
9258done
9259
Michael W. Hudson54241132001-12-07 15:38:26 +00009260
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009261# For some functions, having a definition is not sufficient, since
9262# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9264$as_echo_n "checking for chroot... " >&6; }
9265cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009266/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009267#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009268int
9269main ()
9270{
9271void *x=chroot
9272 ;
9273 return 0;
9274}
9275_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009276if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009277
Matthias Kloseb9621712010-04-24 17:59:49 +00009278$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009279
Matthias Kloseb159a552010-04-25 21:00:44 +00009280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009281$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009282else
Matthias Kloseb9621712010-04-24 17:59:49 +00009283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9284$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009285
9286fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9289$as_echo_n "checking for link... " >&6; }
9290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009291/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009292#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009293int
9294main ()
9295{
9296void *x=link
9297 ;
9298 return 0;
9299}
9300_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009301if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009302
Matthias Kloseb9621712010-04-24 17:59:49 +00009303$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009304
Matthias Kloseb159a552010-04-25 21:00:44 +00009305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009306$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009307else
Matthias Kloseb9621712010-04-24 17:59:49 +00009308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9309$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009310
9311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9314$as_echo_n "checking for symlink... " >&6; }
9315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009316/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009317#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009318int
9319main ()
9320{
9321void *x=symlink
9322 ;
9323 return 0;
9324}
9325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009326if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009327
Matthias Kloseb9621712010-04-24 17:59:49 +00009328$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009329
Matthias Kloseb159a552010-04-25 21:00:44 +00009330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009331$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009332else
Matthias Kloseb9621712010-04-24 17:59:49 +00009333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9334$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009335
9336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9339$as_echo_n "checking for fchdir... " >&6; }
9340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009341/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009342#include <unistd.h>
9343int
9344main ()
9345{
9346void *x=fchdir
9347 ;
9348 return 0;
9349}
9350_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009351if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009352
Matthias Kloseb9621712010-04-24 17:59:49 +00009353$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009354
Matthias Kloseb159a552010-04-25 21:00:44 +00009355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009356$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009357else
Matthias Kloseb9621712010-04-24 17:59:49 +00009358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9359$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009360
9361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9364$as_echo_n "checking for fsync... " >&6; }
9365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009366/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009367#include <unistd.h>
9368int
9369main ()
9370{
9371void *x=fsync
9372 ;
9373 return 0;
9374}
9375_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009376if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009377
Matthias Kloseb9621712010-04-24 17:59:49 +00009378$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009379
Matthias Kloseb159a552010-04-25 21:00:44 +00009380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009381$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009382else
Matthias Kloseb9621712010-04-24 17:59:49 +00009383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9384$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009385
9386fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9389$as_echo_n "checking for fdatasync... " >&6; }
9390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009391/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009392#include <unistd.h>
9393int
9394main ()
9395{
9396void *x=fdatasync
9397 ;
9398 return 0;
9399}
9400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009401if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009402
Matthias Kloseb9621712010-04-24 17:59:49 +00009403$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009404
Matthias Kloseb159a552010-04-25 21:00:44 +00009405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009406$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009407else
Matthias Kloseb9621712010-04-24 17:59:49 +00009408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9409$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009410
9411fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9414$as_echo_n "checking for epoll... " >&6; }
9415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009416/* end confdefs.h. */
9417#include <sys/epoll.h>
9418int
9419main ()
9420{
9421void *x=epoll_create
9422 ;
9423 return 0;
9424}
9425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009426if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009427
Matthias Kloseb9621712010-04-24 17:59:49 +00009428$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009429
Matthias Kloseb159a552010-04-25 21:00:44 +00009430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009431$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009432else
Matthias Kloseb9621712010-04-24 17:59:49 +00009433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9434$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009435
9436fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9439$as_echo_n "checking for kqueue... " >&6; }
9440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009441/* end confdefs.h. */
9442
9443#include <sys/types.h>
9444#include <sys/event.h>
9445
9446int
9447main ()
9448{
9449int x=kqueue()
9450 ;
9451 return 0;
9452}
9453_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009454if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009455
Matthias Kloseb9621712010-04-24 17:59:49 +00009456$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009457
Matthias Kloseb159a552010-04-25 21:00:44 +00009458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009459$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009460else
Matthias Kloseb9621712010-04-24 17:59:49 +00009461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9462$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009463
9464fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009466# On some systems (eg. FreeBSD 5), we would find a definition of the
9467# functions ctermid_r, setgroups in the library, but no prototype
9468# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9469# address to avoid compiler warnings and potential miscompilations
9470# because of the missing prototypes.
9471
Matthias Kloseb9621712010-04-24 17:59:49 +00009472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9473$as_echo_n "checking for ctermid_r... " >&6; }
9474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009475/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009476
Martin v. Löwisd5843682002-11-21 20:41:28 +00009477#include <stdio.h>
9478
Martin v. Löwisd5843682002-11-21 20:41:28 +00009479int
9480main ()
9481{
9482void* p = ctermid_r
9483 ;
9484 return 0;
9485}
9486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009487if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009488
Matthias Kloseb9621712010-04-24 17:59:49 +00009489$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009490
Matthias Kloseb159a552010-04-25 21:00:44 +00009491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009492$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009493else
Matthias Kloseb9621712010-04-24 17:59:49 +00009494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9495$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009496
9497fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9499
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9501$as_echo_n "checking for flock declaration... " >&6; }
9502if test "${ac_cv_flock_decl+set}" = set; then :
9503 $as_echo_n "(cached) " >&6
9504else
9505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009506/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009507#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009508int
9509main ()
9510{
9511void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009512
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009513 ;
9514 return 0;
9515}
9516_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009517if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009518 ac_cv_flock_decl=yes
9519else
9520 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009521
9522fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009524
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009525fi
9526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9527$as_echo "$ac_cv_flock_decl" >&6; }
9528if test "x${ac_cv_flock_decl}" = xyes; then
9529 for ac_func in flock
9530do :
9531 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
9532if test "x$ac_cv_func_flock" = x""yes; then :
9533 cat >>confdefs.h <<_ACEOF
9534#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009535_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009536
Antoine Pitroua3000072010-09-07 14:52:42 +00009537else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009539$as_echo_n "checking for flock in -lbsd... " >&6; }
9540if test "${ac_cv_lib_bsd_flock+set}" = set; then :
9541 $as_echo_n "(cached) " >&6
9542else
9543 ac_check_lib_save_LIBS=$LIBS
9544LIBS="-lbsd $LIBS"
9545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9546/* end confdefs.h. */
9547
9548/* Override any GCC internal prototype to avoid an error.
9549 Use char because int might match the return type of a GCC
9550 builtin and then its argument prototype would still apply. */
9551#ifdef __cplusplus
9552extern "C"
9553#endif
9554char flock ();
9555int
9556main ()
9557{
9558return flock ();
9559 ;
9560 return 0;
9561}
9562_ACEOF
9563if ac_fn_c_try_link "$LINENO"; then :
9564 ac_cv_lib_bsd_flock=yes
9565else
9566 ac_cv_lib_bsd_flock=no
9567fi
9568rm -f core conftest.err conftest.$ac_objext \
9569 conftest$ac_exeext conftest.$ac_ext
9570LIBS=$ac_check_lib_save_LIBS
9571fi
9572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9573$as_echo "$ac_cv_lib_bsd_flock" >&6; }
9574if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009575 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009576
9577
9578$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9579
9580
9581fi
9582
9583
9584fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009585done
9586
Antoine Pitroua3000072010-09-07 14:52:42 +00009587fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009588
Matthias Kloseb9621712010-04-24 17:59:49 +00009589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9590$as_echo_n "checking for getpagesize... " >&6; }
9591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009592/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009593
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009594#include <unistd.h>
9595
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009596int
9597main ()
9598{
9599void* p = getpagesize
9600 ;
9601 return 0;
9602}
9603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009604if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009605
Matthias Kloseb9621712010-04-24 17:59:49 +00009606$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009607
Matthias Kloseb159a552010-04-25 21:00:44 +00009608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009609$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009610else
Matthias Kloseb9621712010-04-24 17:59:49 +00009611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9612$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009613
9614fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009616
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009617for ac_prog in true
9618do
9619 # Extract the first word of "$ac_prog", so it can be a program name with args.
9620set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9622$as_echo_n "checking for $ac_word... " >&6; }
9623if test "${ac_cv_prog_TRUE+set}" = set; then :
9624 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009625else
9626 if test -n "$TRUE"; then
9627 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9628else
9629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9630for as_dir in $PATH
9631do
9632 IFS=$as_save_IFS
9633 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009634 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009635 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 +00009636 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009637 $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 +00009638 break 2
9639 fi
9640done
Matthias Kloseb9621712010-04-24 17:59:49 +00009641 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009642IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009643
9644fi
9645fi
9646TRUE=$ac_cv_prog_TRUE
9647if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9649$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009650else
Matthias Kloseb9621712010-04-24 17:59:49 +00009651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9652$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009653fi
9654
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009655
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009656 test -n "$TRUE" && break
9657done
9658test -n "$TRUE" || TRUE="/bin/true"
9659
9660
Matthias Kloseb9621712010-04-24 17:59:49 +00009661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9662$as_echo_n "checking for inet_aton in -lc... " >&6; }
9663if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
9664 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009665else
9666 ac_check_lib_save_LIBS=$LIBS
9667LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009669/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009670
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009671/* Override any GCC internal prototype to avoid an error.
9672 Use char because int might match the return type of a GCC
9673 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009674#ifdef __cplusplus
9675extern "C"
9676#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009677char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009678int
9679main ()
9680{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009681return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009682 ;
9683 return 0;
9684}
9685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009686if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009687 ac_cv_lib_c_inet_aton=yes
9688else
Matthias Kloseb9621712010-04-24 17:59:49 +00009689 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009691rm -f core conftest.err conftest.$ac_objext \
9692 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009693LIBS=$ac_check_lib_save_LIBS
9694fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9696$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
9697if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009698 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009699else
Matthias Kloseb9621712010-04-24 17:59:49 +00009700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9701$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
9702if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
9703 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009704else
9705 ac_check_lib_save_LIBS=$LIBS
9706LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009707cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009708/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009709
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009710/* Override any GCC internal prototype to avoid an error.
9711 Use char because int might match the return type of a GCC
9712 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009713#ifdef __cplusplus
9714extern "C"
9715#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009716char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009717int
9718main ()
9719{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009720return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009721 ;
9722 return 0;
9723}
9724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009725if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009726 ac_cv_lib_resolv_inet_aton=yes
9727else
Matthias Kloseb9621712010-04-24 17:59:49 +00009728 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009730rm -f core conftest.err conftest.$ac_objext \
9731 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009732LIBS=$ac_check_lib_save_LIBS
9733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9735$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
9736if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009737 cat >>confdefs.h <<_ACEOF
9738#define HAVE_LIBRESOLV 1
9739_ACEOF
9740
9741 LIBS="-lresolv $LIBS"
9742
9743fi
9744
9745
9746fi
9747
9748
Christian Heimesd0764e22007-12-04 15:00:33 +00009749# On Tru64, chflags seems to be present, but calling it will
9750# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9752$as_echo_n "checking for chflags... " >&6; }
9753if test "${ac_cv_have_chflags+set}" = set; then :
9754 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009755else
Matthias Kloseb9621712010-04-24 17:59:49 +00009756 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009757 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009758else
Matthias Kloseb9621712010-04-24 17:59:49 +00009759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009760/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009761[
Christian Heimesd0764e22007-12-04 15:00:33 +00009762#include <sys/stat.h>
9763#include <unistd.h>
9764int main(int argc, char*argv[])
9765{
9766 if(chflags(argv[0], 0) != 0)
9767 return 1;
9768 return 0;
9769}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009770]
Christian Heimesd0764e22007-12-04 15:00:33 +00009771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009772if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009773 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009774else
Matthias Kloseb9621712010-04-24 17:59:49 +00009775 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9778 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009779fi
9780
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009781
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009782fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9784$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009785if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009786 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
9787if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009788 ac_cv_have_chflags="yes"
9789else
9790 ac_cv_have_chflags="no"
9791fi
9792
9793fi
9794if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009795
Matthias Kloseb9621712010-04-24 17:59:49 +00009796$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009797
9798fi
9799
Matthias Kloseb9621712010-04-24 17:59:49 +00009800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9801$as_echo_n "checking for lchflags... " >&6; }
9802if test "${ac_cv_have_lchflags+set}" = set; then :
9803 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009804else
Matthias Kloseb9621712010-04-24 17:59:49 +00009805 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009806 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009807else
Matthias Kloseb9621712010-04-24 17:59:49 +00009808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009809/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009810[
Christian Heimesd0764e22007-12-04 15:00:33 +00009811#include <sys/stat.h>
9812#include <unistd.h>
9813int main(int argc, char*argv[])
9814{
9815 if(lchflags(argv[0], 0) != 0)
9816 return 1;
9817 return 0;
9818}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009819]
Christian Heimesd0764e22007-12-04 15:00:33 +00009820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009821if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009822 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009823else
Matthias Kloseb9621712010-04-24 17:59:49 +00009824 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009826rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9827 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009828fi
9829
9830
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009831fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9833$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009834if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009835 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
9836if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009837 ac_cv_have_lchflags="yes"
9838else
9839 ac_cv_have_lchflags="no"
9840fi
9841
9842fi
9843if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009844
Matthias Kloseb9621712010-04-24 17:59:49 +00009845$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009846
9847fi
9848
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009849case $ac_sys_system/$ac_sys_release in
9850Darwin/*)
9851 _CUR_CFLAGS="${CFLAGS}"
9852 _CUR_LDFLAGS="${LDFLAGS}"
9853 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9854 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9855 ;;
9856esac
9857
Matthias Kloseb9621712010-04-24 17:59:49 +00009858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9859$as_echo_n "checking for inflateCopy in -lz... " >&6; }
9860if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
9861 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009862else
9863 ac_check_lib_save_LIBS=$LIBS
9864LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009866/* end confdefs.h. */
9867
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009868/* Override any GCC internal prototype to avoid an error.
9869 Use char because int might match the return type of a GCC
9870 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009871#ifdef __cplusplus
9872extern "C"
9873#endif
9874char inflateCopy ();
9875int
9876main ()
9877{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009878return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009879 ;
9880 return 0;
9881}
9882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009883if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009884 ac_cv_lib_z_inflateCopy=yes
9885else
Matthias Kloseb9621712010-04-24 17:59:49 +00009886 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009887fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009888rm -f core conftest.err conftest.$ac_objext \
9889 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009890LIBS=$ac_check_lib_save_LIBS
9891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9893$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
9894if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009895
Matthias Kloseb9621712010-04-24 17:59:49 +00009896$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009897
9898fi
9899
9900
9901case $ac_sys_system/$ac_sys_release in
9902Darwin/*)
9903 CFLAGS="${_CUR_CFLAGS}"
9904 LDFLAGS="${_CUR_LDFLAGS}"
9905 ;;
9906esac
9907
Matthias Kloseb9621712010-04-24 17:59:49 +00009908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9909$as_echo_n "checking for hstrerror... " >&6; }
9910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009911/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009912
Martin v. Löwise9416172003-05-03 10:12:45 +00009913#include <netdb.h>
9914
Martin v. Löwise9416172003-05-03 10:12:45 +00009915int
9916main ()
9917{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009918void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009919 ;
9920 return 0;
9921}
9922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009923if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009924
Matthias Kloseb9621712010-04-24 17:59:49 +00009925$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009926
Matthias Kloseb159a552010-04-25 21:00:44 +00009927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009928$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009929else
Matthias Kloseb9621712010-04-24 17:59:49 +00009930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9931$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009932
9933fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009934rm -f core conftest.err conftest.$ac_objext \
9935 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009936
Matthias Kloseb9621712010-04-24 17:59:49 +00009937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
9938$as_echo_n "checking for inet_aton... " >&6; }
9939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009940/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009941
Martin v. Löwis86d66262006-02-17 08:40:11 +00009942#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009943#include <sys/socket.h>
9944#include <netinet/in.h>
9945#include <arpa/inet.h>
9946
Martin v. Löwise9416172003-05-03 10:12:45 +00009947int
9948main ()
9949{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009950void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009951 ;
9952 return 0;
9953}
9954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009955if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009956
Matthias Kloseb9621712010-04-24 17:59:49 +00009957$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009958
Matthias Kloseb159a552010-04-25 21:00:44 +00009959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009960$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009961else
Matthias Kloseb9621712010-04-24 17:59:49 +00009962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9963$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009964
9965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009966rm -f core conftest.err conftest.$ac_objext \
9967 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009968
Matthias Kloseb9621712010-04-24 17:59:49 +00009969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
9970$as_echo_n "checking for inet_pton... " >&6; }
9971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009972/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009973
Martin v. Löwisf2e488d2003-05-05 22:00:11 +00009974#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009975#include <sys/socket.h>
9976#include <netinet/in.h>
9977#include <arpa/inet.h>
9978
Martin v. Löwise9416172003-05-03 10:12:45 +00009979int
9980main ()
9981{
9982void* p = inet_pton
9983 ;
9984 return 0;
9985}
9986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009987if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009988
Matthias Kloseb9621712010-04-24 17:59:49 +00009989$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009990
Matthias Kloseb159a552010-04-25 21:00:44 +00009991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009992$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009993else
Matthias Kloseb9621712010-04-24 17:59:49 +00009994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9995$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009996
9997fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +00009999
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010000# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10002$as_echo_n "checking for setgroups... " >&6; }
10003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010004/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010005
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010006#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010007#ifdef HAVE_GRP_H
10008#include <grp.h>
10009#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010010
Martin v. Löwisd5843682002-11-21 20:41:28 +000010011int
10012main ()
10013{
10014void* p = setgroups
10015 ;
10016 return 0;
10017}
10018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010019if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010020
Matthias Kloseb9621712010-04-24 17:59:49 +000010021$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010022
Matthias Kloseb159a552010-04-25 21:00:44 +000010023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010024$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010025else
Matthias Kloseb9621712010-04-24 17:59:49 +000010026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10027$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010028
10029fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010031
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010032# check for openpty and forkpty
10033
10034for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010035do :
10036 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
10037if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010038 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010039#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010040_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010041
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010042else
Matthias Kloseb9621712010-04-24 17:59:49 +000010043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10044$as_echo_n "checking for openpty in -lutil... " >&6; }
10045if test "${ac_cv_lib_util_openpty+set}" = set; then :
10046 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010047else
Martin v. Löwis11437992002-04-12 09:54:03 +000010048 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010049LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010051/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010052
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010053/* Override any GCC internal prototype to avoid an error.
10054 Use char because int might match the return type of a GCC
10055 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010056#ifdef __cplusplus
10057extern "C"
10058#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010059char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010060int
10061main ()
10062{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010063return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010064 ;
10065 return 0;
10066}
10067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010068if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010069 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010070else
Matthias Kloseb9621712010-04-24 17:59:49 +000010071 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010072fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010073rm -f core conftest.err conftest.$ac_objext \
10074 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010075LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010076fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10078$as_echo "$ac_cv_lib_util_openpty" >&6; }
10079if test "x$ac_cv_lib_util_openpty" = x""yes; then :
10080 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010081 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010082else
Matthias Kloseb9621712010-04-24 17:59:49 +000010083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10084$as_echo_n "checking for openpty in -lbsd... " >&6; }
10085if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
10086 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010087else
10088 ac_check_lib_save_LIBS=$LIBS
10089LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010091/* end confdefs.h. */
10092
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010093/* Override any GCC internal prototype to avoid an error.
10094 Use char because int might match the return type of a GCC
10095 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010096#ifdef __cplusplus
10097extern "C"
10098#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010099char openpty ();
10100int
10101main ()
10102{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010103return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010104 ;
10105 return 0;
10106}
10107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010108if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010109 ac_cv_lib_bsd_openpty=yes
10110else
Matthias Kloseb9621712010-04-24 17:59:49 +000010111 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010112fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010113rm -f core conftest.err conftest.$ac_objext \
10114 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010115LIBS=$ac_check_lib_save_LIBS
10116fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10118$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
10119if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
10120 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010121 LIBS="$LIBS -lbsd"
10122fi
10123
10124
10125fi
10126
Fred Drake8cef4cf2000-06-28 16:40:38 +000010127
10128fi
10129done
10130
10131for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010132do :
10133 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
10134if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010135 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010136#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010137_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010138
Fred Drake8cef4cf2000-06-28 16:40:38 +000010139else
Matthias Kloseb9621712010-04-24 17:59:49 +000010140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10141$as_echo_n "checking for forkpty in -lutil... " >&6; }
10142if test "${ac_cv_lib_util_forkpty+set}" = set; then :
10143 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010144else
Martin v. Löwis11437992002-04-12 09:54:03 +000010145 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010146LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010147cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010148/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010149
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010150/* Override any GCC internal prototype to avoid an error.
10151 Use char because int might match the return type of a GCC
10152 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010153#ifdef __cplusplus
10154extern "C"
10155#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010156char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010157int
10158main ()
10159{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010160return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010161 ;
10162 return 0;
10163}
10164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010165if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010166 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010167else
Matthias Kloseb9621712010-04-24 17:59:49 +000010168 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010169fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010170rm -f core conftest.err conftest.$ac_objext \
10171 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010172LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010173fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10175$as_echo "$ac_cv_lib_util_forkpty" >&6; }
10176if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
10177 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010178 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010179else
Matthias Kloseb9621712010-04-24 17:59:49 +000010180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10181$as_echo_n "checking for forkpty in -lbsd... " >&6; }
10182if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
10183 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010184else
10185 ac_check_lib_save_LIBS=$LIBS
10186LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010188/* end confdefs.h. */
10189
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010190/* Override any GCC internal prototype to avoid an error.
10191 Use char because int might match the return type of a GCC
10192 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010193#ifdef __cplusplus
10194extern "C"
10195#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010196char forkpty ();
10197int
10198main ()
10199{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010200return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010201 ;
10202 return 0;
10203}
10204_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010205if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010206 ac_cv_lib_bsd_forkpty=yes
10207else
Matthias Kloseb9621712010-04-24 17:59:49 +000010208 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010209fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010210rm -f core conftest.err conftest.$ac_objext \
10211 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010212LIBS=$ac_check_lib_save_LIBS
10213fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10215$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
10216if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
10217 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010218 LIBS="$LIBS -lbsd"
10219fi
10220
10221
10222fi
10223
Fred Drake8cef4cf2000-06-28 16:40:38 +000010224
10225fi
10226done
10227
Jack Jansendd19cf82001-12-06 22:36:17 +000010228
Christian Heimesb186d002008-03-18 15:15:01 +000010229# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010230for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010231do :
10232 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
10233if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010234 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010235#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010236_ACEOF
10237
10238fi
10239done
10240
10241
Michael W. Hudson54241132001-12-07 15:38:26 +000010242# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010243for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010244do :
10245 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10246ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Peterson79263252010-10-31 16:50:44 +000010247eval as_val=\$$as_ac_var
10248 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010249 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010250#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010251_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010252
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010253fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010254done
10255
Michael W. Hudson54241132001-12-07 15:38:26 +000010256
Benjamin Peterson79263252010-10-31 16:50:44 +000010257for ac_func in dup2 getcwd strdup
10258do :
10259 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10260ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10261eval as_val=\$$as_ac_var
10262 if test "x$as_val" = x""yes; then :
10263 cat >>confdefs.h <<_ACEOF
10264#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10265_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000010266
Martin v. Löwis1142de32002-03-29 16:28:31 +000010267else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010268 case " $LIBOBJS " in
Benjamin Peterson79263252010-10-31 16:50:44 +000010269 *" $ac_func.$ac_objext "* ) ;;
10270 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010271 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010272esac
10273
Martin v. Löwis1142de32002-03-29 16:28:31 +000010274fi
Benjamin Peterson79263252010-10-31 16:50:44 +000010275done
Martin v. Löwis1142de32002-03-29 16:28:31 +000010276
10277
10278for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010279do :
10280 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
10281if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010282 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010283#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010286/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010287#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010288int
10289main ()
10290{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010291getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010292 ;
10293 return 0;
10294}
10295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010296if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010297
Matthias Kloseb9621712010-04-24 17:59:49 +000010298$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010299
Guido van Rossum627b2d71993-12-24 10:39:16 +000010300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010302
Guido van Rossum627b2d71993-12-24 10:39:16 +000010303fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010304done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010305
Jack Jansen150753c2003-03-29 22:07:47 +000010306for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010307do :
10308 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
10309if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010310 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010311#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010314/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010315#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010316int
10317main ()
10318{
10319setpgrp(0,0);
10320 ;
10321 return 0;
10322}
10323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010324if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010325
Matthias Kloseb9621712010-04-24 17:59:49 +000010326$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010327
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010330
10331fi
10332done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010333
Thomas Wouters3a584202000-08-05 23:28:51 +000010334for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010335do :
10336 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
10337if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010338 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010339#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010342/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010343#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010344int
10345main ()
10346{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010347gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010348 ;
10349 return 0;
10350}
10351_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010352if ac_fn_c_try_compile "$LINENO"; then :
10353
Guido van Rossum627b2d71993-12-24 10:39:16 +000010354else
Skip Montanaro6dead952003-09-25 14:50:04 +000010355
Matthias Kloseb9621712010-04-24 17:59:49 +000010356$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010357
Martin v. Löwis11437992002-04-12 09:54:03 +000010358
Guido van Rossum627b2d71993-12-24 10:39:16 +000010359fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010361
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010362fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010363done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010364
Michael W. Hudson54241132001-12-07 15:38:26 +000010365
Matthias Kloseb9621712010-04-24 17:59:49 +000010366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10367$as_echo_n "checking for major... " >&6; }
10368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010369/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010370
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010371#if defined(MAJOR_IN_MKDEV)
10372#include <sys/mkdev.h>
10373#elif defined(MAJOR_IN_SYSMACROS)
10374#include <sys/sysmacros.h>
10375#else
10376#include <sys/types.h>
10377#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010378
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010379int
10380main ()
10381{
10382
10383 makedev(major(0),minor(0));
10384
10385 ;
10386 return 0;
10387}
10388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010389if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010390
10391
Matthias Kloseb9621712010-04-24 17:59:49 +000010392$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010393
Matthias Kloseb9621712010-04-24 17:59:49 +000010394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10395$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010396
10397else
Skip Montanaro6dead952003-09-25 14:50:04 +000010398
Matthias Kloseb9621712010-04-24 17:59:49 +000010399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10400$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010401
10402fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010403rm -f core conftest.err conftest.$ac_objext \
10404 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010405
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010406# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010407# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10409$as_echo_n "checking for getaddrinfo... " >&6; }
10410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010411/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010412
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010413#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010414#include <sys/socket.h>
10415#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010416#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010417
Martin v. Löwis11437992002-04-12 09:54:03 +000010418int
10419main ()
10420{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010421getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010422 ;
10423 return 0;
10424}
10425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010426if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010427 have_getaddrinfo=yes
10428else
Matthias Kloseb9621712010-04-24 17:59:49 +000010429 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010430fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010431rm -f core conftest.err conftest.$ac_objext \
10432 conftest$ac_exeext conftest.$ac_ext
10433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10434$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010435if test $have_getaddrinfo = yes
10436then
Matthias Kloseb9621712010-04-24 17:59:49 +000010437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10438$as_echo_n "checking getaddrinfo bug... " >&6; }
10439 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
10440 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010441else
Matthias Kloseb9621712010-04-24 17:59:49 +000010442 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010443 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010444else
Matthias Kloseb9621712010-04-24 17:59:49 +000010445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010446/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010447
10448#include <sys/types.h>
10449#include <netdb.h>
10450#include <string.h>
10451#include <sys/socket.h>
10452#include <netinet/in.h>
10453
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010454int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010455{
10456 int passive, gaierr, inet4 = 0, inet6 = 0;
10457 struct addrinfo hints, *ai, *aitop;
10458 char straddr[INET6_ADDRSTRLEN], strport[16];
10459
10460 for (passive = 0; passive <= 1; passive++) {
10461 memset(&hints, 0, sizeof(hints));
10462 hints.ai_family = AF_UNSPEC;
10463 hints.ai_flags = passive ? AI_PASSIVE : 0;
10464 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010465 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010466 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10467 (void)gai_strerror(gaierr);
10468 goto bad;
10469 }
10470 for (ai = aitop; ai; ai = ai->ai_next) {
10471 if (ai->ai_addr == NULL ||
10472 ai->ai_addrlen == 0 ||
10473 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10474 straddr, sizeof(straddr), strport, sizeof(strport),
10475 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10476 goto bad;
10477 }
10478 switch (ai->ai_family) {
10479 case AF_INET:
10480 if (strcmp(strport, "54321") != 0) {
10481 goto bad;
10482 }
10483 if (passive) {
10484 if (strcmp(straddr, "0.0.0.0") != 0) {
10485 goto bad;
10486 }
10487 } else {
10488 if (strcmp(straddr, "127.0.0.1") != 0) {
10489 goto bad;
10490 }
10491 }
10492 inet4++;
10493 break;
10494 case AF_INET6:
10495 if (strcmp(strport, "54321") != 0) {
10496 goto bad;
10497 }
10498 if (passive) {
10499 if (strcmp(straddr, "::") != 0) {
10500 goto bad;
10501 }
10502 } else {
10503 if (strcmp(straddr, "::1") != 0) {
10504 goto bad;
10505 }
10506 }
10507 inet6++;
10508 break;
10509 case AF_UNSPEC:
10510 goto bad;
10511 break;
10512 default:
10513 /* another family support? */
10514 break;
10515 }
10516 }
10517 }
10518
10519 if (!(inet4 == 0 || inet4 == 2))
10520 goto bad;
10521 if (!(inet6 == 0 || inet6 == 2))
10522 goto bad;
10523
10524 if (aitop)
10525 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010526 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010527
10528 bad:
10529 if (aitop)
10530 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010531 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010532}
10533
Martin v. Löwis11437992002-04-12 09:54:03 +000010534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010535if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010536 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010537else
Matthias Kloseb9621712010-04-24 17:59:49 +000010538 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010539fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010540rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10541 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010542fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010543
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010544fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010545
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010546fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010547
Mark Dickinson2df5d282009-12-31 21:22:50 +000010548if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010549then
10550 if test $ipv6 = yes
10551 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010552 echo 'Fatal: You must get working getaddrinfo() function.'
10553 echo ' or you can specify "--disable-ipv6"'.
10554 exit 1
10555 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010556else
Martin v. Löwis11437992002-04-12 09:54:03 +000010557
Matthias Kloseb9621712010-04-24 17:59:49 +000010558$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010559
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010560fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010561for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010562do :
10563 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
10564if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010565 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010566#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010567_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010568
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010569fi
10570done
10571
Michael W. Hudson54241132001-12-07 15:38:26 +000010572
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010573# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10575$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
10576if test "${ac_cv_header_time+set}" = set; then :
10577 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010578else
Matthias Kloseb9621712010-04-24 17:59:49 +000010579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010580/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010581#include <sys/types.h>
10582#include <sys/time.h>
10583#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010584
Martin v. Löwis11437992002-04-12 09:54:03 +000010585int
10586main ()
10587{
10588if ((struct tm *) 0)
10589return 0;
10590 ;
10591 return 0;
10592}
10593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010594if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010595 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010596else
Matthias Kloseb9621712010-04-24 17:59:49 +000010597 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010598fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010600fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10602$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010603if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010604
Matthias Kloseb9621712010-04-24 17:59:49 +000010605$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010606
10607fi
10608
Matthias Kloseb9621712010-04-24 17:59:49 +000010609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10610$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10611if test "${ac_cv_struct_tm+set}" = set; then :
10612 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010613else
Matthias Kloseb9621712010-04-24 17:59:49 +000010614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010615/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010616#include <sys/types.h>
10617#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010618
Martin v. Löwis11437992002-04-12 09:54:03 +000010619int
10620main ()
10621{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010622struct tm tm;
10623 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010624 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010625 ;
10626 return 0;
10627}
10628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010629if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010630 ac_cv_struct_tm=time.h
10631else
Matthias Kloseb9621712010-04-24 17:59:49 +000010632 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010633fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010635fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10637$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010638if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010639
Matthias Kloseb9621712010-04-24 17:59:49 +000010640$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010641
10642fi
10643
Matthias Kloseb9621712010-04-24 17:59:49 +000010644ac_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 +000010645#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010646
Matthias Kloseb9621712010-04-24 17:59:49 +000010647"
10648if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010649
10650cat >>confdefs.h <<_ACEOF
10651#define HAVE_STRUCT_TM_TM_ZONE 1
10652_ACEOF
10653
10654
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010655fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010656
Martin v. Löwis11437992002-04-12 09:54:03 +000010657if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10658
Matthias Kloseb9621712010-04-24 17:59:49 +000010659$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010660
10661else
Matthias Kloseb9621712010-04-24 17:59:49 +000010662 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10663"
10664if test "x$ac_cv_have_decl_tzname" = x""yes; then :
10665 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010666else
Matthias Kloseb9621712010-04-24 17:59:49 +000010667 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010668fi
10669
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010670cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010671#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010672_ACEOF
10673
Matthias Kloseb9621712010-04-24 17:59:49 +000010674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10675$as_echo_n "checking for tzname... " >&6; }
10676if test "${ac_cv_var_tzname+set}" = set; then :
10677 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010678else
Matthias Kloseb9621712010-04-24 17:59:49 +000010679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010680/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010681#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010682#if !HAVE_DECL_TZNAME
10683extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010684#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010685
Martin v. Löwis11437992002-04-12 09:54:03 +000010686int
10687main ()
10688{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010689return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010690 ;
10691 return 0;
10692}
10693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010694if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010695 ac_cv_var_tzname=yes
10696else
Matthias Kloseb9621712010-04-24 17:59:49 +000010697 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010698fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010699rm -f core conftest.err conftest.$ac_objext \
10700 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010701fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10703$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010704 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010705
Matthias Kloseb9621712010-04-24 17:59:49 +000010706$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010707
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010708 fi
10709fi
10710
Matthias Kloseb9621712010-04-24 17:59:49 +000010711ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
10712if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010713
10714cat >>confdefs.h <<_ACEOF
10715#define HAVE_STRUCT_STAT_ST_RDEV 1
10716_ACEOF
10717
10718
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010719fi
10720
Matthias Kloseb9621712010-04-24 17:59:49 +000010721ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
10722if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010723
Martin v. Löwis11437992002-04-12 09:54:03 +000010724cat >>confdefs.h <<_ACEOF
10725#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10726_ACEOF
10727
10728
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010729fi
10730
Matthias Kloseb9621712010-04-24 17:59:49 +000010731ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
10732if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010733
10734cat >>confdefs.h <<_ACEOF
10735#define HAVE_STRUCT_STAT_ST_FLAGS 1
10736_ACEOF
10737
10738
10739fi
10740
Matthias Kloseb9621712010-04-24 17:59:49 +000010741ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
10742if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010743
10744cat >>confdefs.h <<_ACEOF
10745#define HAVE_STRUCT_STAT_ST_GEN 1
10746_ACEOF
10747
10748
10749fi
10750
Matthias Kloseb9621712010-04-24 17:59:49 +000010751ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
10752if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010753
10754cat >>confdefs.h <<_ACEOF
10755#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10756_ACEOF
10757
10758
10759fi
10760
Matthias Kloseb9621712010-04-24 17:59:49 +000010761ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
10762if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010763
Martin v. Löwis11437992002-04-12 09:54:03 +000010764cat >>confdefs.h <<_ACEOF
10765#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10766_ACEOF
10767
10768
Matthias Kloseb9621712010-04-24 17:59:49 +000010769$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010770
10771else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010772 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010773 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010774 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10775 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010776esac
10777
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010778fi
10779
Michael W. Hudson54241132001-12-07 15:38:26 +000010780
Martin v. Löwis11437992002-04-12 09:54:03 +000010781
Matthias Kloseb9621712010-04-24 17:59:49 +000010782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10783$as_echo_n "checking for time.h that defines altzone... " >&6; }
10784if test "${ac_cv_header_time_altzone+set}" = set; then :
10785 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010786else
Matthias Kloseb159a552010-04-25 21:00:44 +000010787
Matthias Kloseb9621712010-04-24 17:59:49 +000010788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010789/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010790#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010791int
10792main ()
10793{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010794return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010795 ;
10796 return 0;
10797}
10798_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010799if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010800 ac_cv_header_time_altzone=yes
10801else
Matthias Kloseb9621712010-04-24 17:59:49 +000010802 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010803fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010805
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010806fi
10807
Matthias Kloseb9621712010-04-24 17:59:49 +000010808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10809$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010810if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010811
Matthias Kloseb9621712010-04-24 17:59:49 +000010812$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010813
10814fi
10815
Guido van Rossumda88dad1995-01-26 00:46:29 +000010816was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10818$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010820/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010821
10822#include <sys/types.h>
10823#include <sys/select.h>
10824#include <sys/time.h>
10825
Martin v. Löwis11437992002-04-12 09:54:03 +000010826int
10827main ()
10828{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010829;
Martin v. Löwis11437992002-04-12 09:54:03 +000010830 ;
10831 return 0;
10832}
10833_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010834if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010835
10836
Matthias Kloseb9621712010-04-24 17:59:49 +000010837$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010838
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010839 was_it_defined=yes
10840
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10844$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010845
Matthias Kloseb9621712010-04-24 17:59:49 +000010846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10847$as_echo_n "checking for addrinfo... " >&6; }
10848if test "${ac_cv_struct_addrinfo+set}" = set; then :
10849 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010850else
Matthias Kloseb9621712010-04-24 17:59:49 +000010851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010852/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010853#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010854int
10855main ()
10856{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010857struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010858 ;
10859 return 0;
10860}
10861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010862if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010863 ac_cv_struct_addrinfo=yes
10864else
Matthias Kloseb9621712010-04-24 17:59:49 +000010865 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010866fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10868fi
10869
Matthias Kloseb9621712010-04-24 17:59:49 +000010870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10871$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010872if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010873
Matthias Kloseb9621712010-04-24 17:59:49 +000010874$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010875
10876fi
10877
Matthias Kloseb9621712010-04-24 17:59:49 +000010878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10879$as_echo_n "checking for sockaddr_storage... " >&6; }
10880if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
10881 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010882else
Matthias Kloseb9621712010-04-24 17:59:49 +000010883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010884/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010885
10886# include <sys/types.h>
10887# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010888int
10889main ()
10890{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010891struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010892 ;
10893 return 0;
10894}
10895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010896if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010897 ac_cv_struct_sockaddr_storage=yes
10898else
Matthias Kloseb9621712010-04-24 17:59:49 +000010899 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10902fi
10903
Matthias Kloseb9621712010-04-24 17:59:49 +000010904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10905$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010906if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010907
Matthias Kloseb9621712010-04-24 17:59:49 +000010908$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010909
10910fi
10911
Guido van Rossum627b2d71993-12-24 10:39:16 +000010912# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000010913
Matthias Kloseb9621712010-04-24 17:59:49 +000010914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10915$as_echo_n "checking whether char is unsigned... " >&6; }
10916if test "${ac_cv_c_char_unsigned+set}" = set; then :
10917 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000010918else
Matthias Kloseb9621712010-04-24 17:59:49 +000010919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010920/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010921$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010922int
10923main ()
10924{
10925static int test_array [1 - 2 * !(((char) -1) < 0)];
10926test_array [0] = 0
10927
10928 ;
10929 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000010930}
Martin v. Löwis11437992002-04-12 09:54:03 +000010931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010932if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000010933 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010934else
Matthias Kloseb9621712010-04-24 17:59:49 +000010935 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010936fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010938fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
10940$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010941if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010942 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010943
10944fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000010945
Matthias Kloseb9621712010-04-24 17:59:49 +000010946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
10947$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
10948if test "${ac_cv_c_const+set}" = set; then :
10949 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010950else
Matthias Kloseb9621712010-04-24 17:59:49 +000010951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010952/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010953
Martin v. Löwis11437992002-04-12 09:54:03 +000010954int
10955main ()
10956{
10957/* FIXME: Include the comments suggested by Paul. */
10958#ifndef __cplusplus
10959 /* Ultrix mips cc rejects this. */
10960 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010961 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000010962 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010963 char const *const *pcpcc;
10964 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000010965 /* NEC SVR4.0.2 mips cc rejects this. */
10966 struct point {int x, y;};
10967 static struct point const zero = {0,0};
10968 /* AIX XL C 1.02.0.0 rejects this.
10969 It does not let you subtract one const X* pointer from another in
10970 an arm of an if-expression whose if-part is not a constant
10971 expression */
10972 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010973 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010974 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010975 ++pcpcc;
10976 ppc = (char**) pcpcc;
10977 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000010978 { /* SCO 3.2v4 cc rejects this. */
10979 char *t;
10980 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010981
Martin v. Löwis11437992002-04-12 09:54:03 +000010982 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010983 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010984 }
10985 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
10986 int x[] = {25, 17};
10987 const int *foo = &x[0];
10988 ++foo;
10989 }
10990 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10991 typedef const int *iptr;
10992 iptr p = 0;
10993 ++p;
10994 }
10995 { /* AIX XL C 1.02.0.0 rejects this saying
10996 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10997 struct s { int j; const int *ap[3]; };
10998 struct s *b; b->j = 5;
10999 }
11000 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11001 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011002 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011003 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011004 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011005#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011006
Martin v. Löwis11437992002-04-12 09:54:03 +000011007 ;
11008 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011009}
Martin v. Löwis11437992002-04-12 09:54:03 +000011010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011011if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011012 ac_cv_c_const=yes
11013else
Matthias Kloseb9621712010-04-24 17:59:49 +000011014 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011015fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011017fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11019$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011020if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011021
Matthias Kloseb9621712010-04-24 17:59:49 +000011022$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011023
11024fi
11025
Michael W. Hudson54241132001-12-07 15:38:26 +000011026
Guido van Rossumda88dad1995-01-26 00:46:29 +000011027works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11029$as_echo_n "checking for working volatile... " >&6; }
11030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011031/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011032
Martin v. Löwis11437992002-04-12 09:54:03 +000011033int
11034main ()
11035{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011036volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011037 ;
11038 return 0;
11039}
11040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011041if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011042 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011043else
Skip Montanaro6dead952003-09-25 14:50:04 +000011044
Matthias Kloseb9621712010-04-24 17:59:49 +000011045$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011046
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011047
Guido van Rossum627b2d71993-12-24 10:39:16 +000011048fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11051$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011052
Guido van Rossumda88dad1995-01-26 00:46:29 +000011053works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11055$as_echo_n "checking for working signed char... " >&6; }
11056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011057/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011058
Martin v. Löwis11437992002-04-12 09:54:03 +000011059int
11060main ()
11061{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011062signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011063 ;
11064 return 0;
11065}
11066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011067if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011068 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011069else
Skip Montanaro6dead952003-09-25 14:50:04 +000011070
Matthias Kloseb9621712010-04-24 17:59:49 +000011071$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011072
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011073
Guido van Rossum7f43da71994-08-01 12:15:30 +000011074fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11077$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011078
Guido van Rossumda88dad1995-01-26 00:46:29 +000011079have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11081$as_echo_n "checking for prototypes... " >&6; }
11082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011083/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011084int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011085int
11086main ()
11087{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011088return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011089 ;
11090 return 0;
11091}
11092_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011093if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011094
Matthias Kloseb9621712010-04-24 17:59:49 +000011095$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011096
Matthias Kloseb159a552010-04-25 21:00:44 +000011097 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011098fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11101$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011102
Guido van Rossumda88dad1995-01-26 00:46:29 +000011103works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11105$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011107/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011108
11109#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011110int foo(int x, ...) {
11111 va_list va;
11112 va_start(va, x);
11113 va_arg(va, int);
11114 va_arg(va, char *);
11115 va_arg(va, double);
11116 return 0;
11117}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011118
Martin v. Löwis11437992002-04-12 09:54:03 +000011119int
11120main ()
11121{
Guido van Rossum90eea071996-08-30 20:58:57 +000011122return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011123 ;
11124 return 0;
11125}
11126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011127if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011128
11129
Matthias Kloseb9621712010-04-24 17:59:49 +000011130$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011131
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011132 works=yes
11133
Guido van Rossum627b2d71993-12-24 10:39:16 +000011134fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11137$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011138
Martin v. Löwisd6320502004-08-12 13:45:08 +000011139# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11141$as_echo_n "checking for socketpair... " >&6; }
11142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011143/* end confdefs.h. */
11144
11145#include <sys/types.h>
11146#include <sys/socket.h>
11147
11148int
11149main ()
11150{
11151void *x=socketpair
11152 ;
11153 return 0;
11154}
11155_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011156if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011157
Matthias Kloseb9621712010-04-24 17:59:49 +000011158$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011159
Matthias Kloseb159a552010-04-25 21:00:44 +000011160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011161$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011162else
Matthias Kloseb9621712010-04-24 17:59:49 +000011163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11164$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011165
11166fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011168
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011169# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11171$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011173/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011174#include <sys/types.h>
11175#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011176int
11177main ()
11178{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011179struct sockaddr x;
11180x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011181 ;
11182 return 0;
11183}
11184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011185if ac_fn_c_try_compile "$LINENO"; then :
11186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11187$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011188
Matthias Kloseb9621712010-04-24 17:59:49 +000011189$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011190
11191else
Matthias Kloseb9621712010-04-24 17:59:49 +000011192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11193$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011194
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011195fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011197
Guido van Rossumda88dad1995-01-26 00:46:29 +000011198va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11200$as_echo_n "checking whether va_list is an array... " >&6; }
11201cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011202/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011203
11204#ifdef HAVE_STDARG_PROTOTYPES
11205#include <stdarg.h>
11206#else
11207#include <varargs.h>
11208#endif
11209
Martin v. Löwis11437992002-04-12 09:54:03 +000011210int
11211main ()
11212{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011213va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011214 ;
11215 return 0;
11216}
11217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011218if ac_fn_c_try_compile "$LINENO"; then :
11219
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011220else
Skip Montanaro6dead952003-09-25 14:50:04 +000011221
Martin v. Löwis11437992002-04-12 09:54:03 +000011222
Matthias Kloseb9621712010-04-24 17:59:49 +000011223$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011224
Guido van Rossumda88dad1995-01-26 00:46:29 +000011225 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011226
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011227fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11230$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011231
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011232# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011233
11234
Matthias Kloseb9621712010-04-24 17:59:49 +000011235ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
11236if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011237
Matthias Kloseb9621712010-04-24 17:59:49 +000011238 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011239
Matthias Kloseb9621712010-04-24 17:59:49 +000011240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11241$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011242 OLD_CFLAGS=$CFLAGS
11243 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011245/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011246
11247# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011248
Martin v. Löwis11437992002-04-12 09:54:03 +000011249int
11250main ()
11251{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011252
11253 char *name;
11254 struct hostent *he, *res;
11255 char buffer[2048];
11256 int buflen = 2048;
11257 int h_errnop;
11258
11259 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011260
11261 ;
11262 return 0;
11263}
11264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011265if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011266
Matthias Kloseb9621712010-04-24 17:59:49 +000011267 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011268
Martin v. Löwis11437992002-04-12 09:54:03 +000011269
Matthias Kloseb9621712010-04-24 17:59:49 +000011270$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011271
Matthias Kloseb9621712010-04-24 17:59:49 +000011272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11273$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011274
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011275else
Skip Montanaro6dead952003-09-25 14:50:04 +000011276
Matthias Kloseb9621712010-04-24 17:59:49 +000011277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11278$as_echo "no" >&6; }
11279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11280$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011282/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011283
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011284# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011285
Martin v. Löwis11437992002-04-12 09:54:03 +000011286int
11287main ()
11288{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011289
11290 char *name;
11291 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011292 char buffer[2048];
11293 int buflen = 2048;
11294 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011295
Matthias Kloseb159a552010-04-25 21:00:44 +000011296 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011297
11298 ;
11299 return 0;
11300}
11301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011302if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011303
Matthias Kloseb9621712010-04-24 17:59:49 +000011304 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011305
Martin v. Löwis11437992002-04-12 09:54:03 +000011306
Matthias Kloseb159a552010-04-25 21:00:44 +000011307$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011308
Matthias Kloseb9621712010-04-24 17:59:49 +000011309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11310$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011311
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011312else
Skip Montanaro6dead952003-09-25 14:50:04 +000011313
Matthias Kloseb9621712010-04-24 17:59:49 +000011314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11315$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11317$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11319/* end confdefs.h. */
11320
11321# include <netdb.h>
11322
11323int
11324main ()
11325{
11326
11327 char *name;
11328 struct hostent *he;
11329 struct hostent_data data;
11330
11331 (void) gethostbyname_r(name, he, &data);
11332
11333 ;
11334 return 0;
11335}
11336_ACEOF
11337if ac_fn_c_try_compile "$LINENO"; then :
11338
11339 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11340
11341
11342$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11343
11344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11345$as_echo "yes" >&6; }
11346
11347else
11348
11349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11350$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011351
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011354
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011355fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011357
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011360 CFLAGS=$OLD_CFLAGS
11361
11362else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011363
Matthias Kloseb9621712010-04-24 17:59:49 +000011364 for ac_func in gethostbyname
11365do :
11366 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
11367if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011368 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011369#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011370_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011371
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011372fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011373done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011374
Michael W. Hudson54241132001-12-07 15:38:26 +000011375
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011376fi
11377
Michael W. Hudson54241132001-12-07 15:38:26 +000011378
11379
11380
11381
11382
11383
Guido van Rossum627b2d71993-12-24 10:39:16 +000011384# checks for system services
11385# (none yet)
11386
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011387# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011388ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
11389if test "x$ac_cv_func___fpu_control" = x""yes; then :
11390
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011391else
Matthias Kloseb9621712010-04-24 17:59:49 +000011392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11393$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
11394if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
11395 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011396else
Martin v. Löwis11437992002-04-12 09:54:03 +000011397 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011398LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011400/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011401
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011402/* Override any GCC internal prototype to avoid an error.
11403 Use char because int might match the return type of a GCC
11404 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011405#ifdef __cplusplus
11406extern "C"
11407#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011408char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011409int
11410main ()
11411{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011412return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011413 ;
11414 return 0;
11415}
11416_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011417if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011418 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011419else
Matthias Kloseb9621712010-04-24 17:59:49 +000011420 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011421fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011422rm -f core conftest.err conftest.$ac_objext \
11423 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011424LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011425fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11427$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
11428if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011429 cat >>confdefs.h <<_ACEOF
11430#define HAVE_LIBIEEE 1
11431_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011432
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011433 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011434
Guido van Rossum627b2d71993-12-24 10:39:16 +000011435fi
11436
Michael W. Hudson54241132001-12-07 15:38:26 +000011437
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011438fi
11439
Michael W. Hudson54241132001-12-07 15:38:26 +000011440
Guido van Rossum7f253911997-05-09 02:42:48 +000011441# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11443$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011444
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011445# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011446if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011447 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011448if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011449then
11450
Matthias Kloseb9621712010-04-24 17:59:49 +000011451$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011452
Matthias Kloseb9621712010-04-24 17:59:49 +000011453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11454$as_echo "yes" >&6; }
11455else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11456$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011457fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011458else
Matthias Kloseb9621712010-04-24 17:59:49 +000011459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11460$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011461fi
11462
Guido van Rossum7f253911997-05-09 02:42:48 +000011463
Guido van Rossum7f43da71994-08-01 12:15:30 +000011464# check for --with-libm=...
11465
Guido van Rossum563e7081996-09-10 18:20:48 +000011466case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011467Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011468*) LIBM=-lm
11469esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11471$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011472
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011473# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011474if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011475 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011476if test "$withval" = no
11477then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11479$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011480elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011481then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11483$as_echo "set LIBM=\"$withval\"" >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +000011484else as_fn_error "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011485fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011486else
Matthias Kloseb9621712010-04-24 17:59:49 +000011487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11488$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011489fi
11490
Guido van Rossum7f43da71994-08-01 12:15:30 +000011491
11492# check for --with-libc=...
11493
Matthias Kloseb9621712010-04-24 17:59:49 +000011494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11495$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011496
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011497# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011498if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011499 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011500if test "$withval" = no
11501then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11503$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011504elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011505then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11507$as_echo "set LIBC=\"$withval\"" >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +000011508else as_fn_error "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011509fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011510else
Matthias Kloseb9621712010-04-24 17:59:49 +000011511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11512$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011513fi
11514
Guido van Rossum7f43da71994-08-01 12:15:30 +000011515
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011516# **************************************************
11517# * Check for various properties of floating point *
11518# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011519
Matthias Kloseb9621712010-04-24 17:59:49 +000011520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11521$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
11522if test "${ac_cv_little_endian_double+set}" = set; then :
11523 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011524else
11525
Matthias Kloseb9621712010-04-24 17:59:49 +000011526if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011527 ac_cv_little_endian_double=no
11528else
Matthias Kloseb9621712010-04-24 17:59:49 +000011529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011530/* end confdefs.h. */
11531
11532#include <string.h>
11533int main() {
11534 double x = 9006104071832581.0;
11535 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11536 return 0;
11537 else
11538 return 1;
11539}
11540
11541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011542if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011543 ac_cv_little_endian_double=yes
11544else
Matthias Kloseb9621712010-04-24 17:59:49 +000011545 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011546fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011547rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11548 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011549fi
11550
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011551fi
11552
Matthias Kloseb9621712010-04-24 17:59:49 +000011553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11554$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011555if test "$ac_cv_little_endian_double" = yes
11556then
11557
Matthias Kloseb9621712010-04-24 17:59:49 +000011558$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011559
11560fi
11561
Matthias Kloseb9621712010-04-24 17:59:49 +000011562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11563$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
11564if test "${ac_cv_big_endian_double+set}" = set; then :
11565 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011566else
11567
Matthias Kloseb9621712010-04-24 17:59:49 +000011568if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011569 ac_cv_big_endian_double=no
11570else
Matthias Kloseb9621712010-04-24 17:59:49 +000011571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011572/* end confdefs.h. */
11573
11574#include <string.h>
11575int main() {
11576 double x = 9006104071832581.0;
11577 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11578 return 0;
11579 else
11580 return 1;
11581}
11582
11583_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011584if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011585 ac_cv_big_endian_double=yes
11586else
Matthias Kloseb9621712010-04-24 17:59:49 +000011587 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011588fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011589rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11590 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011591fi
11592
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011593fi
11594
Matthias Kloseb9621712010-04-24 17:59:49 +000011595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11596$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011597if test "$ac_cv_big_endian_double" = yes
11598then
11599
Matthias Kloseb9621712010-04-24 17:59:49 +000011600$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011601
11602fi
11603
11604# Some ARM platforms use a mixed-endian representation for doubles.
11605# While Python doesn't currently have full support for these platforms
11606# (see e.g., issue 1762561), we can at least make sure that float <-> string
11607# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11609$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
11610if test "${ac_cv_mixed_endian_double+set}" = set; then :
11611 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011612else
11613
Matthias Kloseb9621712010-04-24 17:59:49 +000011614if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011615 ac_cv_mixed_endian_double=no
11616else
Matthias Kloseb9621712010-04-24 17:59:49 +000011617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011618/* end confdefs.h. */
11619
11620#include <string.h>
11621int main() {
11622 double x = 9006104071832581.0;
11623 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11624 return 0;
11625 else
11626 return 1;
11627}
11628
11629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011630if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011631 ac_cv_mixed_endian_double=yes
11632else
Matthias Kloseb9621712010-04-24 17:59:49 +000011633 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011634fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011635rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11636 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011637fi
11638
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011639fi
11640
Matthias Kloseb9621712010-04-24 17:59:49 +000011641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11642$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011643if test "$ac_cv_mixed_endian_double" = yes
11644then
11645
Matthias Kloseb9621712010-04-24 17:59:49 +000011646$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011647
11648fi
11649
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011650# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011651# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011652# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011653# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011654# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011655# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011656
11657# This inline assembler syntax may also work for suncc and icc,
11658# so we try it on all platforms.
11659
Matthias Kloseb9621712010-04-24 17:59:49 +000011660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11661$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011663/* end confdefs.h. */
11664
11665int
11666main ()
11667{
11668
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011669 unsigned short cw;
11670 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11671 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011672
11673 ;
11674 return 0;
11675}
11676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011677if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011678 have_gcc_asm_for_x87=yes
11679else
Matthias Kloseb9621712010-04-24 17:59:49 +000011680 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011681fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11684$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011685if test "$have_gcc_asm_for_x87" = yes
11686then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011687
Matthias Kloseb9621712010-04-24 17:59:49 +000011688$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011689
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011690fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011691
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011692# Detect whether system arithmetic is subject to x87-style double
11693# rounding issues. The result of this test has little meaning on non
11694# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11695# mode is round-to-nearest and double rounding issues are present, and
11696# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11698$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011699# $BASECFLAGS may affect the result
11700ac_save_cc="$CC"
11701CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011702if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011703 ac_cv_x87_double_rounding=no
11704else
Matthias Kloseb9621712010-04-24 17:59:49 +000011705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011706/* end confdefs.h. */
11707
11708#include <stdlib.h>
11709#include <math.h>
11710int main() {
11711 volatile double x, y, z;
11712 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11713 x = 0.99999999999999989; /* 1-2**-53 */
11714 y = 1./x;
11715 if (y != 1.)
11716 exit(0);
11717 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11718 x = 1e16;
11719 y = 2.99999;
11720 z = x + y;
11721 if (z != 1e16+4.)
11722 exit(0);
11723 /* both tests show evidence of double rounding */
11724 exit(1);
11725}
11726
11727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011728if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011729 ac_cv_x87_double_rounding=no
11730else
Matthias Kloseb9621712010-04-24 17:59:49 +000011731 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011732fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011733rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11734 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011735fi
11736
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011737CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11739$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011740if test "$ac_cv_x87_double_rounding" = yes
11741then
11742
Matthias Kloseb9621712010-04-24 17:59:49 +000011743$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011744
11745fi
11746
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011747# ************************************
11748# * Check for mathematical functions *
11749# ************************************
11750
11751LIBS_SAVE=$LIBS
11752LIBS="$LIBS $LIBM"
11753
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011754# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11755# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11757$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
11758if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
11759 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011760else
11761
Matthias Kloseb9621712010-04-24 17:59:49 +000011762if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011763 ac_cv_tanh_preserves_zero_sign=no
11764else
Matthias Kloseb9621712010-04-24 17:59:49 +000011765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011766/* end confdefs.h. */
11767
11768#include <math.h>
11769#include <stdlib.h>
11770int main() {
11771 /* return 0 if either negative zeros don't exist
11772 on this platform or if negative zeros exist
11773 and tanh(-0.) == -0. */
11774 if (atan2(0., -1.) == atan2(-0., -1.) ||
11775 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11776 else exit(1);
11777}
11778
11779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011780if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011781 ac_cv_tanh_preserves_zero_sign=yes
11782else
Matthias Kloseb9621712010-04-24 17:59:49 +000011783 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011784fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011785rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11786 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011787fi
11788
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011789fi
11790
Matthias Kloseb9621712010-04-24 17:59:49 +000011791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11792$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011793if test "$ac_cv_tanh_preserves_zero_sign" = yes
11794then
11795
Matthias Kloseb9621712010-04-24 17:59:49 +000011796$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011797
11798fi
11799
Mark Dickinson9c113362009-09-05 10:36:23 +000011800for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011801do :
11802 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11803ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Peterson79263252010-10-31 16:50:44 +000011804eval as_val=\$$as_ac_var
11805 if test "x$as_val" = x""yes; then :
Mark Dickinson9c113362009-09-05 10:36:23 +000011806 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011807#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000011808_ACEOF
11809
11810fi
11811done
11812
Mark Dickinson9c113362009-09-05 10:36:23 +000011813for ac_func in hypot lgamma log1p round tgamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011814do :
11815 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11816ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Peterson79263252010-10-31 16:50:44 +000011817eval as_val=\$$as_ac_var
11818 if test "x$as_val" = x""yes; then :
Christian Heimes99170a52007-12-19 02:07:34 +000011819 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011820#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000011821_ACEOF
11822
11823fi
11824done
11825
Matthias Kloseb9621712010-04-24 17:59:49 +000011826ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11827"
11828if test "x$ac_cv_have_decl_isinf" = x""yes; then :
11829 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011830else
Matthias Kloseb9621712010-04-24 17:59:49 +000011831 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011832fi
11833
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011834cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011835#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011837ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11838"
11839if test "x$ac_cv_have_decl_isnan" = x""yes; then :
11840 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011841else
Matthias Kloseb9621712010-04-24 17:59:49 +000011842 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011843fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011844
11845cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011846#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011848ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11849"
11850if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
11851 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011852else
Matthias Kloseb9621712010-04-24 17:59:49 +000011853 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011854fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011855
11856cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011857#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011858_ACEOF
11859
11860
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011861LIBS=$LIBS_SAVE
11862
Mark Dickinsona614f042009-11-28 12:48:43 +000011863# For multiprocessing module, check that sem_open
11864# actually works. For FreeBSD versions <= 7.2,
11865# the kernel module that provides POSIX semaphores
11866# isn't loaded by default, so an attempt to call
11867# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000011868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
11869$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
11870if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
11871 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000011872else
Matthias Kloseb9621712010-04-24 17:59:49 +000011873 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011874 ac_cv_posix_semaphores_enabled=yes
11875else
Matthias Kloseb9621712010-04-24 17:59:49 +000011876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011877/* end confdefs.h. */
11878
11879#include <unistd.h>
11880#include <fcntl.h>
11881#include <stdio.h>
11882#include <semaphore.h>
11883#include <sys/stat.h>
11884
11885int main(void) {
11886 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
11887 if (a == SEM_FAILED) {
11888 perror("sem_open");
11889 return 1;
11890 }
11891 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011892 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000011893 return 0;
11894}
11895
11896_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011897if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011898 ac_cv_posix_semaphores_enabled=yes
11899else
Matthias Kloseb9621712010-04-24 17:59:49 +000011900 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000011901fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011902rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11903 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011904fi
11905
11906
Mark Dickinsona614f042009-11-28 12:48:43 +000011907fi
11908
Matthias Kloseb9621712010-04-24 17:59:49 +000011909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
11910$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000011911if test $ac_cv_posix_semaphores_enabled = no
11912then
11913
Matthias Kloseb9621712010-04-24 17:59:49 +000011914$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000011915
11916fi
11917
Mark Dickinson10683072009-04-18 21:18:19 +000011918# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000011919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
11920$as_echo_n "checking for broken sem_getvalue... " >&6; }
11921if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
11922 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011923else
Matthias Kloseb9621712010-04-24 17:59:49 +000011924 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011925 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000011926else
Matthias Kloseb9621712010-04-24 17:59:49 +000011927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000011928/* end confdefs.h. */
11929
11930#include <unistd.h>
11931#include <fcntl.h>
11932#include <stdio.h>
11933#include <semaphore.h>
11934#include <sys/stat.h>
11935
11936int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000011937 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000011938 int count;
11939 int res;
11940 if(a==SEM_FAILED){
11941 perror("sem_open");
11942 return 1;
11943
11944 }
11945 res = sem_getvalue(a, &count);
11946 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011947 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000011948 return res==-1 ? 1 : 0;
11949}
11950
Mark Dickinson10683072009-04-18 21:18:19 +000011951_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011952if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011953 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000011954else
Matthias Kloseb9621712010-04-24 17:59:49 +000011955 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011956fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011957rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11958 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011959fi
11960
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011961
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011962fi
11963
Matthias Kloseb9621712010-04-24 17:59:49 +000011964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
11965$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011966if test $ac_cv_broken_sem_getvalue = yes
11967then
11968
Matthias Kloseb9621712010-04-24 17:59:49 +000011969$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011970
11971fi
11972
Mark Dickinsonbd792642009-03-18 20:06:12 +000011973# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000011974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
11975$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000011976# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011977if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000011978 enableval=$enable_big_digits; case $enable_big_digits in
11979yes)
11980 enable_big_digits=30 ;;
11981no)
11982 enable_big_digits=15 ;;
1198315|30)
11984 ;;
11985*)
Benjamin Peterson79263252010-10-31 16:50:44 +000011986 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 +000011987esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
11989$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000011990
11991cat >>confdefs.h <<_ACEOF
11992#define PYLONG_BITS_IN_DIGIT $enable_big_digits
11993_ACEOF
11994
11995
11996else
Matthias Kloseb9621712010-04-24 17:59:49 +000011997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
11998$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000011999fi
12000
12001
Guido van Rossumef2255b2000-03-10 22:30:29 +000012002# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012003ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
12004if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012005
12006
Matthias Kloseb9621712010-04-24 17:59:49 +000012007$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012008
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012009 wchar_h="yes"
12010
Guido van Rossumef2255b2000-03-10 22:30:29 +000012011else
Martin v. Löwis11437992002-04-12 09:54:03 +000012012 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012013
12014fi
12015
Michael W. Hudson54241132001-12-07 15:38:26 +000012016
Martin v. Löwis11437992002-04-12 09:54:03 +000012017
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012018# determine wchar_t size
12019if test "$wchar_h" = yes
12020then
Matthias Kloseb9621712010-04-24 17:59:49 +000012021 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012022# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12023# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12024# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12026$as_echo_n "checking size of wchar_t... " >&6; }
12027if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
12028 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012029else
Matthias Kloseb9621712010-04-24 17:59:49 +000012030 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12031"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012032
Martin v. Löwis11437992002-04-12 09:54:03 +000012033else
Matthias Kloseb9621712010-04-24 17:59:49 +000012034 if test "$ac_cv_type_wchar_t" = yes; then
12035 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12036$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +000012037{ as_fn_set_status 77
12038as_fn_error "cannot compute sizeof (wchar_t)
12039See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012040 else
12041 ac_cv_sizeof_wchar_t=0
12042 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012043fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012044
Martin v. Löwis11437992002-04-12 09:54:03 +000012045fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12047$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012048
12049
12050
Martin v. Löwis11437992002-04-12 09:54:03 +000012051cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012052#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012053_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012054
Michael W. Hudson54241132001-12-07 15:38:26 +000012055
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012056fi
12057
Matthias Kloseb9621712010-04-24 17:59:49 +000012058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12059$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012060have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012062/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012063
12064#include <tcl.h>
12065#if TCL_UTF_MAX != 6
12066# error "NOT UCS4_TCL"
12067#endif
12068int
12069main ()
12070{
12071
12072 ;
12073 return 0;
12074}
12075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012076if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012077
12078
Matthias Kloseb9621712010-04-24 17:59:49 +000012079$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012080
12081 have_ucs4_tcl=yes
12082
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012083fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12086$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012087
Skip Montanaro6dead952003-09-25 14:50:04 +000012088# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012089if test "$wchar_h" = yes
12090then
12091 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12093$as_echo_n "checking whether wchar_t is signed... " >&6; }
12094 if test "${ac_cv_wchar_t_signed+set}" = set; then :
12095 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012096else
12097
Matthias Kloseb9621712010-04-24 17:59:49 +000012098 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012099 ac_cv_wchar_t_signed=yes
12100else
Matthias Kloseb9621712010-04-24 17:59:49 +000012101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012102/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012103
12104 #include <wchar.h>
12105 int main()
12106 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012107 /* Success: exit code 0 */
12108 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012109 }
12110
12111_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012112if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012113 ac_cv_wchar_t_signed=yes
12114else
Matthias Kloseb9621712010-04-24 17:59:49 +000012115 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012116fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012117rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12118 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012119fi
12120
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012121fi
12122
Matthias Kloseb9621712010-04-24 17:59:49 +000012123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12124$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012125fi
12126
Matthias Kloseb9621712010-04-24 17:59:49 +000012127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12128$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012129
12130# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012131if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012132 withval=$with_wide_unicode;
12133if test "$withval" != no
12134then unicode_size="4"
12135else unicode_size="2"
12136fi
12137
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012138else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012139
Georg Brandl52d168a2008-01-07 18:10:24 +000012140case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012141 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012142 *) unicode_size="2" ;;
12143esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012144
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012145fi
12146
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012147
12148
Georg Brandl52d168a2008-01-07 18:10:24 +000012149case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012150 4)
12151 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12152
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012153 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012154 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012155 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012156 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012157esac
12158
Michael W. Hudson54241132001-12-07 15:38:26 +000012159
Martin v. Löwis11437992002-04-12 09:54:03 +000012160
Georg Brandl52d168a2008-01-07 18:10:24 +000012161# wchar_t is only usable if it maps to an unsigned type
12162if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012163 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012164then
12165 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012166
Matthias Kloseb9621712010-04-24 17:59:49 +000012167$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012168
Matthias Kloseb9621712010-04-24 17:59:49 +000012169 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012170
Georg Brandl52d168a2008-01-07 18:10:24 +000012171elif test "$ac_cv_sizeof_short" = "$unicode_size"
12172then
12173 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012174 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012175
Georg Brandl52d168a2008-01-07 18:10:24 +000012176elif test "$ac_cv_sizeof_long" = "$unicode_size"
12177then
12178 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012179 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012180
Georg Brandl52d168a2008-01-07 18:10:24 +000012181else
12182 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012183fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12185$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012186
12187# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12189$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12190if test "${ac_cv_c_bigendian+set}" = set; then :
12191 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012192else
Matthias Kloseb9621712010-04-24 17:59:49 +000012193 ac_cv_c_bigendian=unknown
12194 # See if we're dealing with a universal compiler.
12195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12196/* end confdefs.h. */
12197#ifndef __APPLE_CC__
12198 not a universal capable compiler
12199 #endif
12200 typedef int dummy;
12201
Skip Montanaro6dead952003-09-25 14:50:04 +000012202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012203if ac_fn_c_try_compile "$LINENO"; then :
12204
12205 # Check for potential -arch flags. It is not universal unless
12206 # there are at least two -arch flags with different values.
12207 ac_arch=
12208 ac_prev=
12209 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12210 if test -n "$ac_prev"; then
12211 case $ac_word in
12212 i?86 | x86_64 | ppc | ppc64)
12213 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12214 ac_arch=$ac_word
12215 else
12216 ac_cv_c_bigendian=universal
12217 break
12218 fi
12219 ;;
12220 esac
12221 ac_prev=
12222 elif test "x$ac_word" = "x-arch"; then
12223 ac_prev=arch
12224 fi
12225 done
12226fi
12227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12228 if test $ac_cv_c_bigendian = unknown; then
12229 # See if sys/param.h defines the BYTE_ORDER macro.
12230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012231/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012232#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012233 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012234
Martin v. Löwis11437992002-04-12 09:54:03 +000012235int
12236main ()
12237{
Matthias Kloseb9621712010-04-24 17:59:49 +000012238#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12239 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12240 && LITTLE_ENDIAN)
12241 bogus endian macros
12242 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012243
12244 ;
12245 return 0;
12246}
12247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012248if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012249 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012251/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012252#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012253 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012254
Martin v. Löwis11437992002-04-12 09:54:03 +000012255int
12256main ()
12257{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012258#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012259 not big endian
12260 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012261
12262 ;
12263 return 0;
12264}
12265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012266if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012267 ac_cv_c_bigendian=yes
12268else
Matthias Kloseb9621712010-04-24 17:59:49 +000012269 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012270fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012272fi
12273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12274 fi
12275 if test $ac_cv_c_bigendian = unknown; then
12276 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012278/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012279#include <limits.h>
12280
Martin v. Löwis11437992002-04-12 09:54:03 +000012281int
12282main ()
12283{
Matthias Kloseb9621712010-04-24 17:59:49 +000012284#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12285 bogus endian macros
12286 #endif
12287
Martin v. Löwis11437992002-04-12 09:54:03 +000012288 ;
12289 return 0;
12290}
12291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012292if ac_fn_c_try_compile "$LINENO"; then :
12293 # It does; now see whether it defined to _BIG_ENDIAN or not.
12294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12295/* end confdefs.h. */
12296#include <limits.h>
12297
12298int
12299main ()
12300{
12301#ifndef _BIG_ENDIAN
12302 not big endian
12303 #endif
12304
12305 ;
12306 return 0;
12307}
12308_ACEOF
12309if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012310 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012311else
Matthias Kloseb9621712010-04-24 17:59:49 +000012312 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012313fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12315fi
12316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12317 fi
12318 if test $ac_cv_c_bigendian = unknown; then
12319 # Compile a test program.
12320 if test "$cross_compiling" = yes; then :
12321 # Try to guess by grepping values from an object file.
12322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12323/* end confdefs.h. */
12324short int ascii_mm[] =
12325 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12326 short int ascii_ii[] =
12327 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12328 int use_ascii (int i) {
12329 return ascii_mm[i] + ascii_ii[i];
12330 }
12331 short int ebcdic_ii[] =
12332 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12333 short int ebcdic_mm[] =
12334 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12335 int use_ebcdic (int i) {
12336 return ebcdic_mm[i] + ebcdic_ii[i];
12337 }
12338 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012339
Matthias Kloseb9621712010-04-24 17:59:49 +000012340int
12341main ()
12342{
12343return use_ascii (foo) == use_ebcdic (foo);
12344 ;
12345 return 0;
12346}
12347_ACEOF
12348if ac_fn_c_try_compile "$LINENO"; then :
12349 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12350 ac_cv_c_bigendian=yes
12351 fi
12352 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12353 if test "$ac_cv_c_bigendian" = unknown; then
12354 ac_cv_c_bigendian=no
12355 else
12356 # finding both strings is unlikely to happen, but who knows?
12357 ac_cv_c_bigendian=unknown
12358 fi
12359 fi
12360fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012362else
Matthias Kloseb9621712010-04-24 17:59:49 +000012363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012364/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012365$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012366int
12367main ()
12368{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012369
Matthias Kloseb9621712010-04-24 17:59:49 +000012370 /* Are we little or big endian? From Harbison&Steele. */
12371 union
12372 {
12373 long int l;
12374 char c[sizeof (long int)];
12375 } u;
12376 u.l = 1;
12377 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012378
12379 ;
12380 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012381}
Martin v. Löwis11437992002-04-12 09:54:03 +000012382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012383if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012384 ac_cv_c_bigendian=no
12385else
Matthias Kloseb9621712010-04-24 17:59:49 +000012386 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012387fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012388rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12389 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012391
Matthias Kloseb9621712010-04-24 17:59:49 +000012392 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012393fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12395$as_echo "$ac_cv_c_bigendian" >&6; }
12396 case $ac_cv_c_bigendian in #(
12397 yes)
12398 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12399;; #(
12400 no)
12401 ;; #(
12402 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012403
Matthias Kloseb9621712010-04-24 17:59:49 +000012404$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012405
Matthias Kloseb9621712010-04-24 17:59:49 +000012406 ;; #(
12407 *)
Benjamin Peterson79263252010-10-31 16:50:44 +000012408 as_fn_error "unknown endianness
12409 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012410 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012411
Michael W. Hudson54241132001-12-07 15:38:26 +000012412
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012413# ABI version string for Python extension modules. This appears between the
12414# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12415# from the following attributes which affect the ABI of this Python build (in
12416# this order):
12417#
12418# * The Python implementation (always 'cpython-' for us)
12419# * The major and minor version numbers
12420# * --with-pydebug (adds a 'd')
12421# * --with-pymalloc (adds a 'm')
12422# * --with-wide-unicode (adds a 'u')
12423#
12424# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012425# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12426# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012427
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12429$as_echo_n "checking ABIFLAGS... " >&6; }
12430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12431$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12433$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012434SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12436$as_echo "$SOABI" >&6; }
12437
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12439$as_echo_n "checking LDVERSION... " >&6; }
12440LDVERSION='$(VERSION)$(ABIFLAGS)'
12441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12442$as_echo "$LDVERSION" >&6; }
12443
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012444# SO is the extension of shared libraries `(including the dot!)
12445# -- usually .so, .sl on HP-UX, .dll on Cygwin
12446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12447$as_echo_n "checking SO... " >&6; }
12448if test -z "$SO"
12449then
12450 case $ac_sys_system in
12451 hp*|HP*)
12452 case `uname -m` in
12453 ia64) SO=.so;;
12454 *) SO=.sl;;
12455 esac
12456 ;;
12457 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012458 Linux*|GNU*)
12459 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012460 *) SO=.so;;
12461 esac
12462else
12463 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012464 echo
12465 echo '====================================================================='
12466 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012467 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012468 echo '+ Do you really mean to change the extension for shared libraries? +'
12469 echo '+ Continuing in 10 seconds to let you to ponder. +'
12470 echo '+ +'
12471 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012472 sleep 10
12473fi
12474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12475$as_echo "$SO" >&6; }
12476
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012477# Check whether right shifting a negative integer extends the sign bit
12478# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12480$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
12481if test "${ac_cv_rshift_extends_sign+set}" = set; then :
12482 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012483else
Martin v. Löwis11437992002-04-12 09:54:03 +000012484
Matthias Kloseb9621712010-04-24 17:59:49 +000012485if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012486 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012487else
Matthias Kloseb9621712010-04-24 17:59:49 +000012488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012489/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012490
12491int main()
12492{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012493 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012494}
12495
Martin v. Löwis11437992002-04-12 09:54:03 +000012496_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012497if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012498 ac_cv_rshift_extends_sign=yes
12499else
Matthias Kloseb9621712010-04-24 17:59:49 +000012500 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012501fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012502rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12503 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012504fi
12505
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012506fi
12507
Matthias Kloseb9621712010-04-24 17:59:49 +000012508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12509$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012510if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012511then
Martin v. Löwis11437992002-04-12 09:54:03 +000012512
Matthias Kloseb9621712010-04-24 17:59:49 +000012513$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012514
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012515fi
12516
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012517# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12519$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
12520if test "${ac_cv_have_getc_unlocked+set}" = set; then :
12521 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012522else
Martin v. Löwis11437992002-04-12 09:54:03 +000012523
Matthias Kloseb9621712010-04-24 17:59:49 +000012524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012525/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012526#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012527int
12528main ()
12529{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012530
12531 FILE *f = fopen("/dev/null", "r");
12532 flockfile(f);
12533 getc_unlocked(f);
12534 funlockfile(f);
12535
Martin v. Löwis11437992002-04-12 09:54:03 +000012536 ;
12537 return 0;
12538}
12539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012540if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012541 ac_cv_have_getc_unlocked=yes
12542else
Matthias Kloseb9621712010-04-24 17:59:49 +000012543 ac_cv_have_getc_unlocked=no
12544fi
12545rm -f core conftest.err conftest.$ac_objext \
12546 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012547fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012548
Matthias Kloseb9621712010-04-24 17:59:49 +000012549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12550$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012551if test "$ac_cv_have_getc_unlocked" = yes
12552then
Martin v. Löwis11437992002-04-12 09:54:03 +000012553
Matthias Kloseb9621712010-04-24 17:59:49 +000012554$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012555
12556fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012557
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012558# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012559# save the value of LIBS so we don't actually link Python with readline
12560LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012561
Gregory P. Smith18820942008-09-07 06:24:49 +000012562# On some systems we need to link readline to a termcap compatible
12563# library. NOTE: Keep the precedence of listed libraries synchronised
12564# with setup.py.
12565py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12567$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012568for py_libtermcap in "" ncursesw ncurses curses termcap; do
12569 if test -z "$py_libtermcap"; then
12570 READLINE_LIBS="-lreadline"
12571 else
12572 READLINE_LIBS="-lreadline -l$py_libtermcap"
12573 fi
12574 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012576/* end confdefs.h. */
12577
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012578/* Override any GCC internal prototype to avoid an error.
12579 Use char because int might match the return type of a GCC
12580 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012581#ifdef __cplusplus
12582extern "C"
12583#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012584char readline ();
12585int
12586main ()
12587{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012588return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012589 ;
12590 return 0;
12591}
12592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012593if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012594 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012595fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012596rm -f core conftest.err conftest.$ac_objext \
12597 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012598 if test $py_cv_lib_readline = yes; then
12599 break
12600 fi
12601done
12602# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12603#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012604if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12606$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012607else
Matthias Kloseb9621712010-04-24 17:59:49 +000012608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12609$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012610
Matthias Kloseb9621712010-04-24 17:59:49 +000012611$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012612
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012613fi
12614
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012615# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12617$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
12618if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
12619 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012620else
12621 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012622LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012624/* end confdefs.h. */
12625
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012626/* Override any GCC internal prototype to avoid an error.
12627 Use char because int might match the return type of a GCC
12628 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012629#ifdef __cplusplus
12630extern "C"
12631#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012632char rl_callback_handler_install ();
12633int
12634main ()
12635{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012636return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012637 ;
12638 return 0;
12639}
12640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012641if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012642 ac_cv_lib_readline_rl_callback_handler_install=yes
12643else
Matthias Kloseb9621712010-04-24 17:59:49 +000012644 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012645fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012646rm -f core conftest.err conftest.$ac_objext \
12647 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012648LIBS=$ac_check_lib_save_LIBS
12649fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12651$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
12652if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012653
Matthias Kloseb9621712010-04-24 17:59:49 +000012654$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012655
12656fi
12657
12658
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012659# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012660cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012661/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012662#include <readline/readline.h>
12663_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012664if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012665 have_readline=yes
12666else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012667 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012668
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012669fi
Benjamin Peterson79263252010-10-31 16:50:44 +000012670rm -f conftest.err conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012671if test $have_readline = yes
12672then
Matthias Kloseb9621712010-04-24 17:59:49 +000012673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012674/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012675#include <readline/readline.h>
12676
12677_ACEOF
12678if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012679 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012680
Matthias Kloseb9621712010-04-24 17:59:49 +000012681$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012682
12683fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012684rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012685
Matthias Kloseb9621712010-04-24 17:59:49 +000012686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012687/* end confdefs.h. */
12688#include <readline/readline.h>
12689
12690_ACEOF
12691if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012692 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012693
Matthias Kloseb9621712010-04-24 17:59:49 +000012694$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012695
12696fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012697rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012698
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012699fi
12700
Martin v. Löwis0daad592001-09-30 21:09:59 +000012701# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12703$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
12704if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
12705 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012706else
Martin v. Löwis11437992002-04-12 09:54:03 +000012707 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012708LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012710/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012711
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012712/* Override any GCC internal prototype to avoid an error.
12713 Use char because int might match the return type of a GCC
12714 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012715#ifdef __cplusplus
12716extern "C"
12717#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012718char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012719int
12720main ()
12721{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012722return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012723 ;
12724 return 0;
12725}
12726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012727if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012728 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012729else
Matthias Kloseb9621712010-04-24 17:59:49 +000012730 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012731fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012732rm -f core conftest.err conftest.$ac_objext \
12733 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012734LIBS=$ac_check_lib_save_LIBS
12735fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12737$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
12738if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012739
Matthias Kloseb9621712010-04-24 17:59:49 +000012740$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012741
Martin v. Löwis0daad592001-09-30 21:09:59 +000012742fi
12743
Michael W. Hudson54241132001-12-07 15:38:26 +000012744
Thomas Wouters89d996e2007-09-08 17:39:28 +000012745# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12747$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
12748if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
12749 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012750else
12751 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012752LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012753cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012754/* end confdefs.h. */
12755
12756/* Override any GCC internal prototype to avoid an error.
12757 Use char because int might match the return type of a GCC
12758 builtin and then its argument prototype would still apply. */
12759#ifdef __cplusplus
12760extern "C"
12761#endif
12762char rl_completion_display_matches_hook ();
12763int
12764main ()
12765{
12766return rl_completion_display_matches_hook ();
12767 ;
12768 return 0;
12769}
12770_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012771if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012772 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12773else
Matthias Kloseb9621712010-04-24 17:59:49 +000012774 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012775fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012776rm -f core conftest.err conftest.$ac_objext \
12777 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012778LIBS=$ac_check_lib_save_LIBS
12779fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12781$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
12782if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012783
Matthias Kloseb9621712010-04-24 17:59:49 +000012784$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012785
12786fi
12787
12788
Martin v. Löwis0daad592001-09-30 21:09:59 +000012789# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12791$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
12792if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
12793 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012794else
Martin v. Löwis11437992002-04-12 09:54:03 +000012795 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012796LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012798/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012799
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012800/* Override any GCC internal prototype to avoid an error.
12801 Use char because int might match the return type of a GCC
12802 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012803#ifdef __cplusplus
12804extern "C"
12805#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012806char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012807int
12808main ()
12809{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012810return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012811 ;
12812 return 0;
12813}
12814_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012815if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012816 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012817else
Matthias Kloseb9621712010-04-24 17:59:49 +000012818 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012819fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012820rm -f core conftest.err conftest.$ac_objext \
12821 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012822LIBS=$ac_check_lib_save_LIBS
12823fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12825$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
12826if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012827
Matthias Kloseb9621712010-04-24 17:59:49 +000012828$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012829
Guido van Rossum353ae582001-07-10 16:45:32 +000012830fi
12831
Jack Jansendd19cf82001-12-06 22:36:17 +000012832
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012833# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012835/* end confdefs.h. */
12836#include <readline/readline.h>
12837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012838if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012839 have_readline=yes
12840else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012841 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012842
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012843fi
Benjamin Peterson79263252010-10-31 16:50:44 +000012844rm -f conftest.err conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012845if test $have_readline = yes
12846then
Matthias Kloseb9621712010-04-24 17:59:49 +000012847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012848/* end confdefs.h. */
12849#include <readline/readline.h>
12850
12851_ACEOF
12852if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012853 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012854
Matthias Kloseb9621712010-04-24 17:59:49 +000012855$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012856
12857fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012858rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012859
12860fi
12861
Martin v. Löwis82bca632006-02-10 20:49:30 +000012862# End of readline checks: restore LIBS
12863LIBS=$LIBS_no_readline
12864
Matthias Kloseb9621712010-04-24 17:59:49 +000012865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
12866$as_echo_n "checking for broken nice()... " >&6; }
12867if test "${ac_cv_broken_nice+set}" = set; then :
12868 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012869else
Martin v. Löwis11437992002-04-12 09:54:03 +000012870
Matthias Kloseb9621712010-04-24 17:59:49 +000012871if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012872 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012873else
Matthias Kloseb9621712010-04-24 17:59:49 +000012874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012875/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012876
12877int main()
12878{
12879 int val1 = nice(1);
12880 if (val1 != -1 && val1 == nice(2))
12881 exit(0);
12882 exit(1);
12883}
12884
Martin v. Löwis11437992002-04-12 09:54:03 +000012885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012886if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012887 ac_cv_broken_nice=yes
12888else
Matthias Kloseb9621712010-04-24 17:59:49 +000012889 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012890fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012891rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12892 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012893fi
12894
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012895fi
12896
Matthias Kloseb9621712010-04-24 17:59:49 +000012897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
12898$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012899if test "$ac_cv_broken_nice" = yes
12900then
Martin v. Löwis11437992002-04-12 09:54:03 +000012901
Matthias Kloseb9621712010-04-24 17:59:49 +000012902$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012903
12904fi
12905
Matthias Kloseb9621712010-04-24 17:59:49 +000012906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
12907$as_echo_n "checking for broken poll()... " >&6; }
12908if test "${ac_cv_broken_poll+set}" = set; then :
12909 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012910else
Matthias Kloseb9621712010-04-24 17:59:49 +000012911 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012912 ac_cv_broken_poll=no
12913else
Matthias Kloseb9621712010-04-24 17:59:49 +000012914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012915/* end confdefs.h. */
12916
12917#include <poll.h>
12918
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012919int main()
12920{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012921 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012922 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012923
12924 close (42);
12925
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012926 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012927 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012928 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012929 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012930 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012931 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012932 return 1;
12933}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012934
12935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012936if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012937 ac_cv_broken_poll=yes
12938else
Matthias Kloseb9621712010-04-24 17:59:49 +000012939 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012940fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012941rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12942 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012943fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012944
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012945fi
12946
Matthias Kloseb9621712010-04-24 17:59:49 +000012947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
12948$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012949if test "$ac_cv_broken_poll" = yes
12950then
12951
Matthias Kloseb9621712010-04-24 17:59:49 +000012952$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012953
12954fi
12955
Brett Cannon43802422005-02-10 20:48:03 +000012956# 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 +000012957# (which is not required by ISO C or UNIX spec) and/or if we support
12958# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000012959ac_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 +000012960#include <$ac_cv_struct_tm>
12961
Matthias Kloseb9621712010-04-24 17:59:49 +000012962"
12963if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000012964
12965cat >>confdefs.h <<_ACEOF
12966#define HAVE_STRUCT_TM_TM_ZONE 1
12967_ACEOF
12968
12969
12970fi
12971
12972if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12973
Matthias Kloseb9621712010-04-24 17:59:49 +000012974$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000012975
12976else
Matthias Kloseb9621712010-04-24 17:59:49 +000012977 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12978"
12979if test "x$ac_cv_have_decl_tzname" = x""yes; then :
12980 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012981else
Matthias Kloseb9621712010-04-24 17:59:49 +000012982 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012983fi
12984
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012985cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012986#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012987_ACEOF
12988
Matthias Kloseb9621712010-04-24 17:59:49 +000012989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12990$as_echo_n "checking for tzname... " >&6; }
12991if test "${ac_cv_var_tzname+set}" = set; then :
12992 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012993else
Matthias Kloseb9621712010-04-24 17:59:49 +000012994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000012995/* end confdefs.h. */
12996#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012997#if !HAVE_DECL_TZNAME
12998extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000012999#endif
13000
13001int
13002main ()
13003{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013004return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013005 ;
13006 return 0;
13007}
13008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013009if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013010 ac_cv_var_tzname=yes
13011else
Matthias Kloseb9621712010-04-24 17:59:49 +000013012 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013013fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013014rm -f core conftest.err conftest.$ac_objext \
13015 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013016fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13018$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013019 if test $ac_cv_var_tzname = yes; then
13020
Matthias Kloseb9621712010-04-24 17:59:49 +000013021$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013022
13023 fi
13024fi
13025
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013026
Martin v. Löwis1d459062005-03-14 21:23:33 +000013027# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13029$as_echo_n "checking for working tzset()... " >&6; }
13030if test "${ac_cv_working_tzset+set}" = set; then :
13031 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013032else
13033
Matthias Kloseb9621712010-04-24 17:59:49 +000013034if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013035 ac_cv_working_tzset=no
13036else
Matthias Kloseb9621712010-04-24 17:59:49 +000013037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013038/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013039
13040#include <stdlib.h>
13041#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013042#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013043
13044#if HAVE_TZNAME
13045extern char *tzname[];
13046#endif
13047
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013048int main()
13049{
Brett Cannon18367812003-09-19 00:59:16 +000013050 /* Note that we need to ensure that not only does tzset(3)
13051 do 'something' with localtime, but it works as documented
13052 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013053 This includes making sure that tzname is set properly if
13054 tm->tm_zone does not exist since it is the alternative way
13055 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013056
13057 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013058 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013059 */
13060
Martin v. Löwis1d459062005-03-14 21:23:33 +000013061 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013062 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13063
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013064 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013065 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013066 if (localtime(&groundhogday)->tm_hour != 0)
13067 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013068#if HAVE_TZNAME
13069 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13070 if (strcmp(tzname[0], "UTC") ||
13071 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13072 exit(1);
13073#endif
Brett Cannon18367812003-09-19 00:59:16 +000013074
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013075 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013076 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013077 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013078 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013079#if HAVE_TZNAME
13080 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13081 exit(1);
13082#endif
Brett Cannon18367812003-09-19 00:59:16 +000013083
13084 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13085 tzset();
13086 if (localtime(&groundhogday)->tm_hour != 11)
13087 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013088#if HAVE_TZNAME
13089 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13090 exit(1);
13091#endif
13092
13093#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013094 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13095 exit(1);
13096 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13097 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013098#endif
Brett Cannon18367812003-09-19 00:59:16 +000013099
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013100 exit(0);
13101}
13102
13103_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013104if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013105 ac_cv_working_tzset=yes
13106else
Matthias Kloseb9621712010-04-24 17:59:49 +000013107 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013108fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013109rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13110 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013111fi
13112
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013113fi
13114
Matthias Kloseb9621712010-04-24 17:59:49 +000013115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13116$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013117if test "$ac_cv_working_tzset" = yes
13118then
13119
Matthias Kloseb9621712010-04-24 17:59:49 +000013120$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013121
13122fi
13123
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013124# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13126$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
13127if test "${ac_cv_stat_tv_nsec+set}" = set; then :
13128 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013129else
Matthias Kloseb9621712010-04-24 17:59:49 +000013130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013131/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013132#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013133int
13134main ()
13135{
13136
13137struct stat st;
13138st.st_mtim.tv_nsec = 1;
13139
13140 ;
13141 return 0;
13142}
13143_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013144if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013145 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013146else
Matthias Kloseb9621712010-04-24 17:59:49 +000013147 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013148fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13150fi
13151
Matthias Kloseb9621712010-04-24 17:59:49 +000013152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13153$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013154if test "$ac_cv_stat_tv_nsec" = yes
13155then
13156
Matthias Kloseb9621712010-04-24 17:59:49 +000013157$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013158
13159fi
13160
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013161# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13163$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
13164if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
13165 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013166else
Matthias Kloseb9621712010-04-24 17:59:49 +000013167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013168/* end confdefs.h. */
13169#include <sys/stat.h>
13170int
13171main ()
13172{
13173
13174struct stat st;
13175st.st_mtimespec.tv_nsec = 1;
13176
13177 ;
13178 return 0;
13179}
13180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013181if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013182 ac_cv_stat_tv_nsec2=yes
13183else
Matthias Kloseb9621712010-04-24 17:59:49 +000013184 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013185fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13187fi
13188
Matthias Kloseb9621712010-04-24 17:59:49 +000013189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13190$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013191if test "$ac_cv_stat_tv_nsec2" = yes
13192then
13193
Matthias Kloseb9621712010-04-24 17:59:49 +000013194$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013195
13196fi
13197
Jack Jansen666b1e72001-10-31 12:11:48 +000013198# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13200$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
13201if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
13202 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013203else
Matthias Kloseb9621712010-04-24 17:59:49 +000013204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013205/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013206#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013207int
13208main ()
13209{
Jack Jansen666b1e72001-10-31 12:11:48 +000013210
13211 int rtn;
13212 rtn = mvwdelch(0,0,0);
13213
Martin v. Löwis11437992002-04-12 09:54:03 +000013214 ;
13215 return 0;
13216}
13217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013218if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013219 ac_cv_mvwdelch_is_expression=yes
13220else
Matthias Kloseb9621712010-04-24 17:59:49 +000013221 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13224fi
13225
Matthias Kloseb9621712010-04-24 17:59:49 +000013226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13227$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013228
13229if test "$ac_cv_mvwdelch_is_expression" = yes
13230then
Martin v. Löwis11437992002-04-12 09:54:03 +000013231
Matthias Kloseb9621712010-04-24 17:59:49 +000013232$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013233
13234fi
13235
Matthias Kloseb9621712010-04-24 17:59:49 +000013236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13237$as_echo_n "checking whether WINDOW has _flags... " >&6; }
13238if test "${ac_cv_window_has_flags+set}" = set; then :
13239 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013240else
Matthias Kloseb9621712010-04-24 17:59:49 +000013241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013242/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013243#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013244int
13245main ()
13246{
Jack Jansen666b1e72001-10-31 12:11:48 +000013247
13248 WINDOW *w;
13249 w->_flags = 0;
13250
Martin v. Löwis11437992002-04-12 09:54:03 +000013251 ;
13252 return 0;
13253}
13254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013255if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013256 ac_cv_window_has_flags=yes
13257else
Matthias Kloseb9621712010-04-24 17:59:49 +000013258 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013259fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13261fi
13262
Matthias Kloseb9621712010-04-24 17:59:49 +000013263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13264$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013265
Jack Jansen666b1e72001-10-31 12:11:48 +000013266
13267if test "$ac_cv_window_has_flags" = yes
13268then
Martin v. Löwis11437992002-04-12 09:54:03 +000013269
Matthias Kloseb9621712010-04-24 17:59:49 +000013270$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013271
13272fi
13273
Matthias Kloseb9621712010-04-24 17:59:49 +000013274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13275$as_echo_n "checking for is_term_resized... " >&6; }
13276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013277/* end confdefs.h. */
13278#include <curses.h>
13279int
13280main ()
13281{
13282void *x=is_term_resized
13283 ;
13284 return 0;
13285}
13286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013287if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013288
Matthias Kloseb9621712010-04-24 17:59:49 +000013289$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013290
Matthias Kloseb159a552010-04-25 21:00:44 +000013291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013292$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013293else
Matthias Kloseb9621712010-04-24 17:59:49 +000013294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13295$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013296
13297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13299
Matthias Kloseb9621712010-04-24 17:59:49 +000013300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13301$as_echo_n "checking for resize_term... " >&6; }
13302cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013303/* end confdefs.h. */
13304#include <curses.h>
13305int
13306main ()
13307{
13308void *x=resize_term
13309 ;
13310 return 0;
13311}
13312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013313if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013314
Matthias Kloseb9621712010-04-24 17:59:49 +000013315$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013316
Matthias Kloseb159a552010-04-25 21:00:44 +000013317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013318$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013319else
Matthias Kloseb9621712010-04-24 17:59:49 +000013320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13321$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013322
13323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13325
Matthias Kloseb9621712010-04-24 17:59:49 +000013326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13327$as_echo_n "checking for resizeterm... " >&6; }
13328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013329/* end confdefs.h. */
13330#include <curses.h>
13331int
13332main ()
13333{
13334void *x=resizeterm
13335 ;
13336 return 0;
13337}
13338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013339if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013340
Matthias Kloseb9621712010-04-24 17:59:49 +000013341$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013342
Matthias Kloseb159a552010-04-25 21:00:44 +000013343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013344$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013345else
Matthias Kloseb9621712010-04-24 17:59:49 +000013346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13347$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013348
13349fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13351
Matthias Kloseb9621712010-04-24 17:59:49 +000013352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13353$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013354
13355if test -r /dev/ptmx
13356then
Matthias Kloseb9621712010-04-24 17:59:49 +000013357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13358$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013359
Matthias Kloseb9621712010-04-24 17:59:49 +000013360$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013361
Thomas Wouters89f507f2006-12-13 04:49:30 +000013362else
Matthias Kloseb9621712010-04-24 17:59:49 +000013363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13364$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013365fi
13366
Matthias Kloseb9621712010-04-24 17:59:49 +000013367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13368$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013369
13370if test -r /dev/ptc
13371then
Matthias Kloseb9621712010-04-24 17:59:49 +000013372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13373$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013374
Matthias Kloseb9621712010-04-24 17:59:49 +000013375$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013376
Thomas Wouters89f507f2006-12-13 04:49:30 +000013377else
Matthias Kloseb9621712010-04-24 17:59:49 +000013378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13379$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013380fi
13381
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013382if test "$have_long_long" = yes
13383then
Matthias Kloseb9621712010-04-24 17:59:49 +000013384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13385$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
13386 if test "${ac_cv_have_long_long_format+set}" = set; then :
13387 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013388else
Matthias Kloseb9621712010-04-24 17:59:49 +000013389 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013390 ac_cv_have_long_long_format=no
13391else
Matthias Kloseb9621712010-04-24 17:59:49 +000013392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013393/* end confdefs.h. */
13394
13395 #include <stdio.h>
13396 #include <stddef.h>
13397 #include <string.h>
13398
13399 #ifdef HAVE_SYS_TYPES_H
13400 #include <sys/types.h>
13401 #endif
13402
13403 int main()
13404 {
13405 char buffer[256];
13406
13407 if (sprintf(buffer, "%lld", (long long)123) < 0)
13408 return 1;
13409 if (strcmp(buffer, "123"))
13410 return 1;
13411
13412 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13413 return 1;
13414 if (strcmp(buffer, "-123"))
13415 return 1;
13416
13417 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13418 return 1;
13419 if (strcmp(buffer, "123"))
13420 return 1;
13421
13422 return 0;
13423 }
13424
13425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013426if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013427 ac_cv_have_long_long_format=yes
13428else
Matthias Kloseb9621712010-04-24 17:59:49 +000013429 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013430fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013431rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13432 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013433fi
13434
13435
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013436fi
13437
Matthias Kloseb9621712010-04-24 17:59:49 +000013438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13439$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013440fi
13441
Mark Dickinson89d7d412009-12-31 20:50:59 +000013442if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013443then
13444
Matthias Kloseb9621712010-04-24 17:59:49 +000013445$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013446
13447fi
13448
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013449if test $ac_sys_system = Darwin
13450then
13451 LIBS="$LIBS -framework CoreFoundation"
13452fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013453
Matthias Kloseb9621712010-04-24 17:59:49 +000013454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13455$as_echo_n "checking for %zd printf() format support... " >&6; }
13456if test "${ac_cv_have_size_t_format+set}" = set; then :
13457 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013458else
Matthias Kloseb9621712010-04-24 17:59:49 +000013459 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013460 ac_cv_have_size_t_format="cross -- assuming yes"
13461
Thomas Wouters477c8d52006-05-27 19:21:47 +000013462else
Matthias Kloseb9621712010-04-24 17:59:49 +000013463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013464/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013465
Thomas Wouters477c8d52006-05-27 19:21:47 +000013466#include <stdio.h>
13467#include <stddef.h>
13468#include <string.h>
13469
Christian Heimes2c181612007-12-17 20:04:13 +000013470#ifdef HAVE_SYS_TYPES_H
13471#include <sys/types.h>
13472#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013473
13474#ifdef HAVE_SSIZE_T
13475typedef ssize_t Py_ssize_t;
13476#elif SIZEOF_VOID_P == SIZEOF_LONG
13477typedef long Py_ssize_t;
13478#else
13479typedef int Py_ssize_t;
13480#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013481
Christian Heimes2c181612007-12-17 20:04:13 +000013482int main()
13483{
13484 char buffer[256];
13485
Thomas Wouters477c8d52006-05-27 19:21:47 +000013486 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13487 return 1;
13488
Thomas Wouters89f507f2006-12-13 04:49:30 +000013489 if (strcmp(buffer, "123"))
13490 return 1;
13491
13492 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13493 return 1;
13494
13495 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013496 return 1;
13497
13498 return 0;
13499}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013500
Thomas Wouters477c8d52006-05-27 19:21:47 +000013501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013502if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013503 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013504else
Matthias Kloseb9621712010-04-24 17:59:49 +000013505 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013506fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013507rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13508 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013509fi
13510
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013511fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13513$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013514if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013515
Matthias Kloseb9621712010-04-24 17:59:49 +000013516$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013517
13518fi
13519
Matthias Kloseb9621712010-04-24 17:59:49 +000013520ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013521#ifdef HAVE_SYS_TYPES_H
13522#include <sys/types.h>
13523#endif
13524#ifdef HAVE_SYS_SOCKET_H
13525#include <sys/socket.h>
13526#endif
13527
Matthias Kloseb9621712010-04-24 17:59:49 +000013528"
13529if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013530
Martin v. Löwis11437992002-04-12 09:54:03 +000013531else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013532
Matthias Kloseb9621712010-04-24 17:59:49 +000013533$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013534
13535fi
13536
Michael W. Hudson54241132001-12-07 15:38:26 +000013537
Matthias Kloseb9621712010-04-24 17:59:49 +000013538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13539$as_echo_n "checking for broken mbstowcs... " >&6; }
13540if test "${ac_cv_broken_mbstowcs+set}" = set; then :
13541 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013542else
Matthias Kloseb9621712010-04-24 17:59:49 +000013543 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013544 ac_cv_broken_mbstowcs=no
13545else
Matthias Kloseb9621712010-04-24 17:59:49 +000013546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013547/* end confdefs.h. */
13548
13549#include<stdlib.h>
13550int main() {
13551 size_t len = -1;
13552 const char *str = "text";
13553 len = mbstowcs(NULL, str, 0);
13554 return (len != 4);
13555}
13556
13557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013558if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013559 ac_cv_broken_mbstowcs=no
13560else
Matthias Kloseb9621712010-04-24 17:59:49 +000013561 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013562fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013563rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13564 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013565fi
13566
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013567fi
13568
Matthias Kloseb9621712010-04-24 17:59:49 +000013569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13570$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013571if test "$ac_cv_broken_mbstowcs" = yes
13572then
13573
Matthias Kloseb9621712010-04-24 17:59:49 +000013574$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013575
13576fi
13577
Antoine Pitrou042b1282010-08-13 21:15:58 +000013578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13579$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
13580if test "${ac_cv_computed_gotos+set}" = set; then :
13581 $as_echo_n "(cached) " >&6
13582else
13583 if test "$cross_compiling" = yes; then :
13584 ac_cv_computed_gotos=no
13585else
13586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13587/* end confdefs.h. */
13588
13589int main(int argc, char **argv)
13590{
13591 static void *targets[1] = { &&LABEL1 };
13592 goto LABEL2;
13593LABEL1:
13594 return 0;
13595LABEL2:
13596 goto *targets[0];
13597 return 1;
13598}
13599
13600_ACEOF
13601if ac_fn_c_try_run "$LINENO"; then :
13602 ac_cv_computed_gotos=yes
13603else
13604 ac_cv_computed_gotos=no
13605fi
13606rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13607 conftest.$ac_objext conftest.beam conftest.$ac_ext
13608fi
13609
13610fi
13611
13612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13613$as_echo "$ac_cv_computed_gotos" >&6; }
13614if test "$ac_cv_computed_gotos" = yes
13615then
13616
13617$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13618
13619fi
13620
Antoine Pitroub52ec782009-01-25 16:34:23 +000013621# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13623$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013624
13625# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013626if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013627 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013628if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013629then
13630
Matthias Kloseb9621712010-04-24 17:59:49 +000013631$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013632
Matthias Kloseb9621712010-04-24 17:59:49 +000013633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13634$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013635fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013636if test "$withval" = no
13637then
13638
13639$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13640
Matthias Kloseb9621712010-04-24 17:59:49 +000013641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13642$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013643fi
13644
Antoine Pitrou042b1282010-08-13 21:15:58 +000013645else
13646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13647$as_echo "no value specified" >&6; }
13648fi
13649
Antoine Pitroub52ec782009-01-25 16:34:23 +000013650
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013651case $ac_sys_system in
13652AIX*)
13653
13654$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13655 ;;
13656esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013657
Michael W. Hudson54241132001-12-07 15:38:26 +000013658
Jesus Cea6a792292010-05-03 21:18:48 +000013659case $ac_sys_system in
Benjamin Peterson79263252010-10-31 16:50:44 +000013660 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 +000013661esac
13662
13663
13664
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013665
13666
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013667for h in `(cd $srcdir;echo Python/thread_*.h)`
13668do
13669 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13670done
13671
Michael W. Hudson54241132001-12-07 15:38:26 +000013672
Neal Norwitzd24499d2005-12-18 21:36:39 +000013673SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13675$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013676for dir in $SRCDIRS; do
13677 if test ! -d $dir; then
13678 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013679 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013680done
Matthias Kloseb9621712010-04-24 17:59:49 +000013681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13682$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013683
Guido van Rossum627b2d71993-12-24 10:39:16 +000013684# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013685ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013686
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013687ac_config_files="$ac_config_files Modules/ld_so_aix"
13688
Martin v. Löwis11437992002-04-12 09:54:03 +000013689cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013690# This file is a shell script that caches the results of configure
13691# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013692# scripts and configure runs, see configure's option --config-cache.
13693# It is not useful on other systems. If it contains results you don't
13694# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013695#
Martin v. Löwis11437992002-04-12 09:54:03 +000013696# config.status only pays attention to the cache file if you give it
13697# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013698#
Skip Montanaro6dead952003-09-25 14:50:04 +000013699# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013700# loading this file, other *unset* `ac_cv_foo' will be assigned the
13701# following values.
13702
13703_ACEOF
13704
Guido van Rossumf78abae1997-01-21 22:02:36 +000013705# The following way of writing the cache mishandles newlines in values,
13706# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013707# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013708# Ultrix sh set writes to stderr and can't be redirected directly,
13709# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013710(
13711 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13712 eval ac_val=\$$ac_var
13713 case $ac_val in #(
13714 *${as_nl}*)
13715 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013716 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13717$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013718 esac
13719 case $ac_var in #(
13720 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013721 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13722 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013723 esac ;;
13724 esac
13725 done
13726
Martin v. Löwis11437992002-04-12 09:54:03 +000013727 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013728 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13729 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013730 # `set' does not quote correctly, so add quotes: double-quote
13731 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013732 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013733 "s/'/'\\\\''/g;
13734 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013735 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013736 *)
13737 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013738 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013739 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013740 esac |
13741 sort
13742) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013743 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013744 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013745 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013746 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013747 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13748 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013749 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13750 :end' >>confcache
13751if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13752 if test -w "$cache_file"; then
13753 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013754 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13755$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000013756 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013757 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013758 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13759$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013760 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013761fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013762rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013763
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013764test "x$prefix" = xNONE && prefix=$ac_default_prefix
13765# Let make expand exec_prefix.
13766test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013767
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013768DEFS=-DHAVE_CONFIG_H
13769
Skip Montanaro6dead952003-09-25 14:50:04 +000013770ac_libobjs=
13771ac_ltlibobjs=
13772for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13773 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013774 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013775 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013776 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13777 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013778 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13779 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013780done
13781LIBOBJS=$ac_libobjs
13782
13783LTLIBOBJS=$ac_ltlibobjs
13784
13785
Martin v. Löwis11437992002-04-12 09:54:03 +000013786
Matthias Kloseb9621712010-04-24 17:59:49 +000013787
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013788: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013789ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013790ac_clean_files_save=$ac_clean_files
13791ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013792{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13793$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13794as_write_fail=0
13795cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013796#! $SHELL
13797# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013798# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013799# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013800# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013801
Martin v. Löwis11437992002-04-12 09:54:03 +000013802debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013803ac_cs_recheck=false
13804ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013805
Matthias Kloseb9621712010-04-24 17:59:49 +000013806SHELL=\${CONFIG_SHELL-$SHELL}
13807export SHELL
13808_ASEOF
13809cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13810## -------------------- ##
13811## M4sh Initialization. ##
13812## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013813
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013814# Be more Bourne compatible
13815DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013816if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013817 emulate sh
13818 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013819 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013820 # is contrary to our usage. Disable this feature.
13821 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013822 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013823else
Matthias Kloseb9621712010-04-24 17:59:49 +000013824 case `(set -o) 2>/dev/null` in #(
13825 *posix*) :
13826 set -o posix ;; #(
13827 *) :
13828 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013829esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013830fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013831
13832
Matthias Kloseb9621712010-04-24 17:59:49 +000013833as_nl='
13834'
13835export as_nl
13836# Printing a long string crashes Solaris 7 /usr/bin/printf.
13837as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13838as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13839as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13840# Prefer a ksh shell builtin over an external printf program on Solaris,
13841# but without wasting forks for bash or zsh.
13842if test -z "$BASH_VERSION$ZSH_VERSION" \
13843 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13844 as_echo='print -r --'
13845 as_echo_n='print -rn --'
13846elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13847 as_echo='printf %s\n'
13848 as_echo_n='printf %s'
13849else
13850 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13851 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13852 as_echo_n='/usr/ucb/echo -n'
13853 else
13854 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13855 as_echo_n_body='eval
13856 arg=$1;
13857 case $arg in #(
13858 *"$as_nl"*)
13859 expr "X$arg" : "X\\(.*\\)$as_nl";
13860 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13861 esac;
13862 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13863 '
13864 export as_echo_n_body
13865 as_echo_n='sh -c $as_echo_n_body as_echo'
13866 fi
13867 export as_echo_body
13868 as_echo='sh -c $as_echo_body as_echo'
13869fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013870
13871# The user is always right.
13872if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013873 PATH_SEPARATOR=:
13874 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13875 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13876 PATH_SEPARATOR=';'
13877 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013878fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013879
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013880
13881# IFS
13882# We need space, tab and new line, in precisely that order. Quoting is
13883# there to prevent editors from complaining about space-tab.
13884# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13885# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013886IFS=" "" $as_nl"
13887
13888# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000013889case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013890 *[\\/]* ) as_myself=$0 ;;
13891 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000013892for as_dir in $PATH
13893do
13894 IFS=$as_save_IFS
13895 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000013896 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13897 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013898IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000013899
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013900 ;;
13901esac
13902# We did not find ourselves, most probably we were run as `sh COMMAND'
13903# in which case we are not to be found in the path.
13904if test "x$as_myself" = x; then
13905 as_myself=$0
13906fi
13907if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013908 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13909 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013910fi
13911
Matthias Kloseb9621712010-04-24 17:59:49 +000013912# Unset variables that we do not need and which cause bugs (e.g. in
13913# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13914# suppresses any "Segmentation fault" message there. '((' could
13915# trigger a bug in pdksh 5.2.14.
13916for as_var in BASH_ENV ENV MAIL MAILPATH
13917do eval test x\${$as_var+set} = xset \
13918 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013919done
13920PS1='$ '
13921PS2='> '
13922PS4='+ '
13923
13924# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000013925LC_ALL=C
13926export LC_ALL
13927LANGUAGE=C
13928export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013929
Matthias Kloseb9621712010-04-24 17:59:49 +000013930# CDPATH.
13931(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13932
13933
Benjamin Peterson79263252010-10-31 16:50:44 +000013934# as_fn_error ERROR [LINENO LOG_FD]
13935# ---------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000013936# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
13937# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Benjamin Peterson79263252010-10-31 16:50:44 +000013938# script with status $?, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000013939as_fn_error ()
13940{
Benjamin Peterson79263252010-10-31 16:50:44 +000013941 as_status=$?; test $as_status -eq 0 && as_status=1
13942 if test "$3"; then
13943 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
13944 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
Matthias Kloseb9621712010-04-24 17:59:49 +000013945 fi
Benjamin Peterson79263252010-10-31 16:50:44 +000013946 $as_echo "$as_me: error: $1" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000013947 as_fn_exit $as_status
13948} # as_fn_error
13949
13950
13951# as_fn_set_status STATUS
13952# -----------------------
13953# Set $? to STATUS, without forking.
13954as_fn_set_status ()
13955{
13956 return $1
13957} # as_fn_set_status
13958
13959# as_fn_exit STATUS
13960# -----------------
13961# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
13962as_fn_exit ()
13963{
13964 set +e
13965 as_fn_set_status $1
13966 exit $1
13967} # as_fn_exit
13968
13969# as_fn_unset VAR
13970# ---------------
13971# Portably unset VAR.
13972as_fn_unset ()
13973{
13974 { eval $1=; unset $1;}
13975}
13976as_unset=as_fn_unset
13977# as_fn_append VAR VALUE
13978# ----------------------
13979# Append the text in VALUE to the end of the definition contained in VAR. Take
13980# advantage of any shell optimizations that allow amortized linear growth over
13981# repeated appends, instead of the typical quadratic growth present in naive
13982# implementations.
13983if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
13984 eval 'as_fn_append ()
13985 {
13986 eval $1+=\$2
13987 }'
13988else
13989 as_fn_append ()
13990 {
13991 eval $1=\$$1\$2
13992 }
13993fi # as_fn_append
13994
13995# as_fn_arith ARG...
13996# ------------------
13997# Perform arithmetic evaluation on the ARGs, and store the result in the
13998# global $as_val. Take advantage of shells that can avoid forks. The arguments
13999# must be portable across $(()) and expr.
14000if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14001 eval 'as_fn_arith ()
14002 {
14003 as_val=$(( $* ))
14004 }'
14005else
14006 as_fn_arith ()
14007 {
14008 as_val=`expr "$@" || test $? -eq 1`
14009 }
14010fi # as_fn_arith
14011
14012
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014013if expr a : '\(a\)' >/dev/null 2>&1 &&
14014 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14015 as_expr=expr
14016else
14017 as_expr=false
14018fi
14019
14020if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14021 as_basename=basename
14022else
14023 as_basename=false
14024fi
14025
Matthias Kloseb9621712010-04-24 17:59:49 +000014026if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14027 as_dirname=dirname
14028else
14029 as_dirname=false
14030fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014031
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014032as_me=`$as_basename -- "$0" ||
14033$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14034 X"$0" : 'X\(//\)$' \| \
14035 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014036$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014037 sed '/^.*\/\([^/][^/]*\)\/*$/{
14038 s//\1/
14039 q
14040 }
14041 /^X\/\(\/\/\)$/{
14042 s//\1/
14043 q
14044 }
14045 /^X\/\(\/\).*/{
14046 s//\1/
14047 q
14048 }
14049 s/.*/./; q'`
14050
Matthias Kloseb9621712010-04-24 17:59:49 +000014051# Avoid depending upon Character Ranges.
14052as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14053as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14054as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14055as_cr_digits='0123456789'
14056as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014057
14058ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014059case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014060-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014061 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014062 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014063 xy) ECHO_C='\c';;
14064 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14065 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014066 esac;;
14067*)
14068 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014069esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014070
Martin v. Löwis11437992002-04-12 09:54:03 +000014071rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014072if test -d conf$$.dir; then
14073 rm -f conf$$.dir/conf$$.file
14074else
14075 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014076 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014077fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014078if (echo >conf$$.file) 2>/dev/null; then
14079 if ln -s conf$$.file conf$$ 2>/dev/null; then
14080 as_ln_s='ln -s'
14081 # ... but there are two gotchas:
14082 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14083 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14084 # In both cases, we have to default to `cp -p'.
14085 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14086 as_ln_s='cp -p'
14087 elif ln conf$$.file conf$$ 2>/dev/null; then
14088 as_ln_s=ln
14089 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014090 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014091 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014092else
14093 as_ln_s='cp -p'
14094fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014095rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14096rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014097
Matthias Kloseb9621712010-04-24 17:59:49 +000014098
14099# as_fn_mkdir_p
14100# -------------
14101# Create "$as_dir" as a directory, including parents if necessary.
14102as_fn_mkdir_p ()
14103{
14104
14105 case $as_dir in #(
14106 -*) as_dir=./$as_dir;;
14107 esac
14108 test -d "$as_dir" || eval $as_mkdir_p || {
14109 as_dirs=
14110 while :; do
14111 case $as_dir in #(
14112 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14113 *) as_qdir=$as_dir;;
14114 esac
14115 as_dirs="'$as_qdir' $as_dirs"
14116 as_dir=`$as_dirname -- "$as_dir" ||
14117$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14118 X"$as_dir" : 'X\(//\)[^/]' \| \
14119 X"$as_dir" : 'X\(//\)$' \| \
14120 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14121$as_echo X"$as_dir" |
14122 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14123 s//\1/
14124 q
14125 }
14126 /^X\(\/\/\)[^/].*/{
14127 s//\1/
14128 q
14129 }
14130 /^X\(\/\/\)$/{
14131 s//\1/
14132 q
14133 }
14134 /^X\(\/\).*/{
14135 s//\1/
14136 q
14137 }
14138 s/.*/./; q'`
14139 test -d "$as_dir" && break
14140 done
14141 test -z "$as_dirs" || eval "mkdir $as_dirs"
Benjamin Peterson79263252010-10-31 16:50:44 +000014142 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014143
14144
14145} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014146if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014147 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014148else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014149 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014150 as_mkdir_p=false
14151fi
14152
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014153if test -x / >/dev/null 2>&1; then
14154 as_test_x='test -x'
14155else
14156 if ls -dL / >/dev/null 2>&1; then
14157 as_ls_L_option=L
14158 else
14159 as_ls_L_option=
14160 fi
14161 as_test_x='
14162 eval sh -c '\''
14163 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014164 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014165 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014166 case $1 in #(
14167 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014168 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014169 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014170 ???[sx]*):;;*)false;;esac;fi
14171 '\'' sh
14172 '
14173fi
14174as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014175
14176# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014177as_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 +000014178
14179# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014180as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014181
14182
Martin v. Löwis11437992002-04-12 09:54:03 +000014183exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014184## ----------------------------------- ##
14185## Main body of $CONFIG_STATUS script. ##
14186## ----------------------------------- ##
14187_ASEOF
14188test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014189
Matthias Kloseb9621712010-04-24 17:59:49 +000014190cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14191# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014192# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014193# values after options handling.
14194ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014195This file was extended by python $as_me 3.2, which was
Benjamin Peterson79263252010-10-31 16:50:44 +000014196generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014197
14198 CONFIG_FILES = $CONFIG_FILES
14199 CONFIG_HEADERS = $CONFIG_HEADERS
14200 CONFIG_LINKS = $CONFIG_LINKS
14201 CONFIG_COMMANDS = $CONFIG_COMMANDS
14202 $ $0 $@
14203
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014204on `(hostname || uname -n) 2>/dev/null | sed 1q`
14205"
14206
Martin v. Löwis11437992002-04-12 09:54:03 +000014207_ACEOF
14208
Matthias Kloseb9621712010-04-24 17:59:49 +000014209case $ac_config_files in *"
14210"*) set x $ac_config_files; shift; ac_config_files=$*;;
14211esac
14212
14213case $ac_config_headers in *"
14214"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14215esac
14216
14217
14218cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014219# Files that config.status was made for.
Barry Warsaw278266f2010-10-14 17:38:46 +000014220config_files="$ac_config_files"
14221config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014222
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014223_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014224
Matthias Kloseb9621712010-04-24 17:59:49 +000014225cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014226ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014227\`$as_me' instantiates files and other configuration actions
14228from templates according to the current configuration. Unless the files
14229and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014230
Matthias Kloseb9621712010-04-24 17:59:49 +000014231Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014232
14233 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014234 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014235 --config print configuration, then exit
14236 -q, --quiet, --silent
14237 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014238 -d, --debug don't remove temporary files
14239 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014240 --file=FILE[:TEMPLATE]
14241 instantiate the configuration file FILE
14242 --header=FILE[:TEMPLATE]
14243 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014244
14245Configuration files:
14246$config_files
14247
14248Configuration headers:
14249$config_headers
14250
Matthias Kloseb9621712010-04-24 17:59:49 +000014251Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014252
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014254cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14255ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014256ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014257python config.status 3.2
Benjamin Peterson79263252010-10-31 16:50:44 +000014258configured by $0, generated by GNU Autoconf 2.65,
Matthias Kloseb9621712010-04-24 17:59:49 +000014259 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014260
Benjamin Peterson79263252010-10-31 16:50:44 +000014261Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014262This config.status script is free software; the Free Software Foundation
14263gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014264
14265ac_pwd='$ac_pwd'
14266srcdir='$srcdir'
14267INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014268test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014269_ACEOF
14270
Matthias Kloseb9621712010-04-24 17:59:49 +000014271cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14272# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014273ac_need_defaults=:
14274while test $# != 0
14275do
14276 case $1 in
Benjamin Peterson79263252010-10-31 16:50:44 +000014277 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014278 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14279 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014280 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014281 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014282 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014283 ac_option=$1
14284 ac_optarg=$2
14285 ac_shift=shift
14286 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014287 esac
14288
Skip Montanaro6dead952003-09-25 14:50:04 +000014289 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014290 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014291 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14292 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014293 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014294 $as_echo "$ac_cs_version"; exit ;;
14295 --config | --confi | --conf | --con | --co | --c )
14296 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014297 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014298 debug=: ;;
14299 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014300 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014301 case $ac_optarg in
14302 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14303 esac
14304 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014305 ac_need_defaults=false;;
14306 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014307 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014308 case $ac_optarg in
14309 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14310 esac
14311 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014312 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014313 --he | --h)
14314 # Conflict between --help and --header
Benjamin Peterson79263252010-10-31 16:50:44 +000014315 as_fn_error "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014316Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014317 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014318 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014319 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14320 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14321 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014322
14323 # This is an error.
Benjamin Peterson79263252010-10-31 16:50:44 +000014324 -*) as_fn_error "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014325Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014326
Matthias Kloseb9621712010-04-24 17:59:49 +000014327 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014328 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014329
14330 esac
14331 shift
14332done
14333
Skip Montanaro6dead952003-09-25 14:50:04 +000014334ac_configure_extra_args=
14335
14336if $ac_cs_silent; then
14337 exec 6>/dev/null
14338 ac_configure_extra_args="$ac_configure_extra_args --silent"
14339fi
14340
14341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014342cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014343if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014344 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14345 shift
14346 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14347 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014348 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014349 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014350fi
14351
Martin v. Löwis11437992002-04-12 09:54:03 +000014352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014353cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014354exec 5>>config.log
14355{
14356 echo
14357 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14358## Running $as_me. ##
14359_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014360 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014361} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014362
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014364cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014365_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014366
Matthias Kloseb9621712010-04-24 17:59:49 +000014367cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014368
14369# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014370for ac_config_target in $ac_config_targets
14371do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014372 case $ac_config_target in
14373 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14374 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14375 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014376 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14377 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014378 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14379 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014380 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014381 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014382
Benjamin Peterson79263252010-10-31 16:50:44 +000014383 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014384 esac
14385done
14386
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014387
Martin v. Löwis11437992002-04-12 09:54:03 +000014388# If the user did not use the arguments to specify the items to instantiate,
14389# then the envvar interface is used. Set only those that are not.
14390# We use the long form for the default assignment because of an extremely
14391# bizarre bug on SunOS 4.1.3.
14392if $ac_need_defaults; then
14393 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14394 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14395fi
14396
Skip Montanaro6dead952003-09-25 14:50:04 +000014397# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014398# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014399# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014400# Hook for its removal unless debugging.
14401# Note that there is a small window in which the directory will not be cleaned:
14402# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014403$debug ||
14404{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014405 tmp=
14406 trap 'exit_status=$?
14407 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14408' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014409 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014410}
Martin v. Löwis11437992002-04-12 09:54:03 +000014411# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014412
Martin v. Löwis11437992002-04-12 09:54:03 +000014413{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014414 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014415 test -n "$tmp" && test -d "$tmp"
14416} ||
14417{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014418 tmp=./conf$$-$RANDOM
14419 (umask 077 && mkdir "$tmp")
Benjamin Peterson79263252010-10-31 16:50:44 +000014420} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014421
Matthias Kloseb9621712010-04-24 17:59:49 +000014422# Set up the scripts for CONFIG_FILES section.
14423# No need to generate them if there are no CONFIG_FILES.
14424# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014425if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014426
Matthias Kloseb9621712010-04-24 17:59:49 +000014427
14428ac_cr=`echo X | tr X '\015'`
14429# On cygwin, bash can eat \r inside `` if the user requested igncr.
14430# But we know of no other shell where ac_cr would be empty at this
14431# point, so we can use a bashism as a fallback.
14432if test "x$ac_cr" = x; then
14433 eval ac_cr=\$\'\\r\'
14434fi
14435ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14436if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Benjamin Peterson79263252010-10-31 16:50:44 +000014437 ac_cs_awk_cr='\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014438else
14439 ac_cs_awk_cr=$ac_cr
14440fi
14441
14442echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014443_ACEOF
14444
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014445
Matthias Kloseb9621712010-04-24 17:59:49 +000014446{
14447 echo "cat >conf$$subs.awk <<_ACEOF" &&
14448 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14449 echo "_ACEOF"
14450} >conf$$subs.sh ||
Benjamin Peterson79263252010-10-31 16:50:44 +000014451 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14452ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014453ac_delim='%!_!# '
14454for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014455 . ./conf$$subs.sh ||
Benjamin Peterson79263252010-10-31 16:50:44 +000014456 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014457
Matthias Kloseb9621712010-04-24 17:59:49 +000014458 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14459 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014460 break
14461 elif $ac_last_try; then
Benjamin Peterson79263252010-10-31 16:50:44 +000014462 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014463 else
14464 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014465 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014466done
Matthias Kloseb9621712010-04-24 17:59:49 +000014467rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014468
Matthias Kloseb9621712010-04-24 17:59:49 +000014469cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14470cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014472sed -n '
14473h
14474s/^/S["/; s/!.*/"]=/
14475p
14476g
14477s/^[^!]*!//
14478:repl
14479t repl
14480s/'"$ac_delim"'$//
14481t delim
14482:nl
14483h
14484s/\(.\{148\}\)..*/\1/
14485t more1
14486s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14487p
14488n
14489b repl
14490:more1
14491s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14492p
14493g
14494s/.\{148\}//
14495t nl
14496:delim
14497h
14498s/\(.\{148\}\)..*/\1/
14499t more2
14500s/["\\]/\\&/g; s/^/"/; s/$/"/
14501p
14502b
14503:more2
14504s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14505p
14506g
14507s/.\{148\}//
14508t delim
14509' <conf$$subs.awk | sed '
14510/^[^""]/{
14511 N
14512 s/\n//
14513}
14514' >>$CONFIG_STATUS || ac_write_fail=1
14515rm -f conf$$subs.awk
14516cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14517_ACAWK
14518cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14519 for (key in S) S_is_set[key] = 1
14520 FS = ""
14521
14522}
14523{
14524 line = $ 0
14525 nfields = split(line, field, "@")
14526 substed = 0
14527 len = length(field[1])
14528 for (i = 2; i < nfields; i++) {
14529 key = field[i]
14530 keylen = length(key)
14531 if (S_is_set[key]) {
14532 value = S[key]
14533 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14534 len += length(value) + length(field[++i])
14535 substed = 1
14536 } else
14537 len += 1 + keylen
14538 }
14539
14540 print line
14541}
14542
14543_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014545cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14546if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14547 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14548else
14549 cat
14550fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
Benjamin Peterson79263252010-10-31 16:50:44 +000014551 || as_fn_error "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014552_ACEOF
14553
Benjamin Peterson79263252010-10-31 16:50:44 +000014554# VPATH may cause trouble with some makes, so we remove $(srcdir),
14555# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014556# trailing colons and then remove the whole line if VPATH becomes empty
14557# (actually we leave an empty line to preserve line numbers).
14558if test "x$srcdir" = x.; then
Benjamin Peterson79263252010-10-31 16:50:44 +000014559 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14560s/:*\$(srcdir):*/:/
14561s/:*\${srcdir}:*/:/
14562s/:*@srcdir@:*/:/
14563s/^\([^=]*=[ ]*\):*/\1/
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014564s/:*$//
14565s/^[^=]*=[ ]*$//
14566}'
14567fi
14568
Matthias Kloseb9621712010-04-24 17:59:49 +000014569cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014570fi # test -n "$CONFIG_FILES"
14571
Matthias Kloseb9621712010-04-24 17:59:49 +000014572# Set up the scripts for CONFIG_HEADERS section.
14573# No need to generate them if there are no CONFIG_HEADERS.
14574# This happens for instance with `./config.status Makefile'.
14575if test -n "$CONFIG_HEADERS"; then
14576cat >"$tmp/defines.awk" <<\_ACAWK ||
14577BEGIN {
14578_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014579
Matthias Kloseb9621712010-04-24 17:59:49 +000014580# Transform confdefs.h into an awk script `defines.awk', embedded as
14581# here-document in config.status, that substitutes the proper values into
14582# config.h.in to produce config.h.
14583
14584# Create a delimiter string that does not exist in confdefs.h, to ease
14585# handling of long lines.
14586ac_delim='%!_!# '
14587for ac_last_try in false false :; do
14588 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14589 if test -z "$ac_t"; then
14590 break
14591 elif $ac_last_try; then
Benjamin Peterson79263252010-10-31 16:50:44 +000014592 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014593 else
14594 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14595 fi
14596done
14597
14598# For the awk script, D is an array of macro values keyed by name,
14599# likewise P contains macro parameters if any. Preserve backslash
14600# newline sequences.
14601
14602ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14603sed -n '
14604s/.\{148\}/&'"$ac_delim"'/g
14605t rset
14606:rset
14607s/^[ ]*#[ ]*define[ ][ ]*/ /
14608t def
14609d
14610:def
14611s/\\$//
14612t bsnl
14613s/["\\]/\\&/g
14614s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14615D["\1"]=" \3"/p
14616s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14617d
14618:bsnl
14619s/["\\]/\\&/g
14620s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14621D["\1"]=" \3\\\\\\n"\\/p
14622t cont
14623s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14624t cont
14625d
14626:cont
14627n
14628s/.\{148\}/&'"$ac_delim"'/g
14629t clear
14630:clear
14631s/\\$//
14632t bsnlc
14633s/["\\]/\\&/g; s/^/"/; s/$/"/p
14634d
14635:bsnlc
14636s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14637b cont
14638' <confdefs.h | sed '
14639s/'"$ac_delim"'/"\\\
14640"/g' >>$CONFIG_STATUS || ac_write_fail=1
14641
14642cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14643 for (key in D) D_is_set[key] = 1
14644 FS = ""
14645}
14646/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14647 line = \$ 0
14648 split(line, arg, " ")
14649 if (arg[1] == "#") {
14650 defundef = arg[2]
14651 mac1 = arg[3]
14652 } else {
14653 defundef = substr(arg[1], 2)
14654 mac1 = arg[2]
14655 }
14656 split(mac1, mac2, "(") #)
14657 macro = mac2[1]
14658 prefix = substr(line, 1, index(line, defundef) - 1)
14659 if (D_is_set[macro]) {
14660 # Preserve the white space surrounding the "#".
14661 print prefix "define", macro P[macro] D[macro]
14662 next
14663 } else {
14664 # Replace #undef with comments. This is necessary, for example,
14665 # in the case of _POSIX_SOURCE, which is predefined and required
14666 # on some systems where configure will not decide to define it.
14667 if (defundef == "undef") {
14668 print "/*", prefix defundef, macro, "*/"
14669 next
14670 }
14671 }
14672}
14673{ print }
14674_ACAWK
14675_ACEOF
14676cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Benjamin Peterson79263252010-10-31 16:50:44 +000014677 as_fn_error "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014678fi # test -n "$CONFIG_HEADERS"
14679
14680
14681eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14682shift
14683for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014684do
14685 case $ac_tag in
14686 :[FHLC]) ac_mode=$ac_tag; continue;;
14687 esac
14688 case $ac_mode$ac_tag in
14689 :[FHL]*:*);;
Benjamin Peterson79263252010-10-31 16:50:44 +000014690 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014691 :[FH]-) ac_tag=-:-;;
14692 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14693 esac
14694 ac_save_IFS=$IFS
14695 IFS=:
14696 set x $ac_tag
14697 IFS=$ac_save_IFS
14698 shift
14699 ac_file=$1
14700 shift
14701
14702 case $ac_mode in
14703 :L) ac_source=$1;;
14704 :[FH])
14705 ac_file_inputs=
14706 for ac_f
14707 do
14708 case $ac_f in
14709 -) ac_f="$tmp/stdin";;
14710 *) # Look for the file first in the build tree, then in the source tree
14711 # (if the path is not absolute). The absolute path cannot be DOS-style,
14712 # because $ac_f cannot contain `:'.
14713 test -f "$ac_f" ||
14714 case $ac_f in
14715 [\\/$]*) false;;
14716 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14717 esac ||
Benjamin Peterson79263252010-10-31 16:50:44 +000014718 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014719 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014720 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14721 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014722 done
14723
14724 # Let's still pretend it is `configure' which instantiates (i.e., don't
14725 # use $as_me), people would be surprised to read:
14726 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014727 configure_input='Generated from '`
14728 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14729 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014730 if test x"$ac_file" != x-; then
14731 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014732 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14733$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014734 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014735 # Neutralize special characters interpreted by sed in replacement strings.
14736 case $configure_input in #(
14737 *\&* | *\|* | *\\* )
14738 ac_sed_conf_input=`$as_echo "$configure_input" |
14739 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14740 *) ac_sed_conf_input=$configure_input;;
14741 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014742
14743 case $ac_tag in
Matthias Kloseb9621712010-04-24 17:59:49 +000014744 *:-:* | *:-) cat >"$tmp/stdin" \
Benjamin Peterson79263252010-10-31 16:50:44 +000014745 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014746 esac
14747 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014748 esac
14749
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014750 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014751$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014752 X"$ac_file" : 'X\(//\)[^/]' \| \
14753 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014754 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014755$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014756 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14757 s//\1/
14758 q
14759 }
14760 /^X\(\/\/\)[^/].*/{
14761 s//\1/
14762 q
14763 }
14764 /^X\(\/\/\)$/{
14765 s//\1/
14766 q
14767 }
14768 /^X\(\/\).*/{
14769 s//\1/
14770 q
14771 }
14772 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014773 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014774 ac_builddir=.
14775
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014776case "$ac_dir" in
14777.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14778*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014779 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014780 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014781 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014782 case $ac_top_builddir_sub in
14783 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14784 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14785 esac ;;
14786esac
14787ac_abs_top_builddir=$ac_pwd
14788ac_abs_builddir=$ac_pwd$ac_dir_suffix
14789# for backward compatibility:
14790ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014791
14792case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014793 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014794 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014795 ac_top_srcdir=$ac_top_builddir_sub
14796 ac_abs_top_srcdir=$ac_pwd ;;
14797 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014798 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014799 ac_top_srcdir=$srcdir
14800 ac_abs_top_srcdir=$srcdir ;;
14801 *) # Relative name.
14802 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14803 ac_top_srcdir=$ac_top_build_prefix$srcdir
14804 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014805esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014806ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014807
Martin v. Löwis11437992002-04-12 09:54:03 +000014808
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014809 case $ac_mode in
14810 :F)
14811 #
14812 # CONFIG_FILE
14813 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014814
14815 case $INSTALL in
14816 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014817 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014818 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014819_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014820
Matthias Kloseb9621712010-04-24 17:59:49 +000014821cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014822# If the template does not know about datarootdir, expand it.
14823# FIXME: This hack should be removed a few years after 2.60.
14824ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014825ac_sed_dataroot='
14826/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014827 p
14828 q
14829}
14830/@datadir@/p
14831/@docdir@/p
14832/@infodir@/p
14833/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014834/@mandir@/p'
14835case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014836*datarootdir*) ac_datarootdir_seen=yes;;
14837*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014838 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14839$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014841cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014842 ac_datarootdir_hack='
14843 s&@datadir@&$datadir&g
14844 s&@docdir@&$docdir&g
14845 s&@infodir@&$infodir&g
14846 s&@localedir@&$localedir&g
14847 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000014848 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014849esac
14850_ACEOF
14851
14852# Neutralize VPATH when `$srcdir' = `.'.
14853# Shell code in configure.ac might set extrasub.
14854# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000014855cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14856ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014857$extrasub
14858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014859cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014860:t
14861/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000014862s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014863s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000014864s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014865s&@srcdir@&$ac_srcdir&;t t
14866s&@abs_srcdir@&$ac_abs_srcdir&;t t
14867s&@top_srcdir@&$ac_top_srcdir&;t t
14868s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14869s&@builddir@&$ac_builddir&;t t
14870s&@abs_builddir@&$ac_abs_builddir&;t t
14871s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14872s&@INSTALL@&$ac_INSTALL&;t t
14873$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000014874"
14875eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
Benjamin Peterson79263252010-10-31 16:50:44 +000014876 || as_fn_error "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014877
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014878test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14879 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14880 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014881 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Benjamin Peterson79263252010-10-31 16:50:44 +000014882which seems to be undefined. Please make sure it is defined." >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014883$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Benjamin Peterson79263252010-10-31 16:50:44 +000014884which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014885
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014886 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000014887 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +000014888 -) cat "$tmp/out" && rm -f "$tmp/out";;
14889 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
14890 esac \
Benjamin Peterson79263252010-10-31 16:50:44 +000014891 || as_fn_error "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014892 ;;
14893 :H)
14894 #
14895 # CONFIG_HEADER
14896 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014897 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014898 {
14899 $as_echo "/* $configure_input */" \
14900 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14901 } >"$tmp/config.h" \
Benjamin Peterson79263252010-10-31 16:50:44 +000014902 || as_fn_error "could not create $ac_file" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014903 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
14904 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14905$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014906 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014907 rm -f "$ac_file"
14908 mv "$tmp/config.h" "$ac_file" \
Benjamin Peterson79263252010-10-31 16:50:44 +000014909 || as_fn_error "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014910 fi
14911 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014912 $as_echo "/* $configure_input */" \
14913 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
Benjamin Peterson79263252010-10-31 16:50:44 +000014914 || as_fn_error "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014915 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014916 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014917
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014918
14919 esac
14920
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014921
14922 case $ac_file$ac_mode in
14923 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
14924
14925 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014926done # for ac_tag
14927
Guido van Rossum627b2d71993-12-24 10:39:16 +000014928
Matthias Kloseb9621712010-04-24 17:59:49 +000014929as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000014930_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014931ac_clean_files=$ac_clean_files_save
14932
Matthias Kloseb9621712010-04-24 17:59:49 +000014933test $ac_write_fail = 0 ||
Benjamin Peterson79263252010-10-31 16:50:44 +000014934 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014935
Martin v. Löwis11437992002-04-12 09:54:03 +000014936
14937# configure is writing to config.log, and then calls config.status.
14938# config.status does its own redirection, appending to config.log.
14939# Unfortunately, on DOS this fails, as config.log is still kept open
14940# by configure, so config.status won't be able to write to it; its
14941# output is simply discarded. So we exec the FD to /dev/null,
14942# effectively closing config.log, so it can be properly (re)opened and
14943# appended to by config.status. When coming back to configure, we
14944# need to make the FD available again.
14945if test "$no_create" != yes; then
14946 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000014947 ac_config_status_args=
14948 test "$silent" = yes &&
14949 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000014950 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000014951 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000014952 exec 5>>config.log
14953 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14954 # would make configure fail if this is the last instruction.
Benjamin Peterson79263252010-10-31 16:50:44 +000014955 $ac_cs_success || as_fn_exit $?
Matthias Kloseb9621712010-04-24 17:59:49 +000014956fi
14957if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
14958 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
14959$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014960fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000014961
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014962
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014963echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014964if test ! -f Modules/Setup
14965then
14966 cp $srcdir/Modules/Setup.dist Modules/Setup
14967fi
14968
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014969echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014970if test ! -f Modules/Setup.local
14971then
14972 echo "# Edit this file for local setup changes" >Modules/Setup.local
14973fi
14974
14975echo "creating Makefile"
14976$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
14977 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000014978 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014979mv config.c Modules