blob: cfb0adc176752cb44a48fb27d084d76f95cb1001 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00002# From configure.in Revision: 88567 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00004# Generated by GNU Autoconf 2.65 for python 3.3.
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 Peterson83a0efd2011-02-25 14:01:05 +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
Benjamin Peterson83a0efd2011-02-25 14:01:05 +0000224 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Matthias Kloseb9621712010-04-24 17:59:49 +0000225fi
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 Peterson83a0efd2011-02-25 14:01:05 +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 Peterson83a0efd2011-02-25 14:01:05 +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 Peterson83a0efd2011-02-25 14:01:05 +0000367# script with status $?, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000368as_fn_error ()
369{
Benjamin Peterson83a0efd2011-02-25 14:01:05 +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 Peterson83a0efd2011-02-25 14:01:05 +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 Peterson83a0efd2011-02-25 14:01:05 +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'
Georg Brandl3ebb6b32011-02-20 10:37:07 +0000556PACKAGE_VERSION='3.3'
557PACKAGE_STRING='python 3.3'
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
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000650PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000651BLDLIBRARY
652DLLLIBRARY
653LDLIBRARY
654LIBRARY
655BUILDEXEEXT
656EGREP
657GREP
658CPP
659MAINCC
660CXX
661OBJEXT
662EXEEXT
663ac_ct_CC
664CPPFLAGS
665LDFLAGS
666CFLAGS
667CC
668EXPORT_MACOSX_DEPLOYMENT_TARGET
669CONFIGURE_MACOSX_DEPLOYMENT_TARGET
670SGI_ABI
671MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000672FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000673FRAMEWORKUNIXTOOLSPREFIX
674FRAMEWORKALTINSTALLLAST
675FRAMEWORKALTINSTALLFIRST
676FRAMEWORKINSTALLLAST
677FRAMEWORKINSTALLFIRST
678PYTHONFRAMEWORKINSTALLDIR
679PYTHONFRAMEWORKPREFIX
680PYTHONFRAMEWORKDIR
681PYTHONFRAMEWORKIDENTIFIER
682PYTHONFRAMEWORK
683LIPO_32BIT_FLAGS
684ARCH_RUN_32BIT
685UNIVERSALSDK
686CONFIG_ARGS
687SOVERSION
688VERSION
689target_alias
690host_alias
691build_alias
692LIBS
693ECHO_T
694ECHO_N
695ECHO_C
696DEFS
697mandir
698localedir
699libdir
700psdir
701pdfdir
702dvidir
703htmldir
704infodir
705docdir
706oldincludedir
707includedir
708localstatedir
709sharedstatedir
710sysconfdir
711datadir
712datarootdir
713libexecdir
714sbindir
715bindir
716program_transform_name
717prefix
718exec_prefix
719PACKAGE_URL
720PACKAGE_BUGREPORT
721PACKAGE_STRING
722PACKAGE_VERSION
723PACKAGE_TARNAME
724PACKAGE_NAME
725PATH_SEPARATOR
726SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000727ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000728ac_user_opts='
729enable_option_checking
730enable_universalsdk
731with_universal_archs
732with_framework_name
733enable_framework
734with_gcc
735with_cxx_main
736with_suffix
737enable_shared
738enable_profiling
739with_pydebug
740with_libs
741with_system_expat
742with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000743enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000744with_dbmliborder
745with_signal_module
746with_dec_threads
747with_threads
748with_thread
749enable_ipv6
750with_doc_strings
751with_tsc
752with_pymalloc
753with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000754with_fpectl
755with_libm
756with_libc
757enable_big_digits
758with_wide_unicode
759with_computed_gotos
760'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000761 ac_precious_vars='build_alias
762host_alias
763target_alias
764CC
765CFLAGS
766LDFLAGS
767LIBS
768CPPFLAGS
Barry Warsaw14d98ac2010-11-24 19:43:47 +0000769CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000770
Guido van Rossum627b2d71993-12-24 10:39:16 +0000771
Guido van Rossum7f43da71994-08-01 12:15:30 +0000772# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000773ac_init_help=
774ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000775ac_unrecognized_opts=
776ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000777# The variables have the same names as the options, with
778# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000779cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000780exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000781no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000782no_recursion=
783prefix=NONE
784program_prefix=NONE
785program_suffix=NONE
786program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000787silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000788site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000789srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000790verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000791x_includes=NONE
792x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000793
794# Installation directory options.
795# These are left unexpanded so users can "make install exec_prefix=/foo"
796# and all the variables that are supposed to be based on exec_prefix
797# by default will actually change.
798# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000799# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000800bindir='${exec_prefix}/bin'
801sbindir='${exec_prefix}/sbin'
802libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000803datarootdir='${prefix}/share'
804datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000805sysconfdir='${prefix}/etc'
806sharedstatedir='${prefix}/com'
807localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000808includedir='${prefix}/include'
809oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000810docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
811infodir='${datarootdir}/info'
812htmldir='${docdir}'
813dvidir='${docdir}'
814pdfdir='${docdir}'
815psdir='${docdir}'
816libdir='${exec_prefix}/lib'
817localedir='${datarootdir}/locale'
818mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000819
Guido van Rossum7f43da71994-08-01 12:15:30 +0000820ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000821ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000822for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000823do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000824 # If the previous option needs an argument, assign it.
825 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000826 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827 ac_prev=
828 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000829 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000830
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000831 case $ac_option in
Benjamin Peterson83a0efd2011-02-25 14:01:05 +0000832 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
833 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000834 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000835
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000836 # Accept the important Cygnus configure options, so we can diagnose typos.
837
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000838 case $ac_dashdash$ac_option in
839 --)
840 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000841
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000842 -bindir | --bindir | --bindi | --bind | --bin | --bi)
843 ac_prev=bindir ;;
844 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000845 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000846
847 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000848 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000849 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000850 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000851
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000852 -cache-file | --cache-file | --cache-fil | --cache-fi \
853 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
854 ac_prev=cache_file ;;
855 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
856 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000857 cache_file=$ac_optarg ;;
858
859 --config-cache | -C)
860 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000861
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000863 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000864 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000865 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000866
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000867 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
868 | --dataroo | --dataro | --datar)
869 ac_prev=datarootdir ;;
870 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
871 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
872 datarootdir=$ac_optarg ;;
873
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000875 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000877 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson83a0efd2011-02-25 14:01:05 +0000878 as_fn_error "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000879 ac_useropt_orig=$ac_useropt
880 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
881 case $ac_user_opts in
882 *"
883"enable_$ac_useropt"
884"*) ;;
885 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
886 ac_unrecognized_sep=', ';;
887 esac
888 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000889
890 -docdir | --docdir | --docdi | --doc | --do)
891 ac_prev=docdir ;;
892 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
893 docdir=$ac_optarg ;;
894
895 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
896 ac_prev=dvidir ;;
897 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
898 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
900 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000901 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000902 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000903 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson83a0efd2011-02-25 14:01:05 +0000904 as_fn_error "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000905 ac_useropt_orig=$ac_useropt
906 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
907 case $ac_user_opts in
908 *"
909"enable_$ac_useropt"
910"*) ;;
911 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
912 ac_unrecognized_sep=', ';;
913 esac
914 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
917 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
918 | --exec | --exe | --ex)
919 ac_prev=exec_prefix ;;
920 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
921 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
922 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000923 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924
925 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000926 # Obsolete; use --with-gas.
927 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
Martin v. Löwis11437992002-04-12 09:54:03 +0000929 -help | --help | --hel | --he | -h)
930 ac_init_help=long ;;
931 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
932 ac_init_help=recursive ;;
933 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
934 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000935
936 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000938 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000939 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000940
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000941 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
942 ac_prev=htmldir ;;
943 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
944 | --ht=*)
945 htmldir=$ac_optarg ;;
946
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000947 -includedir | --includedir | --includedi | --included | --include \
948 | --includ | --inclu | --incl | --inc)
949 ac_prev=includedir ;;
950 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
951 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000953
954 -infodir | --infodir | --infodi | --infod | --info | --inf)
955 ac_prev=infodir ;;
956 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000958
959 -libdir | --libdir | --libdi | --libd)
960 ac_prev=libdir ;;
961 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000962 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000963
964 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
965 | --libexe | --libex | --libe)
966 ac_prev=libexecdir ;;
967 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
968 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000969 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000970
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000971 -localedir | --localedir | --localedi | --localed | --locale)
972 ac_prev=localedir ;;
973 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
974 localedir=$ac_optarg ;;
975
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000976 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000977 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000978 ac_prev=localstatedir ;;
979 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000980 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000982
983 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
984 ac_prev=mandir ;;
985 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000987
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000989 # Obsolete; use --without-fp.
990 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
992 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000993 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000994 no_create=yes ;;
995
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000996 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
997 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
998 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001000 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1001 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1002 | --oldin | --oldi | --old | --ol | --o)
1003 ac_prev=oldincludedir ;;
1004 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1005 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1006 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001008
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1010 ac_prev=prefix ;;
1011 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001012 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001013
1014 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1015 | --program-pre | --program-pr | --program-p)
1016 ac_prev=program_prefix ;;
1017 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1018 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020
1021 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1022 | --program-suf | --program-su | --program-s)
1023 ac_prev=program_suffix ;;
1024 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1025 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001026 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027
1028 -program-transform-name | --program-transform-name \
1029 | --program-transform-nam | --program-transform-na \
1030 | --program-transform-n | --program-transform- \
1031 | --program-transform | --program-transfor \
1032 | --program-transfo | --program-transf \
1033 | --program-trans | --program-tran \
1034 | --progr-tra | --program-tr | --program-t)
1035 ac_prev=program_transform_name ;;
1036 -program-transform-name=* | --program-transform-name=* \
1037 | --program-transform-nam=* | --program-transform-na=* \
1038 | --program-transform-n=* | --program-transform-=* \
1039 | --program-transform=* | --program-transfor=* \
1040 | --program-transfo=* | --program-transf=* \
1041 | --program-trans=* | --program-tran=* \
1042 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001044
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001045 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1046 ac_prev=pdfdir ;;
1047 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1048 pdfdir=$ac_optarg ;;
1049
1050 -psdir | --psdir | --psdi | --psd | --ps)
1051 ac_prev=psdir ;;
1052 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1053 psdir=$ac_optarg ;;
1054
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1056 | -silent | --silent | --silen | --sile | --sil)
1057 silent=yes ;;
1058
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1060 ac_prev=sbindir ;;
1061 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1062 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064
1065 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1066 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1067 | --sharedst | --shareds | --shared | --share | --shar \
1068 | --sha | --sh)
1069 ac_prev=sharedstatedir ;;
1070 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1071 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1072 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1073 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001075
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001076 -site | --site | --sit)
1077 ac_prev=site ;;
1078 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001080
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1082 ac_prev=srcdir ;;
1083 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001086 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1087 | --syscon | --sysco | --sysc | --sys | --sy)
1088 ac_prev=sysconfdir ;;
1089 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1090 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001092
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 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097
1098 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1099 verbose=yes ;;
1100
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 -version | --version | --versio | --versi | --vers | -V)
1102 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
1104 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001105 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001106 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001107 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001108 as_fn_error "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001109 ac_useropt_orig=$ac_useropt
1110 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1111 case $ac_user_opts in
1112 *"
1113"with_$ac_useropt"
1114"*) ;;
1115 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1116 ac_unrecognized_sep=', ';;
1117 esac
1118 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119
1120 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001121 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001122 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001123 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001124 as_fn_error "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001125 ac_useropt_orig=$ac_useropt
1126 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1127 case $ac_user_opts in
1128 *"
1129"with_$ac_useropt"
1130"*) ;;
1131 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1132 ac_unrecognized_sep=', ';;
1133 esac
1134 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001136 --x)
1137 # Obsolete; use --with-x.
1138 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001139
1140 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1141 | --x-incl | --x-inc | --x-in | --x-i)
1142 ac_prev=x_includes ;;
1143 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1144 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001145 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146
1147 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1148 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1149 ac_prev=x_libraries ;;
1150 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1151 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001152 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001153
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001154 -*) as_fn_error "unrecognized option: \`$ac_option'
1155Try \`$0 --help' for more information."
Guido van Rossum7f43da71994-08-01 12:15:30 +00001156 ;;
1157
Martin v. Löwis11437992002-04-12 09:54:03 +00001158 *=*)
1159 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1160 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001161 case $ac_envvar in #(
1162 '' | [0-9]* | *[!_$as_cr_alnum]* )
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001163 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001164 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001165 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 export $ac_envvar ;;
1167
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001168 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001170 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001172 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001173 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174 ;;
1175
1176 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001177done
1178
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001181 as_fn_error "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182fi
1183
Matthias Kloseb9621712010-04-24 17:59:49 +00001184if test -n "$ac_unrecognized_opts"; then
1185 case $enable_option_checking in
1186 no) ;;
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001187 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001188 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1189 esac
1190fi
1191
1192# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001193for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1194 datadir sysconfdir sharedstatedir localstatedir includedir \
1195 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1196 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001197do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001198 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001199 # Remove trailing slashes.
1200 case $ac_val in
1201 */ )
1202 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1203 eval $ac_var=\$ac_val;;
1204 esac
1205 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001206 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001207 [\\/$]* | ?:[\\/]* ) continue;;
1208 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209 esac
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001210 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001211done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001212
Martin v. Löwis11437992002-04-12 09:54:03 +00001213# There might be people who depend on the old broken behavior: `$host'
1214# used to hold the argument of --host etc.
1215# FIXME: To remove some day.
1216build=$build_alias
1217host=$host_alias
1218target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001219
Martin v. Löwis11437992002-04-12 09:54:03 +00001220# FIXME: To remove some day.
1221if test "x$host_alias" != x; then
1222 if test "x$build_alias" = x; then
1223 cross_compiling=maybe
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001224 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1225 If a cross compiler is detected then cross compile mode will be used." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001226 elif test "x$build_alias" != "x$host_alias"; then
1227 cross_compiling=yes
1228 fi
1229fi
1230
1231ac_tool_prefix=
1232test -n "$host_alias" && ac_tool_prefix=$host_alias-
1233
1234test "$silent" = yes && exec 6>/dev/null
1235
Guido van Rossum627b2d71993-12-24 10:39:16 +00001236
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001237ac_pwd=`pwd` && test -n "$ac_pwd" &&
1238ac_ls_di=`ls -di .` &&
1239ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001240 as_fn_error "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001241test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001242 as_fn_error "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001243
1244
Guido van Rossum627b2d71993-12-24 10:39:16 +00001245# Find the source files, if location was not specified.
1246if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001248 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001249 ac_confdir=`$as_dirname -- "$as_myself" ||
1250$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1251 X"$as_myself" : 'X\(//\)[^/]' \| \
1252 X"$as_myself" : 'X\(//\)$' \| \
1253 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1254$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001255 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1256 s//\1/
1257 q
1258 }
1259 /^X\(\/\/\)[^/].*/{
1260 s//\1/
1261 q
1262 }
1263 /^X\(\/\/\)$/{
1264 s//\1/
1265 q
1266 }
1267 /^X\(\/\).*/{
1268 s//\1/
1269 q
1270 }
1271 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001272 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001273 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001274 srcdir=..
1275 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001276else
1277 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001278fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001279if test ! -r "$srcdir/$ac_unique_file"; then
1280 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001281 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001283ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1284ac_abs_confdir=`(
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001285 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001286 pwd)`
1287# When building in place, set srcdir=.
1288if test "$ac_abs_confdir" = "$ac_pwd"; then
1289 srcdir=.
1290fi
1291# Remove unnecessary trailing slashes from srcdir.
1292# Double slashes in file names in object file debugging info
1293# mess up M-x gdb in Emacs.
1294case $srcdir in
1295*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1296esac
1297for ac_var in $ac_precious_vars; do
1298 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1299 eval ac_env_${ac_var}_value=\$${ac_var}
1300 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1301 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1302done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001303
Martin v. Löwis11437992002-04-12 09:54:03 +00001304#
1305# Report the --help message.
1306#
1307if test "$ac_init_help" = "long"; then
1308 # Omit some internal or obsolete options to make the list less imposing.
1309 # This message is too long to be a string in the A/UX 3.1 sh.
1310 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001311\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001312
1313Usage: $0 [OPTION]... [VAR=VALUE]...
1314
1315To assign environment variables (e.g., CC, CFLAGS...), specify them as
1316VAR=VALUE. See below for descriptions of some of the useful variables.
1317
1318Defaults for the options are specified in brackets.
1319
1320Configuration:
1321 -h, --help display this help and exit
1322 --help=short display options specific to this package
1323 --help=recursive display the short help of all the included packages
1324 -V, --version display version information and exit
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001325 -q, --quiet, --silent do not print \`checking...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001326 --cache-file=FILE cache test results in FILE [disabled]
1327 -C, --config-cache alias for \`--cache-file=config.cache'
1328 -n, --no-create do not create output files
1329 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1330
Martin v. Löwis11437992002-04-12 09:54:03 +00001331Installation directories:
1332 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001333 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001334 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001335 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001336
1337By default, \`make install' will install all the files in
1338\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1339an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1340for instance \`--prefix=\$HOME'.
1341
1342For better control, use the options below.
1343
1344Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001345 --bindir=DIR user executables [EPREFIX/bin]
1346 --sbindir=DIR system admin executables [EPREFIX/sbin]
1347 --libexecdir=DIR program executables [EPREFIX/libexec]
1348 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1349 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1350 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1351 --libdir=DIR object code libraries [EPREFIX/lib]
1352 --includedir=DIR C header files [PREFIX/include]
1353 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1354 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1355 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1356 --infodir=DIR info documentation [DATAROOTDIR/info]
1357 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1358 --mandir=DIR man documentation [DATAROOTDIR/man]
1359 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1360 --htmldir=DIR html documentation [DOCDIR]
1361 --dvidir=DIR dvi documentation [DOCDIR]
1362 --pdfdir=DIR pdf documentation [DOCDIR]
1363 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001364_ACEOF
1365
1366 cat <<\_ACEOF
1367_ACEOF
1368fi
1369
1370if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001371 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001372 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001373 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001374 cat <<\_ACEOF
1375
1376Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001377 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001378 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1379 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001380 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001381 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001382 --enable-framework[=INSTALLDIR]
1383 Build (MacOSX|Darwin) framework
1384 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001385 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001386 --enable-loadable-sqlite-extensions
1387 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001388 --enable-ipv6 Enable ipv6 (with ipv4) support
1389 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001390 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001391 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001392
1393Optional Packages:
1394 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1395 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001396 --with-universal-archs=ARCH
1397 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001398 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001399 --with-framework-name=FRAMEWORK
1400 specify an alternate name of the framework built
1401 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001402 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001403 --with-cxx-main=<compiler>
1404 compile main() and link python executable with C++
1405 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001406 --with-suffix=.exe set executable suffix
1407 --with-pydebug build with Py_DEBUG defined
1408 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001409 --with-system-expat build pyexpat module using an installed expat
1410 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001411 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001412 --with-dbmliborder=db1:db2:...
1413 order to check db backends for dbm. Valid value is a
1414 colon separated string with the backend names
1415 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001416 --with-signal-module disable/enable signal module
1417 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1418 --with(out)-threads[=DIRECTORY]
1419 disable/enable thread support
1420 --with(out)-thread[=DIRECTORY]
1421 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001422 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001423 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001424 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001425 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001426 --with-fpectl enable SIGFPE catching
1427 --with-libm=STRING math library
1428 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001429 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001430 --with(out)-computed-gotos
1431 Use computed gotos in evaluation loop (enabled by
1432 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001433
1434Some influential environment variables:
1435 CC C compiler command
1436 CFLAGS C compiler flags
1437 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1438 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001439 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001440 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001441 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001442 CPP C preprocessor
1443
1444Use these variables to override the choices made by `configure' or to help
1445it to find libraries and programs with nonstandard names/locations.
1446
Georg Brandle2e15612009-05-20 18:25:10 +00001447Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001448_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001449ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001450fi
1451
1452if test "$ac_init_help" = "recursive"; then
1453 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001454 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001455 test -d "$ac_dir" ||
1456 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1457 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001458 ac_builddir=.
1459
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001460case "$ac_dir" in
1461.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1462*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001463 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001464 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001465 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001466 case $ac_top_builddir_sub in
1467 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1468 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1469 esac ;;
1470esac
1471ac_abs_top_builddir=$ac_pwd
1472ac_abs_builddir=$ac_pwd$ac_dir_suffix
1473# for backward compatibility:
1474ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001475
1476case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001477 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001478 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001479 ac_top_srcdir=$ac_top_builddir_sub
1480 ac_abs_top_srcdir=$ac_pwd ;;
1481 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001482 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001483 ac_top_srcdir=$srcdir
1484 ac_abs_top_srcdir=$srcdir ;;
1485 *) # Relative name.
1486 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1487 ac_top_srcdir=$ac_top_build_prefix$srcdir
1488 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001489esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001490ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001491
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001492 cd "$ac_dir" || { ac_status=$?; continue; }
1493 # Check for guested configure.
1494 if test -f "$ac_srcdir/configure.gnu"; then
1495 echo &&
1496 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1497 elif test -f "$ac_srcdir/configure"; then
1498 echo &&
1499 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001500 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001501 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001502 fi || ac_status=$?
1503 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001504 done
1505fi
1506
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001507test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001508if $ac_init_version; then
1509 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001510python configure 3.3
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001511generated by GNU Autoconf 2.65
Martin v. Löwis11437992002-04-12 09:54:03 +00001512
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001513Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001514This configure script is free software; the Free Software Foundation
1515gives unlimited permission to copy, distribute and modify it.
1516_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001517 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001518fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001519
1520## ------------------------ ##
1521## Autoconf initialization. ##
1522## ------------------------ ##
1523
1524# ac_fn_c_try_compile LINENO
1525# --------------------------
1526# Try to compile conftest.$ac_ext, and return whether this succeeded.
1527ac_fn_c_try_compile ()
1528{
1529 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1530 rm -f conftest.$ac_objext
1531 if { { ac_try="$ac_compile"
1532case "(($ac_try" in
1533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1534 *) ac_try_echo=$ac_try;;
1535esac
1536eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1537$as_echo "$ac_try_echo"; } >&5
1538 (eval "$ac_compile") 2>conftest.err
1539 ac_status=$?
1540 if test -s conftest.err; then
1541 grep -v '^ *+' conftest.err >conftest.er1
1542 cat conftest.er1 >&5
1543 mv -f conftest.er1 conftest.err
1544 fi
1545 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1546 test $ac_status = 0; } && {
1547 test -z "$ac_c_werror_flag" ||
1548 test ! -s conftest.err
1549 } && test -s conftest.$ac_objext; then :
1550 ac_retval=0
1551else
1552 $as_echo "$as_me: failed program was:" >&5
1553sed 's/^/| /' conftest.$ac_ext >&5
1554
1555 ac_retval=1
1556fi
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001557 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001558 as_fn_set_status $ac_retval
1559
1560} # ac_fn_c_try_compile
1561
1562# ac_fn_c_try_cpp LINENO
1563# ----------------------
1564# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1565ac_fn_c_try_cpp ()
1566{
1567 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1568 if { { ac_try="$ac_cpp conftest.$ac_ext"
1569case "(($ac_try" in
1570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1571 *) ac_try_echo=$ac_try;;
1572esac
1573eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1574$as_echo "$ac_try_echo"; } >&5
1575 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1576 ac_status=$?
1577 if test -s conftest.err; then
1578 grep -v '^ *+' conftest.err >conftest.er1
1579 cat conftest.er1 >&5
1580 mv -f conftest.er1 conftest.err
1581 fi
1582 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001583 test $ac_status = 0; } >/dev/null && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001584 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1585 test ! -s conftest.err
1586 }; then :
1587 ac_retval=0
1588else
1589 $as_echo "$as_me: failed program was:" >&5
1590sed 's/^/| /' conftest.$ac_ext >&5
1591
1592 ac_retval=1
1593fi
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001594 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001595 as_fn_set_status $ac_retval
1596
1597} # ac_fn_c_try_cpp
1598
1599# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1600# -------------------------------------------------------
1601# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1602# the include files in INCLUDES and setting the cache variable VAR
1603# accordingly.
1604ac_fn_c_check_header_mongrel ()
1605{
1606 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001607 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1609$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001610if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001611 $as_echo_n "(cached) " >&6
1612fi
1613eval ac_res=\$$3
1614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1615$as_echo "$ac_res" >&6; }
1616else
1617 # Is the header compilable?
1618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1619$as_echo_n "checking $2 usability... " >&6; }
1620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1621/* end confdefs.h. */
1622$4
1623#include <$2>
1624_ACEOF
1625if ac_fn_c_try_compile "$LINENO"; then :
1626 ac_header_compiler=yes
1627else
1628 ac_header_compiler=no
1629fi
1630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1632$as_echo "$ac_header_compiler" >&6; }
1633
1634# Is the header present?
1635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1636$as_echo_n "checking $2 presence... " >&6; }
1637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1638/* end confdefs.h. */
1639#include <$2>
1640_ACEOF
1641if ac_fn_c_try_cpp "$LINENO"; then :
1642 ac_header_preproc=yes
1643else
1644 ac_header_preproc=no
1645fi
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001646rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1648$as_echo "$ac_header_preproc" >&6; }
1649
1650# So? What about this header?
1651case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1652 yes:no: )
1653 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1654$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1655 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1656$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1657 ;;
1658 no:yes:* )
1659 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1660$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1661 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1662$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1663 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1664$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1665 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1666$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1667 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1668$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001669( cat <<\_ASBOX
1670## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001671## Report this to http://bugs.python.org/ ##
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001672## -------------------------------------- ##
1673_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +00001674 ) | sed "s/^/$as_me: WARNING: /" >&2
1675 ;;
1676esac
1677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1678$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001679if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001680 $as_echo_n "(cached) " >&6
1681else
1682 eval "$3=\$ac_header_compiler"
1683fi
1684eval ac_res=\$$3
1685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1686$as_echo "$ac_res" >&6; }
1687fi
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001688 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001689
1690} # ac_fn_c_check_header_mongrel
1691
1692# ac_fn_c_try_run LINENO
1693# ----------------------
1694# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1695# that executables *can* be run.
1696ac_fn_c_try_run ()
1697{
1698 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1699 if { { ac_try="$ac_link"
1700case "(($ac_try" in
1701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1702 *) ac_try_echo=$ac_try;;
1703esac
1704eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1705$as_echo "$ac_try_echo"; } >&5
1706 (eval "$ac_link") 2>&5
1707 ac_status=$?
1708 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1709 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1710 { { case "(($ac_try" in
1711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1712 *) ac_try_echo=$ac_try;;
1713esac
1714eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1715$as_echo "$ac_try_echo"; } >&5
1716 (eval "$ac_try") 2>&5
1717 ac_status=$?
1718 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1719 test $ac_status = 0; }; }; then :
1720 ac_retval=0
1721else
1722 $as_echo "$as_me: program exited with status $ac_status" >&5
1723 $as_echo "$as_me: failed program was:" >&5
1724sed 's/^/| /' conftest.$ac_ext >&5
1725
1726 ac_retval=$ac_status
1727fi
1728 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001729 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001730 as_fn_set_status $ac_retval
1731
1732} # ac_fn_c_try_run
1733
1734# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1735# -------------------------------------------------------
1736# Tests whether HEADER exists and can be compiled using the include files in
1737# INCLUDES, setting the cache variable VAR accordingly.
1738ac_fn_c_check_header_compile ()
1739{
1740 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1742$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001743if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001744 $as_echo_n "(cached) " >&6
1745else
1746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1747/* end confdefs.h. */
1748$4
1749#include <$2>
1750_ACEOF
1751if ac_fn_c_try_compile "$LINENO"; then :
1752 eval "$3=yes"
1753else
1754 eval "$3=no"
1755fi
1756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1757fi
1758eval ac_res=\$$3
1759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1760$as_echo "$ac_res" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001761 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001762
1763} # ac_fn_c_check_header_compile
1764
1765# ac_fn_c_try_link LINENO
1766# -----------------------
1767# Try to link conftest.$ac_ext, and return whether this succeeded.
1768ac_fn_c_try_link ()
1769{
1770 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1771 rm -f conftest.$ac_objext conftest$ac_exeext
1772 if { { ac_try="$ac_link"
1773case "(($ac_try" in
1774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1775 *) ac_try_echo=$ac_try;;
1776esac
1777eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1778$as_echo "$ac_try_echo"; } >&5
1779 (eval "$ac_link") 2>conftest.err
1780 ac_status=$?
1781 if test -s conftest.err; then
1782 grep -v '^ *+' conftest.err >conftest.er1
1783 cat conftest.er1 >&5
1784 mv -f conftest.er1 conftest.err
1785 fi
1786 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1787 test $ac_status = 0; } && {
1788 test -z "$ac_c_werror_flag" ||
1789 test ! -s conftest.err
1790 } && test -s conftest$ac_exeext && {
1791 test "$cross_compiling" = yes ||
1792 $as_test_x conftest$ac_exeext
1793 }; then :
1794 ac_retval=0
1795else
1796 $as_echo "$as_me: failed program was:" >&5
1797sed 's/^/| /' conftest.$ac_ext >&5
1798
1799 ac_retval=1
1800fi
1801 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1802 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1803 # interfere with the next link command; also delete a directory that is
1804 # left behind by Apple's compiler. We do this before executing the actions.
1805 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001806 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001807 as_fn_set_status $ac_retval
1808
1809} # ac_fn_c_try_link
1810
1811# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1812# -------------------------------------------
1813# Tests whether TYPE exists after having included INCLUDES, setting cache
1814# variable VAR accordingly.
1815ac_fn_c_check_type ()
1816{
1817 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1819$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001820if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001821 $as_echo_n "(cached) " >&6
1822else
1823 eval "$3=no"
1824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1825/* end confdefs.h. */
1826$4
1827int
1828main ()
1829{
1830if (sizeof ($2))
1831 return 0;
1832 ;
1833 return 0;
1834}
1835_ACEOF
1836if ac_fn_c_try_compile "$LINENO"; then :
1837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1838/* end confdefs.h. */
1839$4
1840int
1841main ()
1842{
1843if (sizeof (($2)))
1844 return 0;
1845 ;
1846 return 0;
1847}
1848_ACEOF
1849if ac_fn_c_try_compile "$LINENO"; then :
1850
1851else
1852 eval "$3=yes"
1853fi
1854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1855fi
1856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1857fi
1858eval ac_res=\$$3
1859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1860$as_echo "$ac_res" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001861 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001862
1863} # ac_fn_c_check_type
1864
1865# ac_fn_c_find_uintX_t LINENO BITS VAR
1866# ------------------------------------
1867# Finds an unsigned integer type with width BITS, setting cache variable VAR
1868# accordingly.
1869ac_fn_c_find_uintX_t ()
1870{
1871 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1873$as_echo_n "checking for uint$2_t... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001874if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001875 $as_echo_n "(cached) " >&6
1876else
1877 eval "$3=no"
1878 # Order is important - never check a type that is potentially smaller
1879 # than half of the expected target width.
1880 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1881 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1883/* end confdefs.h. */
1884$ac_includes_default
1885int
1886main ()
1887{
1888static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1889test_array [0] = 0
1890
1891 ;
1892 return 0;
1893}
1894_ACEOF
1895if ac_fn_c_try_compile "$LINENO"; then :
1896 case $ac_type in #(
1897 uint$2_t) :
1898 eval "$3=yes" ;; #(
1899 *) :
1900 eval "$3=\$ac_type" ;;
1901esac
1902fi
1903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001904 eval as_val=\$$3
1905 if test "x$as_val" = x""no; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001906
1907else
1908 break
1909fi
1910 done
1911fi
1912eval ac_res=\$$3
1913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1914$as_echo "$ac_res" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001915 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001916
1917} # ac_fn_c_find_uintX_t
1918
1919# ac_fn_c_find_intX_t LINENO BITS VAR
1920# -----------------------------------
1921# Finds a signed integer type with width BITS, setting cache variable VAR
1922# accordingly.
1923ac_fn_c_find_intX_t ()
1924{
1925 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1927$as_echo_n "checking for int$2_t... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001928if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001929 $as_echo_n "(cached) " >&6
1930else
1931 eval "$3=no"
1932 # Order is important - never check a type that is potentially smaller
1933 # than half of the expected target width.
1934 for ac_type in int$2_t 'int' 'long int' \
1935 'long long int' 'short int' 'signed char'; do
1936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1937/* end confdefs.h. */
1938$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001939 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001940int
1941main ()
1942{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001943static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001944test_array [0] = 0
1945
1946 ;
1947 return 0;
1948}
1949_ACEOF
1950if ac_fn_c_try_compile "$LINENO"; then :
1951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1952/* end confdefs.h. */
1953$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001954 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001955int
1956main ()
1957{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001958static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001959 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1960test_array [0] = 0
1961
1962 ;
1963 return 0;
1964}
1965_ACEOF
1966if ac_fn_c_try_compile "$LINENO"; then :
1967
1968else
1969 case $ac_type in #(
1970 int$2_t) :
1971 eval "$3=yes" ;; #(
1972 *) :
1973 eval "$3=\$ac_type" ;;
1974esac
1975fi
1976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1977fi
1978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001979 eval as_val=\$$3
1980 if test "x$as_val" = x""no; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001981
1982else
1983 break
1984fi
1985 done
1986fi
1987eval ac_res=\$$3
1988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1989$as_echo "$ac_res" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00001990 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001991
1992} # ac_fn_c_find_intX_t
1993
1994# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1995# --------------------------------------------
1996# Tries to find the compile-time value of EXPR in a program that includes
1997# INCLUDES, setting VAR accordingly. Returns whether the value could be
1998# computed
1999ac_fn_c_compute_int ()
2000{
2001 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2002 if test "$cross_compiling" = yes; then
2003 # Depending upon the size, compute the lo and hi bounds.
2004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2005/* end confdefs.h. */
2006$4
2007int
2008main ()
2009{
2010static int test_array [1 - 2 * !(($2) >= 0)];
2011test_array [0] = 0
2012
2013 ;
2014 return 0;
2015}
2016_ACEOF
2017if ac_fn_c_try_compile "$LINENO"; then :
2018 ac_lo=0 ac_mid=0
2019 while :; do
2020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2021/* end confdefs.h. */
2022$4
2023int
2024main ()
2025{
2026static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2027test_array [0] = 0
2028
2029 ;
2030 return 0;
2031}
2032_ACEOF
2033if ac_fn_c_try_compile "$LINENO"; then :
2034 ac_hi=$ac_mid; break
2035else
2036 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2037 if test $ac_lo -le $ac_mid; then
2038 ac_lo= ac_hi=
2039 break
2040 fi
2041 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2042fi
2043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2044 done
2045else
2046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2047/* end confdefs.h. */
2048$4
2049int
2050main ()
2051{
2052static int test_array [1 - 2 * !(($2) < 0)];
2053test_array [0] = 0
2054
2055 ;
2056 return 0;
2057}
2058_ACEOF
2059if ac_fn_c_try_compile "$LINENO"; then :
2060 ac_hi=-1 ac_mid=-1
2061 while :; do
2062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2063/* end confdefs.h. */
2064$4
2065int
2066main ()
2067{
2068static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2069test_array [0] = 0
2070
2071 ;
2072 return 0;
2073}
2074_ACEOF
2075if ac_fn_c_try_compile "$LINENO"; then :
2076 ac_lo=$ac_mid; break
2077else
2078 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2079 if test $ac_mid -le $ac_hi; then
2080 ac_lo= ac_hi=
2081 break
2082 fi
2083 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2084fi
2085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2086 done
2087else
2088 ac_lo= ac_hi=
2089fi
2090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2091fi
2092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2093# Binary search between lo and hi bounds.
2094while test "x$ac_lo" != "x$ac_hi"; do
2095 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2097/* end confdefs.h. */
2098$4
2099int
2100main ()
2101{
2102static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2103test_array [0] = 0
2104
2105 ;
2106 return 0;
2107}
2108_ACEOF
2109if ac_fn_c_try_compile "$LINENO"; then :
2110 ac_hi=$ac_mid
2111else
2112 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2113fi
2114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2115done
2116case $ac_lo in #((
2117?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2118'') ac_retval=1 ;;
2119esac
2120 else
2121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122/* end confdefs.h. */
2123$4
2124static long int longval () { return $2; }
2125static unsigned long int ulongval () { return $2; }
2126#include <stdio.h>
2127#include <stdlib.h>
2128int
2129main ()
2130{
2131
2132 FILE *f = fopen ("conftest.val", "w");
2133 if (! f)
2134 return 1;
2135 if (($2) < 0)
2136 {
2137 long int i = longval ();
2138 if (i != ($2))
2139 return 1;
2140 fprintf (f, "%ld", i);
2141 }
2142 else
2143 {
2144 unsigned long int i = ulongval ();
2145 if (i != ($2))
2146 return 1;
2147 fprintf (f, "%lu", i);
2148 }
2149 /* Do not output a trailing newline, as this causes \r\n confusion
2150 on some platforms. */
2151 return ferror (f) || fclose (f) != 0;
2152
2153 ;
2154 return 0;
2155}
2156_ACEOF
2157if ac_fn_c_try_run "$LINENO"; then :
2158 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2159else
2160 ac_retval=1
2161fi
2162rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2163 conftest.$ac_objext conftest.beam conftest.$ac_ext
2164rm -f conftest.val
2165
2166 fi
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00002167 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002168 as_fn_set_status $ac_retval
2169
2170} # ac_fn_c_compute_int
2171
2172# ac_fn_c_check_func LINENO FUNC VAR
2173# ----------------------------------
2174# Tests whether FUNC exists, setting the cache variable VAR accordingly
2175ac_fn_c_check_func ()
2176{
2177 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2179$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00002180if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002181 $as_echo_n "(cached) " >&6
2182else
2183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2184/* end confdefs.h. */
2185/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2186 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2187#define $2 innocuous_$2
2188
2189/* System header to define __stub macros and hopefully few prototypes,
2190 which can conflict with char $2 (); below.
2191 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2192 <limits.h> exists even on freestanding compilers. */
2193
2194#ifdef __STDC__
2195# include <limits.h>
2196#else
2197# include <assert.h>
2198#endif
2199
2200#undef $2
2201
2202/* Override any GCC internal prototype to avoid an error.
2203 Use char because int might match the return type of a GCC
2204 builtin and then its argument prototype would still apply. */
2205#ifdef __cplusplus
2206extern "C"
2207#endif
2208char $2 ();
2209/* The GNU C library defines this for functions which it implements
2210 to always fail with ENOSYS. Some functions are actually named
2211 something starting with __ and the normal name is an alias. */
2212#if defined __stub_$2 || defined __stub___$2
2213choke me
2214#endif
2215
2216int
2217main ()
2218{
2219return $2 ();
2220 ;
2221 return 0;
2222}
2223_ACEOF
2224if ac_fn_c_try_link "$LINENO"; then :
2225 eval "$3=yes"
2226else
2227 eval "$3=no"
2228fi
2229rm -f core conftest.err conftest.$ac_objext \
2230 conftest$ac_exeext conftest.$ac_ext
2231fi
2232eval ac_res=\$$3
2233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2234$as_echo "$ac_res" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00002235 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002236
2237} # ac_fn_c_check_func
2238
2239# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2240# ----------------------------------------------------
2241# Tries to find if the field MEMBER exists in type AGGR, after including
2242# INCLUDES, setting cache variable VAR accordingly.
2243ac_fn_c_check_member ()
2244{
2245 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2247$as_echo_n "checking for $2.$3... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00002248if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002249 $as_echo_n "(cached) " >&6
2250else
2251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2252/* end confdefs.h. */
2253$5
2254int
2255main ()
2256{
2257static $2 ac_aggr;
2258if (ac_aggr.$3)
2259return 0;
2260 ;
2261 return 0;
2262}
2263_ACEOF
2264if ac_fn_c_try_compile "$LINENO"; then :
2265 eval "$4=yes"
2266else
2267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2268/* end confdefs.h. */
2269$5
2270int
2271main ()
2272{
2273static $2 ac_aggr;
2274if (sizeof ac_aggr.$3)
2275return 0;
2276 ;
2277 return 0;
2278}
2279_ACEOF
2280if ac_fn_c_try_compile "$LINENO"; then :
2281 eval "$4=yes"
2282else
2283 eval "$4=no"
2284fi
2285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2286fi
2287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2288fi
2289eval ac_res=\$$4
2290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2291$as_echo "$ac_res" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00002292 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002293
2294} # ac_fn_c_check_member
2295
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00002296# ac_fn_c_check_decl LINENO SYMBOL VAR
2297# ------------------------------------
2298# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002299ac_fn_c_check_decl ()
2300{
2301 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00002302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2303$as_echo_n "checking whether $2 is declared... " >&6; }
2304if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002305 $as_echo_n "(cached) " >&6
2306else
2307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2308/* end confdefs.h. */
2309$4
2310int
2311main ()
2312{
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00002313#ifndef $2
2314 (void) $2;
Matthias Kloseb9621712010-04-24 17:59:49 +00002315#endif
2316
2317 ;
2318 return 0;
2319}
2320_ACEOF
2321if ac_fn_c_try_compile "$LINENO"; then :
2322 eval "$3=yes"
2323else
2324 eval "$3=no"
2325fi
2326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2327fi
2328eval ac_res=\$$3
2329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2330$as_echo "$ac_res" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00002331 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002332
2333} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002334cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002335This file contains any messages produced by compilers while
2336running configure, to aid debugging if configure makes a mistake.
2337
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002338It was created by python $as_me 3.3, which was
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00002339generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002340
2341 $ $0 $@
2342
2343_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002344exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002345{
2346cat <<_ASUNAME
2347## --------- ##
2348## Platform. ##
2349## --------- ##
2350
2351hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2352uname -m = `(uname -m) 2>/dev/null || echo unknown`
2353uname -r = `(uname -r) 2>/dev/null || echo unknown`
2354uname -s = `(uname -s) 2>/dev/null || echo unknown`
2355uname -v = `(uname -v) 2>/dev/null || echo unknown`
2356
2357/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2358/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2359
2360/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2361/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2362/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002363/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002364/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2365/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2366/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2367
2368_ASUNAME
2369
2370as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2371for as_dir in $PATH
2372do
2373 IFS=$as_save_IFS
2374 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002375 $as_echo "PATH: $as_dir"
2376 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002377IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002378
2379} >&5
2380
2381cat >&5 <<_ACEOF
2382
2383
2384## ----------- ##
2385## Core tests. ##
2386## ----------- ##
2387
2388_ACEOF
2389
2390
2391# Keep a trace of the command line.
2392# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002393# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002394# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002395# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002396ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002397ac_configure_args0=
2398ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002399ac_must_keep_next=false
2400for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002401do
Skip Montanaro6dead952003-09-25 14:50:04 +00002402 for ac_arg
2403 do
2404 case $ac_arg in
2405 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2406 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2407 | -silent | --silent | --silen | --sile | --sil)
2408 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002409 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002410 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002411 esac
2412 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002413 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002414 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002415 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002417 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002419 case $ac_arg in
2420 *=* | --config-cache | -C | -disable-* | --disable-* \
2421 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2422 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2423 | -with-* | --with-* | -without-* | --without-* | --x)
2424 case "$ac_configure_args0 " in
2425 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2426 esac
2427 ;;
2428 -* ) ac_must_keep_next=true ;;
2429 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002431 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 ;;
2433 esac
2434 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002435done
Matthias Kloseb9621712010-04-24 17:59:49 +00002436{ ac_configure_args0=; unset ac_configure_args0;}
2437{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002438
2439# When interrupted or exit'd, cleanup temporary files, and complete
2440# config.log. We remove comments because anyway the quotes in there
2441# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002442# WARNING: Use '\'' to represent an apostrophe within the trap.
2443# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002444trap 'exit_status=$?
2445 # Save into config.log some information that might help in debugging.
2446 {
2447 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002448
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00002449 cat <<\_ASBOX
2450## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002451## Cache variables. ##
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00002452## ---------------- ##
2453_ASBOX
Martin v. Löwis11437992002-04-12 09:54:03 +00002454 echo
2455 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002456(
2457 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2458 eval ac_val=\$$ac_var
2459 case $ac_val in #(
2460 *${as_nl}*)
2461 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002462 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2463$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002464 esac
2465 case $ac_var in #(
2466 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002467 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2468 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469 esac ;;
2470 esac
2471 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002472 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2474 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002475 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 "s/'\''/'\''\\\\'\'''\''/g;
2477 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2478 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002479 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002481 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002482 esac |
2483 sort
2484)
Martin v. Löwis11437992002-04-12 09:54:03 +00002485 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002486
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00002487 cat <<\_ASBOX
2488## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002489## Output variables. ##
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00002490## ----------------- ##
2491_ASBOX
Skip Montanaro6dead952003-09-25 14:50:04 +00002492 echo
2493 for ac_var in $ac_subst_vars
2494 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495 eval ac_val=\$$ac_var
2496 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002497 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002498 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002499 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002500 done | sort
2501 echo
2502
2503 if test -n "$ac_subst_files"; then
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00002504 cat <<\_ASBOX
2505## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506## File substitutions. ##
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00002507## ------------------- ##
2508_ASBOX
Skip Montanaro6dead952003-09-25 14:50:04 +00002509 echo
2510 for ac_var in $ac_subst_files
2511 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512 eval ac_val=\$$ac_var
2513 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002514 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002516 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 done | sort
2518 echo
2519 fi
2520
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 if test -s confdefs.h; then
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00002522 cat <<\_ASBOX
2523## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002524## confdefs.h. ##
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00002525## ----------- ##
2526_ASBOX
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 echo
2530 fi
2531 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002532 $as_echo "$as_me: caught signal $ac_signal"
2533 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535 rm -f core *.core core.conftest.* &&
2536 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002537 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002539for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002540 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002541done
2542ac_signal=0
2543
2544# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002545rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002546
Matthias Kloseb9621712010-04-24 17:59:49 +00002547$as_echo "/* confdefs.h */" > confdefs.h
2548
Martin v. Löwis11437992002-04-12 09:54:03 +00002549# Predefined preprocessor variables.
2550
2551cat >>confdefs.h <<_ACEOF
2552#define PACKAGE_NAME "$PACKAGE_NAME"
2553_ACEOF
2554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555cat >>confdefs.h <<_ACEOF
2556#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2557_ACEOF
2558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_VERSION "$PACKAGE_VERSION"
2561_ACEOF
2562
Martin v. Löwis11437992002-04-12 09:54:03 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_STRING "$PACKAGE_STRING"
2565_ACEOF
2566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567cat >>confdefs.h <<_ACEOF
2568#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2569_ACEOF
2570
Matthias Kloseb9621712010-04-24 17:59:49 +00002571cat >>confdefs.h <<_ACEOF
2572#define PACKAGE_URL "$PACKAGE_URL"
2573_ACEOF
2574
Martin v. Löwis11437992002-04-12 09:54:03 +00002575
2576# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002577# Prefer an explicitly selected file to automatically selected ones.
2578ac_site_file1=NONE
2579ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002580if test -n "$CONFIG_SITE"; then
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00002581 ac_site_file1=$CONFIG_SITE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002583 ac_site_file1=$prefix/share/config.site
2584 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585else
Matthias Kloseb9621712010-04-24 17:59:49 +00002586 ac_site_file1=$ac_default_prefix/share/config.site
2587 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002588fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002589for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002590do
Matthias Kloseb9621712010-04-24 17:59:49 +00002591 test "x$ac_site_file" = xNONE && continue
2592 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2593 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2594$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002595 sed 's/^/| /' "$ac_site_file" >&5
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00002596 . "$ac_site_file"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002597 fi
2598done
2599
2600if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002601 # Some versions of bash will fail to source /dev/null (special files
2602 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2603 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2604 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2605$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002606 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002607 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2608 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002609 esac
2610 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002611else
Matthias Kloseb9621712010-04-24 17:59:49 +00002612 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2613$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 >$cache_file
2615fi
2616
2617# Check that the precious variables saved in the cache have kept the same
2618# value.
2619ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002620for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2622 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002623 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2624 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 case $ac_old_set,$ac_new_set in
2626 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002627 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2628$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 +00002629 ac_cache_corrupted=: ;;
2630 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002631 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2632$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002633 ac_cache_corrupted=: ;;
2634 ,);;
2635 *)
2636 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002637 # differences in whitespace do not lead to failure.
2638 ac_old_val_w=`echo x $ac_old_val`
2639 ac_new_val_w=`echo x $ac_new_val`
2640 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2641 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2642$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2643 ac_cache_corrupted=:
2644 else
2645 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2646$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2647 eval $ac_var=\$ac_old_val
2648 fi
2649 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2650$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2651 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2652$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002653 fi;;
2654 esac
2655 # Pass precious variables to config.status.
2656 if test "$ac_new_set" = set; then
2657 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002658 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 *) ac_arg=$ac_var=$ac_new_val ;;
2660 esac
2661 case " $ac_configure_args " in
2662 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002663 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002664 esac
2665 fi
2666done
2667if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002668 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2669$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2670 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2671$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00002672 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002673fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002674## -------------------- ##
2675## Main body of script. ##
2676## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002677
Guido van Rossum7f43da71994-08-01 12:15:30 +00002678ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002679ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002680ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2681ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2682ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002683
Guido van Rossum627b2d71993-12-24 10:39:16 +00002684
Michael W. Hudson54241132001-12-07 15:38:26 +00002685
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002686ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002687
2688
Martin v. Löwis11437992002-04-12 09:54:03 +00002689
Benjamin Petersond23f8222009-04-05 19:13:16 +00002690if test "$prefix" != "/"; then
2691 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2692fi
2693
2694
Martin v. Löwis11437992002-04-12 09:54:03 +00002695
2696
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002697# We don't use PACKAGE_ variables, and they cause conflicts
2698# with other autoconf-based packages that include Python.h
2699grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2700rm confdefs.h
2701mv confdefs.h.new confdefs.h
2702
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002703
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002704VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002705
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002706# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002707
2708SOVERSION=1.0
2709
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002710# The later defininition of _XOPEN_SOURCE disables certain features
2711# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2712
Matthias Kloseb9621712010-04-24 17:59:49 +00002713$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002714
2715
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002716# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2717# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2718# them.
2719
Matthias Kloseb9621712010-04-24 17:59:49 +00002720$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002721
2722
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002723# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2724# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2725# them.
2726
Matthias Kloseb9621712010-04-24 17:59:49 +00002727$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002728
2729
Martin v. Löwisd6320502004-08-12 13:45:08 +00002730# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2731# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2732
Matthias Kloseb9621712010-04-24 17:59:49 +00002733$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002734
2735
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002736# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2737# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2738# them.
2739
Matthias Kloseb9621712010-04-24 17:59:49 +00002740$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002741
2742
2743
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002744define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002745
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002746# Arguments passed to configure.
2747
2748CONFIG_ARGS="$ac_configure_args"
2749
Matthias Kloseb9621712010-04-24 17:59:49 +00002750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2751$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002752# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002753if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002754 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002755 case $enableval in
2756 yes)
2757 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002758 if test ! -d "${enableval}"
2759 then
2760 enableval=/
2761 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002762 ;;
2763 esac
2764 case $enableval in
2765 no)
2766 UNIVERSALSDK=
2767 enable_universalsdk=
2768 ;;
2769 *)
2770 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002771 if test ! -d "${UNIVERSALSDK}"
2772 then
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00002773 as_fn_error "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002774 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002775 ;;
2776 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002777
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002778
Thomas Wouters477c8d52006-05-27 19:21:47 +00002779else
2780
2781 UNIVERSALSDK=
2782 enable_universalsdk=
2783
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002784fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002785
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002786if test -n "${UNIVERSALSDK}"
2787then
Matthias Kloseb9621712010-04-24 17:59:49 +00002788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2789$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002790else
Matthias Kloseb9621712010-04-24 17:59:49 +00002791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2792$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002793fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002794
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002795
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002796
2797
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002798UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002799
Matthias Kloseb9621712010-04-24 17:59:49 +00002800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2801$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002802
2803# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002804if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002805 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2807$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002808 UNIVERSAL_ARCHS="$withval"
2809
2810else
2811
Matthias Kloseb9621712010-04-24 17:59:49 +00002812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2813$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002814
2815fi
2816
2817
2818
2819
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002820
2821# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002822if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002823 withval=$with_framework_name;
2824 PYTHONFRAMEWORK=${withval}
2825 PYTHONFRAMEWORKDIR=${withval}.framework
2826 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2827
2828else
2829
2830 PYTHONFRAMEWORK=Python
2831 PYTHONFRAMEWORKDIR=Python.framework
2832 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2833
2834fi
2835
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002836# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002837if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002838 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002839 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002840 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002841 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002842 esac
2843 case $enableval in
2844 no)
2845 PYTHONFRAMEWORK=
2846 PYTHONFRAMEWORKDIR=no-framework
2847 PYTHONFRAMEWORKPREFIX=
2848 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002849 FRAMEWORKINSTALLFIRST=
2850 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002851 FRAMEWORKALTINSTALLFIRST=
2852 FRAMEWORKALTINSTALLLAST=
2853 if test "x${prefix}" = "xNONE"; then
2854 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2855 else
2856 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2857 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002858 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002859 ;;
2860 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002861 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002862 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002863 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002864 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002865 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2866 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002867 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002868
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002869 if test "x${prefix}" = "xNONE" ; then
2870 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002871
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002872 else
2873 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2874 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002875
2876 case "${enableval}" in
2877 /System*)
2878 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2879 if test "${prefix}" = "NONE" ; then
2880 # See below
2881 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2882 fi
2883 ;;
2884
2885 /Library*)
2886 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2887 ;;
2888
2889 */Library/Frameworks)
2890 MDIR="`dirname "${enableval}"`"
2891 MDIR="`dirname "${MDIR}"`"
2892 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2893
2894 if test "${prefix}" = "NONE"; then
2895 # User hasn't specified the
2896 # --prefix option, but wants to install
2897 # the framework in a non-default location,
2898 # ensure that the compatibility links get
2899 # installed relative to that prefix as well
2900 # instead of in /usr/local.
2901 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2902 fi
2903 ;;
2904
2905 *)
2906 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2907 ;;
2908 esac
2909
Jack Jansen127e56e2001-09-11 14:41:54 +00002910 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002911
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002912 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002913 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002914 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002915
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002916 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002917
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002918 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2919
2920 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2921
Jack Jansene578a632001-08-15 01:27:14 +00002922 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002923
Guido van Rossum563e7081996-09-10 18:20:48 +00002924else
Martin v. Löwis11437992002-04-12 09:54:03 +00002925
Jack Jansene578a632001-08-15 01:27:14 +00002926 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002927 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002928 PYTHONFRAMEWORKPREFIX=
2929 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002930 FRAMEWORKINSTALLFIRST=
2931 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002932 FRAMEWORKALTINSTALLFIRST=
2933 FRAMEWORKALTINSTALLLAST=
2934 if test "x${prefix}" = "xNONE" ; then
2935 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2936 else
2937 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2938 fi
Jack Jansene578a632001-08-15 01:27:14 +00002939 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002940
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002941
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002942fi
2943
Thomas Wouters477c8d52006-05-27 19:21:47 +00002944
2945
Michael W. Hudson54241132001-12-07 15:38:26 +00002946
2947
2948
2949
Jack Jansene578a632001-08-15 01:27:14 +00002950
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002951
2952
2953
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002954
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002955
Jack Jansene578a632001-08-15 01:27:14 +00002956##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002957## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002958## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002959##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002960# Set name for machine-dependent library files
2961
Matthias Kloseb9621712010-04-24 17:59:49 +00002962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2963$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002964if test -z "$MACHDEP"
2965then
Guido van Rossum563e7081996-09-10 18:20:48 +00002966 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002967 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002968 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002969 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002970 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002971 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002972 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002973 ac_md_system=`echo $ac_sys_system |
2974 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2975 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002976 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002977 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002978
Guido van Rossum07397971997-04-29 21:49:50 +00002979 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002980 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002981 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002982 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002983 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002984 esac
2985fi
Guido van Rossum91922671997-10-09 20:24:13 +00002986
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002987# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2988# disable features if it is defined, without any means to access these
2989# features as extensions. For these systems, we skip the definition of
2990# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2991# some feature, make sure there is no alternative way to access this
2992# feature. Also, when using wildcards, make sure you have verified the
2993# need for not defining _XOPEN_SOURCE on all systems matching the
2994# wildcard, and that the wildcard does not include future systems
2995# (which may remove their limitations).
2996case $ac_sys_system/$ac_sys_release in
2997 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2998 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002999 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003000 # In addition, Stefan Krah confirms that issue #1244610 exists through
3001 # OpenBSD 4.6, but is fixed in 4.7.
3002 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003003 define_xopen_source=no
3004 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3005 # also defined. This can be overridden by defining _BSD_SOURCE
3006 # As this has a different meaning on Linux, only define it on OpenBSD
3007
Matthias Kloseb9621712010-04-24 17:59:49 +00003008$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003009
3010 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003011 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003012 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3013 # also defined. This can be overridden by defining _BSD_SOURCE
3014 # As this has a different meaning on Linux, only define it on OpenBSD
3015
Matthias Kloseb9621712010-04-24 17:59:49 +00003016$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003017
3018 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003019 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3020 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3021 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003022 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 +00003023 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003024 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3025 # request to enable features supported by the standard as a request
3026 # to disable features not supported by the standard. The best way
3027 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3028 # entirely and define __EXTENSIONS__ instead.
3029 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003030 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003031 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3032 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003033 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003034 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003035 define_xopen_source=no;;
3036 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003037 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003038 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003039 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003040 # On FreeBSD 4, the math functions C89 does not cover are never defined
3041 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3042 FreeBSD/4.*)
3043 define_xopen_source=no;;
3044 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3045 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3046 # identifies itself as Darwin/7.*
3047 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3048 # disables platform specific features beyond repair.
3049 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3050 # has no effect, don't bother defining them
3051 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003052 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003053 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003054 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003055 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3056 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3057 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003058 AIX/4)
3059 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003060 AIX/5)
3061 if test `uname -r` -eq 1; then
3062 define_xopen_source=no
3063 fi
3064 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003065 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3066 # defining NI_NUMERICHOST.
3067 QNX/6.3.2)
3068 define_xopen_source=no
3069 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003070
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003071esac
3072
3073if test $define_xopen_source = yes
3074then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003075
Matthias Kloseb9621712010-04-24 17:59:49 +00003076$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003077
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003078
3079 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3080 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3081 # several APIs are not declared. Since this is also needed in some
3082 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003083
Matthias Kloseb9621712010-04-24 17:59:49 +00003084$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003085
3086
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003087
Matthias Kloseb9621712010-04-24 17:59:49 +00003088$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003089
3090
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003091fi
3092
Guido van Rossum91922671997-10-09 20:24:13 +00003093#
3094# SGI compilers allow the specification of the both the ABI and the
3095# ISA on the command line. Depending on the values of these switches,
3096# different and often incompatable code will be generated.
3097#
3098# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3099# thus supply support for various ABI/ISA combinations. The MACHDEP
3100# variable is also adjusted.
3101#
3102
3103if test ! -z "$SGI_ABI"
3104then
3105 CC="cc $SGI_ABI"
3106 LDFLAGS="$SGI_ABI $LDFLAGS"
3107 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3108fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3110$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003111
Jack Jansen6b08a402004-06-03 12:41:45 +00003112# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3113# it may influence the way we can build extensions, so distutils
3114# needs to check it
3115
Thomas Wouters477c8d52006-05-27 19:21:47 +00003116
Jack Jansen6b08a402004-06-03 12:41:45 +00003117CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003118EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003119
Matthias Kloseb9621712010-04-24 17:59:49 +00003120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3121$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003122ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3124$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003125
Guido van Rossum627b2d71993-12-24 10:39:16 +00003126# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003127
3128# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3129# for debug/optimization stuff. BASECFLAGS is for flags that are required
3130# just to get things to compile and link. Users are free to override OPT
3131# when running configure or make. The build should not break if they do.
3132# BASECFLAGS should generally not be messed with, however.
3133
3134# XXX shouldn't some/most/all of this code be merged with the stuff later
3135# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3137$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003138
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003139# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003140if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003141 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003142 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003143 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003144 without_gcc=yes;;
3145 yes) CC=gcc
3146 without_gcc=no;;
3147 *) CC=$withval
3148 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003149 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003150else
Martin v. Löwis11437992002-04-12 09:54:03 +00003151
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003152 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003153 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003154 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003155 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003156 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003157fi
3158
Matthias Kloseb9621712010-04-24 17:59:49 +00003159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3160$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003161
Guido van Rossum8b131c51995-03-09 14:10:13 +00003162# If the user switches compilers, we can't believe the cache
3163if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3164then
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00003165 as_fn_error "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003166(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003167fi
3168
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003169# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3170# when the compiler supports them, but we don't always want -O2, and
3171# we set -g later.
3172if test -z "$CFLAGS"; then
3173 CFLAGS=
3174fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003175ac_ext=c
3176ac_cpp='$CPP $CPPFLAGS'
3177ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3178ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3179ac_compiler_gnu=$ac_cv_c_compiler_gnu
3180if test -n "$ac_tool_prefix"; then
3181 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3182set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3184$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00003185if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003186 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003187else
3188 if test -n "$CC"; then
3189 ac_cv_prog_CC="$CC" # Let the user override the test.
3190else
Martin v. Löwis11437992002-04-12 09:54:03 +00003191as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3192for as_dir in $PATH
3193do
3194 IFS=$as_save_IFS
3195 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003196 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003197 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 +00003198 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003199 $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 +00003200 break 2
3201 fi
3202done
Matthias Kloseb9621712010-04-24 17:59:49 +00003203 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003204IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003205
Jack Jansendd19cf82001-12-06 22:36:17 +00003206fi
3207fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003208CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003209if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3211$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003212else
Matthias Kloseb9621712010-04-24 17:59:49 +00003213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3214$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003215fi
3216
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003217
Martin v. Löwis11437992002-04-12 09:54:03 +00003218fi
3219if test -z "$ac_cv_prog_CC"; then
3220 ac_ct_CC=$CC
3221 # Extract the first word of "gcc", so it can be a program name with args.
3222set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3224$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00003225if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003226 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003227else
3228 if test -n "$ac_ct_CC"; then
3229 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3230else
3231as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3232for as_dir in $PATH
3233do
3234 IFS=$as_save_IFS
3235 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003236 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003237 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 +00003238 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003239 $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 +00003240 break 2
3241 fi
3242done
Matthias Kloseb9621712010-04-24 17:59:49 +00003243 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003244IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003245
3246fi
3247fi
3248ac_ct_CC=$ac_cv_prog_ac_ct_CC
3249if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3251$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003252else
Matthias Kloseb9621712010-04-24 17:59:49 +00003253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3254$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003255fi
3256
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003257 if test "x$ac_ct_CC" = x; then
3258 CC=""
3259 else
3260 case $cross_compiling:$ac_tool_warned in
3261yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003262{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3263$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003264ac_tool_warned=yes ;;
3265esac
3266 CC=$ac_ct_CC
3267 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003268else
3269 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003270fi
3271
Jack Jansendd19cf82001-12-06 22:36:17 +00003272if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003273 if test -n "$ac_tool_prefix"; then
3274 # 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 +00003275set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3277$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00003278if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003279 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003280else
3281 if test -n "$CC"; then
3282 ac_cv_prog_CC="$CC" # Let the user override the test.
3283else
Martin v. Löwis11437992002-04-12 09:54:03 +00003284as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3285for as_dir in $PATH
3286do
3287 IFS=$as_save_IFS
3288 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003289 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003290 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 +00003291 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003292 $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 +00003293 break 2
3294 fi
3295done
Matthias Kloseb9621712010-04-24 17:59:49 +00003296 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003297IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003298
3299fi
3300fi
3301CC=$ac_cv_prog_CC
3302if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3304$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003305else
Matthias Kloseb9621712010-04-24 17:59:49 +00003306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3307$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003308fi
3309
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003310
Martin v. Löwis11437992002-04-12 09:54:03 +00003311 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003312fi
3313if test -z "$CC"; then
3314 # Extract the first word of "cc", so it can be a program name with args.
3315set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3317$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00003318if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003319 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003320else
3321 if test -n "$CC"; then
3322 ac_cv_prog_CC="$CC" # Let the user override the test.
3323else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003324 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003325as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3326for as_dir in $PATH
3327do
3328 IFS=$as_save_IFS
3329 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003330 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003331 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 +00003332 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3333 ac_prog_rejected=yes
3334 continue
3335 fi
3336 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003337 $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 +00003338 break 2
3339 fi
3340done
Matthias Kloseb9621712010-04-24 17:59:49 +00003341 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003342IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003343
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003344if test $ac_prog_rejected = yes; then
3345 # We found a bogon in the path, so make sure we never use it.
3346 set dummy $ac_cv_prog_CC
3347 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003348 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003349 # We chose a different compiler from the bogus one.
3350 # However, it has the same basename, so the bogon will be chosen
3351 # first if we set CC to just the basename; use the full file name.
3352 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003353 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003354 fi
3355fi
3356fi
3357fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003358CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003359if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3361$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003362else
Matthias Kloseb9621712010-04-24 17:59:49 +00003363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3364$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003365fi
3366
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003367
Martin v. Löwis11437992002-04-12 09:54:03 +00003368fi
3369if test -z "$CC"; then
3370 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003371 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003372 do
3373 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3374set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3376$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00003377if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003378 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003379else
3380 if test -n "$CC"; then
3381 ac_cv_prog_CC="$CC" # Let the user override the test.
3382else
Martin v. Löwis11437992002-04-12 09:54:03 +00003383as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3384for as_dir in $PATH
3385do
3386 IFS=$as_save_IFS
3387 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003388 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003389 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 +00003390 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003391 $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 +00003392 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003393 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003394done
Matthias Kloseb9621712010-04-24 17:59:49 +00003395 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003396IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003397
3398fi
3399fi
3400CC=$ac_cv_prog_CC
3401if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3403$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003404else
Matthias Kloseb9621712010-04-24 17:59:49 +00003405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3406$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003407fi
3408
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003409
Martin v. Löwis11437992002-04-12 09:54:03 +00003410 test -n "$CC" && break
3411 done
3412fi
3413if test -z "$CC"; then
3414 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003415 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003416do
3417 # Extract the first word of "$ac_prog", so it can be a program name with args.
3418set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3420$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00003421if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003422 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003423else
3424 if test -n "$ac_ct_CC"; then
3425 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3426else
3427as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3428for as_dir in $PATH
3429do
3430 IFS=$as_save_IFS
3431 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003432 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003433 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 +00003434 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003435 $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 +00003436 break 2
3437 fi
3438done
Matthias Kloseb9621712010-04-24 17:59:49 +00003439 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003440IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003441
Martin v. Löwis11437992002-04-12 09:54:03 +00003442fi
3443fi
3444ac_ct_CC=$ac_cv_prog_ac_ct_CC
3445if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3447$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003448else
Matthias Kloseb9621712010-04-24 17:59:49 +00003449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3450$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003451fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003452
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003453
Martin v. Löwis11437992002-04-12 09:54:03 +00003454 test -n "$ac_ct_CC" && break
3455done
Michael W. Hudson54241132001-12-07 15:38:26 +00003456
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003457 if test "x$ac_ct_CC" = x; then
3458 CC=""
3459 else
3460 case $cross_compiling:$ac_tool_warned in
3461yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003462{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3463$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003464ac_tool_warned=yes ;;
3465esac
3466 CC=$ac_ct_CC
3467 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003468fi
3469
3470fi
3471
3472
Matthias Kloseb9621712010-04-24 17:59:49 +00003473test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3474$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00003475as_fn_error "no acceptable C compiler found in \$PATH
3476See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003477
3478# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003479$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3480set X $ac_compile
3481ac_compiler=$2
3482for ac_option in --version -v -V -qversion; do
3483 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003484case "(($ac_try" in
3485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3486 *) ac_try_echo=$ac_try;;
3487esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003488eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3489$as_echo "$ac_try_echo"; } >&5
3490 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003491 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003492 if test -s conftest.err; then
3493 sed '10a\
3494... rest of stderr output deleted ...
3495 10q' conftest.err >conftest.er1
3496 cat conftest.er1 >&5
3497 fi
3498 rm -f conftest.er1 conftest.err
3499 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3500 test $ac_status = 0; }
3501done
Martin v. Löwis11437992002-04-12 09:54:03 +00003502
Matthias Kloseb9621712010-04-24 17:59:49 +00003503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003504/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003505
Martin v. Löwis11437992002-04-12 09:54:03 +00003506int
3507main ()
3508{
3509
3510 ;
3511 return 0;
3512}
3513_ACEOF
3514ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003515ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003516# Try to create an executable without -o first, disregard a.out.
3517# It will help us diagnose broken compilers, and finding out an intuition
3518# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3520$as_echo_n "checking whether the C compiler works... " >&6; }
3521ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3522
3523# The possible output files:
3524ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3525
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003526ac_rmfiles=
3527for ac_file in $ac_files
3528do
3529 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003530 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003531 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3532 esac
3533done
3534rm -f $ac_rmfiles
3535
Matthias Kloseb9621712010-04-24 17:59:49 +00003536if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003537case "(($ac_try" in
3538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3539 *) ac_try_echo=$ac_try;;
3540esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003541eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3542$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003543 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003544 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003545 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3546 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003547 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3548# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3549# in a Makefile. We should not override ac_cv_exeext if it was cached,
3550# so that the user can short-circuit this test for compilers unknown to
3551# Autoconf.
3552for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003553do
3554 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003555 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003556 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003557 ;;
3558 [ab].out )
3559 # We found the default executable, but exeext='' is most
3560 # certainly right.
3561 break;;
3562 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003563 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003564 then :; else
3565 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3566 fi
3567 # We set ac_cv_exeext here because the later test for it is not
3568 # safe: cross compilers may not add the suffix if given an `-o'
3569 # argument, so we may need to know it at that point already.
3570 # Even if this section looks crufty: it has the advantage of
3571 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003572 break;;
3573 * )
3574 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003575 esac
3576done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003577test "$ac_cv_exeext" = no && ac_cv_exeext=
3578
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003579else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003580 ac_file=''
3581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003582if test -z "$ac_file"; then :
3583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3584$as_echo "no" >&6; }
3585$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003586sed 's/^/| /' conftest.$ac_ext >&5
3587
Matthias Kloseb9621712010-04-24 17:59:49 +00003588{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3589$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00003590{ as_fn_set_status 77
3591as_fn_error "C compiler cannot create executables
3592See \`config.log' for more details." "$LINENO" 5; }; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003593else
3594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3595$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3598$as_echo_n "checking for C compiler default output file name... " >&6; }
3599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3600$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003601ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003602
Matthias Kloseb9621712010-04-24 17:59:49 +00003603rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003604ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3606$as_echo_n "checking for suffix of executables... " >&6; }
3607if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003608case "(($ac_try" in
3609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3610 *) ac_try_echo=$ac_try;;
3611esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003612eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3613$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003614 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003615 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003616 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3617 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003618 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3619# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3620# work properly (i.e., refer to `conftest.exe'), while it won't with
3621# `rm'.
3622for ac_file in conftest.exe conftest conftest.*; do
3623 test -f "$ac_file" || continue
3624 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003626 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3627 break;;
3628 * ) break;;
3629 esac
3630done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003631else
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3633$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00003634as_fn_error "cannot compute suffix of executables: cannot compile and link
3635See \`config.log' for more details." "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003636fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003637rm -f conftest conftest$ac_cv_exeext
3638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3639$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003640
3641rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003642EXEEXT=$ac_cv_exeext
3643ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3645/* end confdefs.h. */
3646#include <stdio.h>
3647int
3648main ()
3649{
3650FILE *f = fopen ("conftest.out", "w");
3651 return ferror (f) || fclose (f) != 0;
3652
3653 ;
3654 return 0;
3655}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003657ac_clean_files="$ac_clean_files conftest.out"
3658# Check that the compiler produces executables we can run. If not, either
3659# the compiler is broken, or we cross compile.
3660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3661$as_echo_n "checking whether we are cross compiling... " >&6; }
3662if test "$cross_compiling" != yes; then
3663 { { ac_try="$ac_link"
3664case "(($ac_try" in
3665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3666 *) ac_try_echo=$ac_try;;
3667esac
3668eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3669$as_echo "$ac_try_echo"; } >&5
3670 (eval "$ac_link") 2>&5
3671 ac_status=$?
3672 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3673 test $ac_status = 0; }
3674 if { ac_try='./conftest$ac_cv_exeext'
3675 { { case "(($ac_try" in
3676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3677 *) ac_try_echo=$ac_try;;
3678esac
3679eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3680$as_echo "$ac_try_echo"; } >&5
3681 (eval "$ac_try") 2>&5
3682 ac_status=$?
3683 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3684 test $ac_status = 0; }; }; then
3685 cross_compiling=no
3686 else
3687 if test "$cross_compiling" = maybe; then
3688 cross_compiling=yes
3689 else
3690 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3691$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00003692as_fn_error "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003693If you meant to cross compile, use \`--host'.
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00003694See \`config.log' for more details." "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003695 fi
3696 fi
3697fi
3698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3699$as_echo "$cross_compiling" >&6; }
3700
3701rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3702ac_clean_files=$ac_clean_files_save
3703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3704$as_echo_n "checking for suffix of object files... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00003705if test "${ac_cv_objext+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003706 $as_echo_n "(cached) " >&6
3707else
3708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003709/* end confdefs.h. */
3710
3711int
3712main ()
3713{
3714
3715 ;
3716 return 0;
3717}
3718_ACEOF
3719rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003720if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003721case "(($ac_try" in
3722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3723 *) ac_try_echo=$ac_try;;
3724esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003725eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3726$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003727 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003728 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003729 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3730 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003731 for ac_file in conftest.o conftest.obj conftest.*; do
3732 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003733 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003735 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3736 break;;
3737 esac
3738done
3739else
Matthias Kloseb9621712010-04-24 17:59:49 +00003740 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003741sed 's/^/| /' conftest.$ac_ext >&5
3742
Matthias Kloseb9621712010-04-24 17:59:49 +00003743{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3744$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00003745as_fn_error "cannot compute suffix of object files: cannot compile
3746See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003747fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003748rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3751$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003752OBJEXT=$ac_cv_objext
3753ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3755$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00003756if test "${ac_cv_c_compiler_gnu+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003757 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003758else
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003760/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003761
Martin v. Löwis11437992002-04-12 09:54:03 +00003762int
3763main ()
3764{
3765#ifndef __GNUC__
3766 choke me
3767#endif
3768
3769 ;
3770 return 0;
3771}
3772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003773if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003774 ac_compiler_gnu=yes
3775else
Matthias Kloseb9621712010-04-24 17:59:49 +00003776 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003777fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003779ac_cv_c_compiler_gnu=$ac_compiler_gnu
3780
3781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3783$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3784if test $ac_compiler_gnu = yes; then
3785 GCC=yes
3786else
3787 GCC=
3788fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003789ac_test_CFLAGS=${CFLAGS+set}
3790ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3792$as_echo_n "checking whether $CC accepts -g... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00003793if test "${ac_cv_prog_cc_g+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003794 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003795else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796 ac_save_c_werror_flag=$ac_c_werror_flag
3797 ac_c_werror_flag=yes
3798 ac_cv_prog_cc_g=no
3799 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003801/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003802
Martin v. Löwis11437992002-04-12 09:54:03 +00003803int
3804main ()
3805{
3806
3807 ;
3808 return 0;
3809}
3810_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003811if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003812 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003813else
Matthias Kloseb9621712010-04-24 17:59:49 +00003814 CFLAGS=""
3815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003816/* end confdefs.h. */
3817
3818int
3819main ()
3820{
3821
3822 ;
3823 return 0;
3824}
3825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003826if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003827
Matthias Kloseb9621712010-04-24 17:59:49 +00003828else
3829 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003830 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003832/* end confdefs.h. */
3833
3834int
3835main ()
3836{
3837
3838 ;
3839 return 0;
3840}
3841_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003842if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003844fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003846fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3848fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3850 ac_c_werror_flag=$ac_save_c_werror_flag
3851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3853$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003854if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003855 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003856elif test $ac_cv_prog_cc_g = yes; then
3857 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003858 CFLAGS="-g -O2"
3859 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003860 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003861 fi
3862else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003863 if test "$GCC" = yes; then
3864 CFLAGS="-O2"
3865 else
3866 CFLAGS=
3867 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3870$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00003871if test "${ac_cv_prog_cc_c89+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003872 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003873else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003874 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003875ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003877/* end confdefs.h. */
3878#include <stdarg.h>
3879#include <stdio.h>
3880#include <sys/types.h>
3881#include <sys/stat.h>
3882/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3883struct buf { int x; };
3884FILE * (*rcsopen) (struct buf *, struct stat *, int);
3885static char *e (p, i)
3886 char **p;
3887 int i;
3888{
3889 return p[i];
3890}
3891static char *f (char * (*g) (char **, int), char **p, ...)
3892{
3893 char *s;
3894 va_list v;
3895 va_start (v,p);
3896 s = g (p, va_arg (v,int));
3897 va_end (v);
3898 return s;
3899}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003900
3901/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3902 function prototypes and stuff, but not '\xHH' hex character constants.
3903 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003904 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003905 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3906 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003907 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003908int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003910/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3911 inside strings and character constants. */
3912#define FOO(x) 'x'
3913int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3914
Skip Montanaro6dead952003-09-25 14:50:04 +00003915int test (int i, double x);
3916struct s1 {int (*f) (int a);};
3917struct s2 {int (*f) (double a);};
3918int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3919int argc;
3920char **argv;
3921int
3922main ()
3923{
3924return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3925 ;
3926 return 0;
3927}
3928_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003929for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3930 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003931do
3932 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003933 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003934 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003936rm -f core conftest.err conftest.$ac_objext
3937 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003938done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003939rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003940CC=$ac_save_CC
3941
3942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003943# AC_CACHE_VAL
3944case "x$ac_cv_prog_cc_c89" in
3945 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3947$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3950$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003951 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003952 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3954$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003955esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003956if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003957
Matthias Kloseb9621712010-04-24 17:59:49 +00003958fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003959
Martin v. Löwis11437992002-04-12 09:54:03 +00003960ac_ext=c
3961ac_cpp='$CPP $CPPFLAGS'
3962ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3963ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3964ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003965
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003966
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003967
3968
Matthias Kloseb9621712010-04-24 17:59:49 +00003969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3970$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003971
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003972# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003973if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003974 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003975
3976 case $withval in
3977 no) with_cxx_main=no
3978 MAINCC='$(CC)';;
3979 yes) with_cxx_main=yes
3980 MAINCC='$(CXX)';;
3981 *) with_cxx_main=yes
3982 MAINCC=$withval
3983 if test -z "$CXX"
3984 then
3985 CXX=$withval
3986 fi;;
3987 esac
3988else
3989
3990 with_cxx_main=no
3991 MAINCC='$(CC)'
3992
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003993fi
3994
Matthias Kloseb9621712010-04-24 17:59:49 +00003995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
3996$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003997
3998preset_cxx="$CXX"
3999if test -z "$CXX"
4000then
4001 case "$CC" in
4002 gcc) # Extract the first word of "g++", so it can be a program name with args.
4003set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4005$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00004006if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004007 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004008else
4009 case $CXX in
4010 [\\/]* | ?:[\\/]*)
4011 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4012 ;;
4013 *)
4014 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4015for as_dir in notfound
4016do
4017 IFS=$as_save_IFS
4018 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004019 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004020 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004021 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004022 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004023 break 2
4024 fi
4025done
Matthias Kloseb9621712010-04-24 17:59:49 +00004026 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004027IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004028
4029 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4030 ;;
4031esac
4032fi
4033CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004034if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4036$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004037else
Matthias Kloseb9621712010-04-24 17:59:49 +00004038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4039$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004040fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004041
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004042 ;;
4043 cc) # Extract the first word of "c++", so it can be a program name with args.
4044set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4046$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00004047if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004048 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004049else
4050 case $CXX in
4051 [\\/]* | ?:[\\/]*)
4052 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4053 ;;
4054 *)
4055 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4056for as_dir in notfound
4057do
4058 IFS=$as_save_IFS
4059 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004060 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004061 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004062 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004063 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004064 break 2
4065 fi
4066done
Matthias Kloseb9621712010-04-24 17:59:49 +00004067 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004068IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004069
4070 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4071 ;;
4072esac
4073fi
4074CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004075if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4077$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004078else
Matthias Kloseb9621712010-04-24 17:59:49 +00004079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4080$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004081fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004082
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004083 ;;
4084 esac
4085 if test "$CXX" = "notfound"
4086 then
4087 CXX=""
4088 fi
4089fi
4090if test -z "$CXX"
4091then
4092 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4093do
4094 # Extract the first word of "$ac_prog", so it can be a program name with args.
4095set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4097$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00004098if test "${ac_cv_prog_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004099 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004100else
4101 if test -n "$CXX"; then
4102 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4103else
4104as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4105for as_dir in $PATH
4106do
4107 IFS=$as_save_IFS
4108 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004110 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004111 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004112 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004113 break 2
4114 fi
4115done
Matthias Kloseb9621712010-04-24 17:59:49 +00004116 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004117IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004118
4119fi
4120fi
4121CXX=$ac_cv_prog_CXX
4122if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4124$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004125else
Matthias Kloseb9621712010-04-24 17:59:49 +00004126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4127$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004128fi
4129
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004130
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004131 test -n "$CXX" && break
4132done
4133test -n "$CXX" || CXX="notfound"
4134
4135 if test "$CXX" = "notfound"
4136 then
4137 CXX=""
4138 fi
4139fi
4140if test "$preset_cxx" != "$CXX"
4141then
Matthias Kloseb9621712010-04-24 17:59:49 +00004142 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004143
4144 By default, distutils will build C++ extension modules with \"$CXX\".
4145 If this is not intended, then set CXX on the configure command line.
4146 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004147$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004148
4149 By default, distutils will build C++ extension modules with \"$CXX\".
4150 If this is not intended, then set CXX on the configure command line.
4151 " >&2;}
4152fi
4153
4154
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004155# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004156
4157ac_ext=c
4158ac_cpp='$CPP $CPPFLAGS'
4159ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4160ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4161ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4163$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004164# On Suns, sometimes $CPP names a directory.
4165if test -n "$CPP" && test -d "$CPP"; then
4166 CPP=
4167fi
4168if test -z "$CPP"; then
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00004169 if test "${ac_cv_prog_CPP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004170 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004171else
Martin v. Löwis11437992002-04-12 09:54:03 +00004172 # Double quotes because CPP needs to be expanded
4173 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4174 do
4175 ac_preproc_ok=false
4176for ac_c_preproc_warn_flag in '' yes
4177do
4178 # Use a header file that comes with gcc, so configuring glibc
4179 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004180 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4181 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004182 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004183 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004185/* end confdefs.h. */
4186#ifdef __STDC__
4187# include <limits.h>
4188#else
4189# include <assert.h>
4190#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004191 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004192_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004193if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004194
Matthias Kloseb9621712010-04-24 17:59:49 +00004195else
Martin v. Löwis11437992002-04-12 09:54:03 +00004196 # Broken: fails on valid input.
4197continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004198fi
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00004199rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004200
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004201 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004202 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004204/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004205#include <ac_nonexistent.h>
4206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004207if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004208 # Broken: success on invalid input.
4209continue
4210else
Martin v. Löwis11437992002-04-12 09:54:03 +00004211 # Passes both tests.
4212ac_preproc_ok=:
4213break
4214fi
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00004215rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004216
4217done
4218# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00004219rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004220if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004221 break
4222fi
4223
4224 done
4225 ac_cv_prog_CPP=$CPP
4226
4227fi
4228 CPP=$ac_cv_prog_CPP
4229else
4230 ac_cv_prog_CPP=$CPP
4231fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4233$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004234ac_preproc_ok=false
4235for ac_c_preproc_warn_flag in '' yes
4236do
4237 # Use a header file that comes with gcc, so configuring glibc
4238 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004239 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4240 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004241 # On the NeXT, cc -E runs the code through the compiler's parser,
4242 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004244/* end confdefs.h. */
4245#ifdef __STDC__
4246# include <limits.h>
4247#else
4248# include <assert.h>
4249#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004250 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004252if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004253
Matthias Kloseb9621712010-04-24 17:59:49 +00004254else
Martin v. Löwis11437992002-04-12 09:54:03 +00004255 # Broken: fails on valid input.
4256continue
4257fi
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00004258rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004259
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004260 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004261 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004263/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004264#include <ac_nonexistent.h>
4265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004266if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004267 # Broken: success on invalid input.
4268continue
4269else
Martin v. Löwis11437992002-04-12 09:54:03 +00004270 # Passes both tests.
4271ac_preproc_ok=:
4272break
4273fi
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00004274rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004275
4276done
4277# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00004278rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004279if $ac_preproc_ok; then :
4280
Martin v. Löwis11437992002-04-12 09:54:03 +00004281else
Matthias Kloseb9621712010-04-24 17:59:49 +00004282 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4283$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00004284as_fn_error "C preprocessor \"$CPP\" fails sanity check
4285See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004286fi
4287
4288ac_ext=c
4289ac_cpp='$CPP $CPPFLAGS'
4290ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4291ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4292ac_compiler_gnu=$ac_cv_c_compiler_gnu
4293
4294
Matthias Kloseb9621712010-04-24 17:59:49 +00004295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4296$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00004297if test "${ac_cv_path_GREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004298 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004299else
Matthias Kloseb9621712010-04-24 17:59:49 +00004300 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004302 # Loop through the user's path and test for each of PROGNAME-LIST
4303 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004304for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4305do
4306 IFS=$as_save_IFS
4307 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004308 for ac_prog in grep ggrep; do
4309 for ac_exec_ext in '' $ac_executable_extensions; do
4310 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4311 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4312# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004313 # Check for GNU $ac_path_GREP
4314case `"$ac_path_GREP" --version 2>&1` in
4315*GNU*)
4316 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4317*)
4318 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004319 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004320 while :
4321 do
4322 cat "conftest.in" "conftest.in" >"conftest.tmp"
4323 mv "conftest.tmp" "conftest.in"
4324 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004325 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004326 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4327 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004328 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004329 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4330 # Best one so far, save it but keep looking for a better one
4331 ac_cv_path_GREP="$ac_path_GREP"
4332 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004333 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004334 # 10*(2^10) chars as input seems more than enough
4335 test $ac_count -gt 10 && break
4336 done
4337 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4338esac
4339
Matthias Kloseb9621712010-04-24 17:59:49 +00004340 $ac_path_GREP_found && break 3
4341 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004342 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004343 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004344IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004345 if test -z "$ac_cv_path_GREP"; then
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00004346 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004347 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004348else
4349 ac_cv_path_GREP=$GREP
4350fi
4351
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4354$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004355 GREP="$ac_cv_path_GREP"
4356
4357
Matthias Kloseb9621712010-04-24 17:59:49 +00004358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4359$as_echo_n "checking for egrep... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00004360if test "${ac_cv_path_EGREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004361 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004362else
4363 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4364 then ac_cv_path_EGREP="$GREP -E"
4365 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004366 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004367 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004368 # Loop through the user's path and test for each of PROGNAME-LIST
4369 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004370for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4371do
4372 IFS=$as_save_IFS
4373 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004374 for ac_prog in egrep; do
4375 for ac_exec_ext in '' $ac_executable_extensions; do
4376 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4377 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4378# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004379 # Check for GNU $ac_path_EGREP
4380case `"$ac_path_EGREP" --version 2>&1` in
4381*GNU*)
4382 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4383*)
4384 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004385 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004386 while :
4387 do
4388 cat "conftest.in" "conftest.in" >"conftest.tmp"
4389 mv "conftest.tmp" "conftest.in"
4390 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004391 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004392 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4393 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004394 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004395 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4396 # Best one so far, save it but keep looking for a better one
4397 ac_cv_path_EGREP="$ac_path_EGREP"
4398 ac_path_EGREP_max=$ac_count
4399 fi
4400 # 10*(2^10) chars as input seems more than enough
4401 test $ac_count -gt 10 && break
4402 done
4403 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4404esac
4405
Matthias Kloseb9621712010-04-24 17:59:49 +00004406 $ac_path_EGREP_found && break 3
4407 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004408 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004409 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004410IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004411 if test -z "$ac_cv_path_EGREP"; then
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00004412 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004413 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004414else
4415 ac_cv_path_EGREP=$EGREP
4416fi
4417
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004418 fi
4419fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4421$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004422 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004423
4424
Matthias Kloseb9621712010-04-24 17:59:49 +00004425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4426$as_echo_n "checking for ANSI C header files... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00004427if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004428 $as_echo_n "(cached) " >&6
4429else
4430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004431/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004432#include <stdlib.h>
4433#include <stdarg.h>
4434#include <string.h>
4435#include <float.h>
4436
4437int
4438main ()
4439{
4440
4441 ;
4442 return 0;
4443}
4444_ACEOF
4445if ac_fn_c_try_compile "$LINENO"; then :
4446 ac_cv_header_stdc=yes
4447else
4448 ac_cv_header_stdc=no
4449fi
4450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4451
4452if test $ac_cv_header_stdc = yes; then
4453 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4455/* end confdefs.h. */
4456#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004457
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004458_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004459if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004460 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004461
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004462else
Matthias Kloseb9621712010-04-24 17:59:49 +00004463 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004464fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004465rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004466
Matthias Kloseb9621712010-04-24 17:59:49 +00004467fi
4468
4469if test $ac_cv_header_stdc = yes; then
4470 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4472/* end confdefs.h. */
4473#include <stdlib.h>
4474
4475_ACEOF
4476if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4477 $EGREP "free" >/dev/null 2>&1; then :
4478
4479else
4480 ac_cv_header_stdc=no
4481fi
4482rm -f conftest*
4483
4484fi
4485
4486if test $ac_cv_header_stdc = yes; then
4487 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4488 if test "$cross_compiling" = yes; then :
4489 :
4490else
4491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4492/* end confdefs.h. */
4493#include <ctype.h>
4494#include <stdlib.h>
4495#if ((' ' & 0x0FF) == 0x020)
4496# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4497# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4498#else
4499# define ISLOWER(c) \
4500 (('a' <= (c) && (c) <= 'i') \
4501 || ('j' <= (c) && (c) <= 'r') \
4502 || ('s' <= (c) && (c) <= 'z'))
4503# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4504#endif
4505
4506#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4507int
4508main ()
4509{
4510 int i;
4511 for (i = 0; i < 256; i++)
4512 if (XOR (islower (i), ISLOWER (i))
4513 || toupper (i) != TOUPPER (i))
4514 return 2;
4515 return 0;
4516}
4517_ACEOF
4518if ac_fn_c_try_run "$LINENO"; then :
4519
4520else
4521 ac_cv_header_stdc=no
4522fi
4523rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4524 conftest.$ac_objext conftest.beam conftest.$ac_ext
4525fi
4526
4527fi
4528fi
4529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4530$as_echo "$ac_cv_header_stdc" >&6; }
4531if test $ac_cv_header_stdc = yes; then
4532
4533$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4534
4535fi
4536
4537# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4538for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4539 inttypes.h stdint.h unistd.h
4540do :
4541 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4542ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4543"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00004544eval as_val=\$$as_ac_Header
4545 if test "x$as_val" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004546 cat >>confdefs.h <<_ACEOF
4547#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4548_ACEOF
4549
4550fi
4551
4552done
4553
4554
4555
4556 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00004557if test "x$ac_cv_header_minix_config_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004558 MINIX=yes
4559else
4560 MINIX=
4561fi
4562
4563
4564 if test "$MINIX" = yes; then
4565
4566$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4567
4568
4569$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4570
4571
4572$as_echo "#define _MINIX 1" >>confdefs.h
4573
4574 fi
4575
4576
4577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4578$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00004579if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004580 $as_echo_n "(cached) " >&6
4581else
4582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4583/* end confdefs.h. */
4584
4585# define __EXTENSIONS__ 1
4586 $ac_includes_default
4587int
4588main ()
4589{
4590
4591 ;
4592 return 0;
4593}
4594_ACEOF
4595if ac_fn_c_try_compile "$LINENO"; then :
4596 ac_cv_safe_to_define___extensions__=yes
4597else
4598 ac_cv_safe_to_define___extensions__=no
4599fi
4600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4601fi
4602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4603$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4604 test $ac_cv_safe_to_define___extensions__ = yes &&
4605 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4606
4607 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4608
4609 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4610
4611 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4612
4613 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4614
4615
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004616
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004617# Check for unsupported systems
4618case $ac_sys_system/$ac_sys_release in
4619atheos*|Linux*/1*)
4620 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4621 echo See README for details.
4622 exit 1;;
4623esac
4624
4625
Matthias Kloseb9621712010-04-24 17:59:49 +00004626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4627$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004628
4629# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004630if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004631 withval=$with_suffix;
4632 case $withval in
4633 no) EXEEXT=;;
4634 yes) EXEEXT=.exe;;
4635 *) EXEEXT=$withval;;
4636 esac
4637fi
4638
Matthias Kloseb9621712010-04-24 17:59:49 +00004639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4640$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004641
4642# Test whether we're running on a non-case-sensitive system, in which
4643# case we give a warning if no ext is given
4644
Matthias Kloseb9621712010-04-24 17:59:49 +00004645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4646$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004647if test ! -d CaseSensitiveTestDir; then
4648mkdir CaseSensitiveTestDir
4649fi
4650
4651if test -d casesensitivetestdir
4652then
Matthias Kloseb9621712010-04-24 17:59:49 +00004653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4654$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004655 BUILDEXEEXT=.exe
4656else
Matthias Kloseb9621712010-04-24 17:59:49 +00004657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4658$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004659 BUILDEXEEXT=$EXEEXT
4660fi
4661rmdir CaseSensitiveTestDir
4662
4663case $MACHDEP in
4664bsdos*)
4665 case $CC in
4666 gcc) CC="$CC -D_HAVE_BSDI";;
4667 esac;;
4668esac
4669
4670case $ac_sys_system in
4671hp*|HP*)
4672 case $CC in
4673 cc|*/cc) CC="$CC -Ae";;
4674 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004675esac
4676
4677
4678
Matthias Kloseb9621712010-04-24 17:59:49 +00004679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4680$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004681if test -z "$LIBRARY"
4682then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004683 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4686$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004687
4688# LDLIBRARY is the name of the library to link against (as opposed to the
4689# name of the library into which to insert object files). BLDLIBRARY is also
4690# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4691# is blank as the main program is not linked directly against LDLIBRARY.
4692# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4693# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4694# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4695# DLLLIBRARY is the shared (i.e., DLL) library.
4696#
4697# RUNSHARED is used to run shared python without installed libraries
4698#
4699# INSTSONAME is the name of the shared library that will be use to install
4700# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004701#
4702# LDVERSION is the shared library version number, normally the Python version
4703# with the ABI build flags appended.
4704
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004705
4706
4707
4708
4709
4710
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004711
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004712LDLIBRARY="$LIBRARY"
4713BLDLIBRARY='$(LDLIBRARY)'
4714INSTSONAME='$(LDLIBRARY)'
4715DLLLIBRARY=''
4716LDLIBRARYDIR=''
4717RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004718LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004719
4720# LINKCC is the command that links the python executable -- default is $(CC).
4721# If CXX is set, and if it is needed to link a main function that was
4722# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4723# python might then depend on the C++ runtime
4724# This is altered for AIX in order to build the export list before
4725# linking.
4726
Matthias Kloseb9621712010-04-24 17:59:49 +00004727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4728$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004729if test -z "$LINKCC"
4730then
4731 LINKCC='$(PURIFY) $(MAINCC)'
4732 case $ac_sys_system in
4733 AIX*)
4734 exp_extra="\"\""
4735 if test $ac_sys_release -ge 5 -o \
4736 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4737 exp_extra="."
4738 fi
4739 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004740 QNX*)
4741 # qcc must be used because the other compilers do not
4742 # support -N.
4743 LINKCC=qcc;;
4744 esac
4745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4747$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004748
4749# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4750# make sure we default having it set to "no": this is used by
4751# distutils.unixccompiler to know if it should add --enable-new-dtags
4752# to linker command lines, and failing to detect GNU ld simply results
4753# in the same bahaviour as before.
4754
Matthias Kloseb9621712010-04-24 17:59:49 +00004755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4756$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004757ac_prog=ld
4758if test "$GCC" = yes; then
4759 ac_prog=`$CC -print-prog-name=ld`
4760fi
4761case `"$ac_prog" -V 2>&1 < /dev/null` in
4762 *GNU*)
4763 GNULD=yes;;
4764 *)
4765 GNULD=no;;
4766esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4768$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004769
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4771$as_echo_n "checking for inline... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00004772if test "${ac_cv_c_inline+set}" = set; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004773 $as_echo_n "(cached) " >&6
4774else
4775 ac_cv_c_inline=no
4776for ac_kw in inline __inline__ __inline; do
4777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4778/* end confdefs.h. */
4779#ifndef __cplusplus
4780typedef int foo_t;
4781static $ac_kw foo_t static_foo () {return 0; }
4782$ac_kw foo_t foo () {return 0; }
4783#endif
4784
4785_ACEOF
4786if ac_fn_c_try_compile "$LINENO"; then :
4787 ac_cv_c_inline=$ac_kw
4788fi
4789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4790 test "$ac_cv_c_inline" != no && break
4791done
4792
4793fi
4794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4795$as_echo "$ac_cv_c_inline" >&6; }
4796
4797case $ac_cv_c_inline in
4798 inline | yes) ;;
4799 *)
4800 case $ac_cv_c_inline in
4801 no) ac_val=;;
4802 *) ac_val=$ac_cv_c_inline;;
4803 esac
4804 cat >>confdefs.h <<_ACEOF
4805#ifndef __cplusplus
4806#define inline $ac_val
4807#endif
4808_ACEOF
4809 ;;
4810esac
4811
4812if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004813
4814$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004815
4816
4817fi
4818
4819
Matthias Kloseb9621712010-04-24 17:59:49 +00004820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4821$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004822# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004823if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004824 enableval=$enable_shared;
4825fi
4826
4827
4828if test -z "$enable_shared"
4829then
4830 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004831 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004832 enable_shared="yes";;
4833 *)
4834 enable_shared="no";;
4835 esac
4836fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4838$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004839
Matthias Kloseb9621712010-04-24 17:59:49 +00004840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4841$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004842# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004843if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004844 enableval=$enable_profiling; ac_save_cc="$CC"
4845 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004846 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004847 ac_enable_profiling="no"
4848else
Matthias Kloseb9621712010-04-24 17:59:49 +00004849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004850/* end confdefs.h. */
4851int main() { return 0; }
4852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004853if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004854 ac_enable_profiling="yes"
4855else
Matthias Kloseb9621712010-04-24 17:59:49 +00004856 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004858rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4859 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004860fi
4861
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004862 CC="$ac_save_cc"
4863fi
4864
Matthias Kloseb9621712010-04-24 17:59:49 +00004865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4866$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004867
4868case "$ac_enable_profiling" in
4869 "yes")
4870 BASECFLAGS="-pg $BASECFLAGS"
4871 LDFLAGS="-pg $LDFLAGS"
4872 ;;
4873esac
4874
Matthias Kloseb9621712010-04-24 17:59:49 +00004875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4876$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004877
4878# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4879# library that we build, but we do not want to link against it (we
4880# will find it with a -framework option). For this reason there is an
4881# extra variable BLDLIBRARY against which Python and the extension
4882# modules are linked, BLDLIBRARY. This is normally the same as
4883# LDLIBRARY, but empty for MacOSX framework builds.
4884if test "$enable_framework"
4885then
4886 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4887 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4888 BLDLIBRARY=''
4889else
4890 BLDLIBRARY='$(LDLIBRARY)'
4891fi
4892
4893# Other platforms follow
4894if test $enable_shared = "yes"; then
4895
Matthias Kloseb9621712010-04-24 17:59:49 +00004896$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004897
4898 case $ac_sys_system in
4899 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004900 LDLIBRARY='libpython$(LDVERSION).dll.a'
4901 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004902 ;;
4903 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004904 LDLIBRARY='libpython$(LDVERSION).so'
4905 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004906 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4907 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004908 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004909 then
4910 PY3LIBRARY=libpython3.so
4911 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004912 ;;
4913 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004914 LDLIBRARY='libpython$(LDVERSION).so'
4915 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004916 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4917 case $ac_sys_system in
4918 FreeBSD*)
4919 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4920 ;;
4921 esac
4922 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004923 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004924 then
4925 PY3LIBRARY=libpython3.so
4926 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004927 ;;
4928 hp*|HP*)
4929 case `uname -m` in
4930 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004931 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004932 ;;
4933 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004934 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004935 ;;
4936 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004937 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004938 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4939 ;;
4940 OSF*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004941 LDLIBRARY='libpython$(LDVERSION).so'
4942 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004943 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4944 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004945 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004946 LDLIBRARY='libpython$(LDVERSION).dylib'
4947 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004948 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4949 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004950 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004951 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004952 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4953 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004954
4955 esac
4956else # shared is disabled
4957 case $ac_sys_system in
4958 CYGWIN*)
4959 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004960 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004961 ;;
4962 esac
4963fi
4964
Matthias Kloseb9621712010-04-24 17:59:49 +00004965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4966$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004967
4968if test -n "$ac_tool_prefix"; then
4969 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4970set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4972$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00004973if test "${ac_cv_prog_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004974 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004975else
4976 if test -n "$RANLIB"; then
4977 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4978else
4979as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4980for as_dir in $PATH
4981do
4982 IFS=$as_save_IFS
4983 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004984 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004985 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4986 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004987 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004988 break 2
4989 fi
4990done
Matthias Kloseb9621712010-04-24 17:59:49 +00004991 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004992IFS=$as_save_IFS
4993
4994fi
4995fi
4996RANLIB=$ac_cv_prog_RANLIB
4997if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4999$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005000else
Matthias Kloseb9621712010-04-24 17:59:49 +00005001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5002$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005003fi
5004
5005
5006fi
5007if test -z "$ac_cv_prog_RANLIB"; then
5008 ac_ct_RANLIB=$RANLIB
5009 # Extract the first word of "ranlib", so it can be a program name with args.
5010set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5012$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00005013if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005014 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005015else
5016 if test -n "$ac_ct_RANLIB"; then
5017 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5018else
5019as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5020for as_dir in $PATH
5021do
5022 IFS=$as_save_IFS
5023 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005024 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005025 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5026 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005027 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005028 break 2
5029 fi
5030done
Matthias Kloseb9621712010-04-24 17:59:49 +00005031 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005032IFS=$as_save_IFS
5033
5034fi
5035fi
5036ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5037if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5039$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005040else
Matthias Kloseb9621712010-04-24 17:59:49 +00005041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5042$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005043fi
5044
5045 if test "x$ac_ct_RANLIB" = x; then
5046 RANLIB=":"
5047 else
5048 case $cross_compiling:$ac_tool_warned in
5049yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005050{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5051$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005052ac_tool_warned=yes ;;
5053esac
5054 RANLIB=$ac_ct_RANLIB
5055 fi
5056else
5057 RANLIB="$ac_cv_prog_RANLIB"
5058fi
5059
5060
5061for ac_prog in ar aal
5062do
5063 # Extract the first word of "$ac_prog", so it can be a program name with args.
5064set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5066$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00005067if test "${ac_cv_prog_AR+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005069else
5070 if test -n "$AR"; then
5071 ac_cv_prog_AR="$AR" # Let the user override the test.
5072else
5073as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5074for as_dir in $PATH
5075do
5076 IFS=$as_save_IFS
5077 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005078 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005079 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5080 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005081 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005082 break 2
5083 fi
5084done
Matthias Kloseb9621712010-04-24 17:59:49 +00005085 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005086IFS=$as_save_IFS
5087
5088fi
5089fi
5090AR=$ac_cv_prog_AR
5091if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5093$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005094else
Matthias Kloseb9621712010-04-24 17:59:49 +00005095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5096$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005097fi
5098
5099
5100 test -n "$AR" && break
5101done
5102test -n "$AR" || AR="ar"
5103
5104
5105# tweak ARFLAGS only if the user didn't set it on the command line
5106
5107if test -z "$ARFLAGS"
5108then
5109 ARFLAGS="rc"
5110fi
5111
5112
5113# Extract the first word of "svnversion", so it can be a program name with args.
5114set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5116$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00005117if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005118 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005119else
5120 if test -n "$SVNVERSION"; then
5121 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5122else
5123as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5124for as_dir in $PATH
5125do
5126 IFS=$as_save_IFS
5127 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005128 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005129 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5130 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005131 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005132 break 2
5133 fi
5134done
Matthias Kloseb9621712010-04-24 17:59:49 +00005135 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005136IFS=$as_save_IFS
5137
5138 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5139fi
5140fi
5141SVNVERSION=$ac_cv_prog_SVNVERSION
5142if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5144$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005145else
Matthias Kloseb9621712010-04-24 17:59:49 +00005146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5147$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005148fi
5149
5150
5151if test $SVNVERSION = found
5152then
5153 SVNVERSION="svnversion \$(srcdir)"
5154else
5155 SVNVERSION="echo Unversioned directory"
5156fi
5157
5158case $MACHDEP in
5159bsdos*|hp*|HP*)
5160 # install -d does not work on BSDI or HP-UX
5161 if test -z "$INSTALL"
5162 then
5163 INSTALL="${srcdir}/install-sh -c"
5164 fi
5165esac
5166ac_aux_dir=
5167for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00005168 for ac_t in install-sh install.sh shtool; do
5169 if test -f "$ac_dir/$ac_t"; then
5170 ac_aux_dir=$ac_dir
5171 ac_install_sh="$ac_aux_dir/$ac_t -c"
5172 break 2
5173 fi
5174 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005175done
5176if test -z "$ac_aux_dir"; then
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00005177 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005178fi
5179
5180# These three variables are undocumented and unsupported,
5181# and are intended to be withdrawn in a future Autoconf release.
5182# They can cause serious problems if a builder's source tree is in a directory
5183# whose full name contains unusual characters.
5184ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5185ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5186ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5187
5188
5189# Find a good install program. We prefer a C program (faster),
5190# so one script is as good as another. But avoid the broken or
5191# incompatible versions:
5192# SysV /etc/install, /usr/sbin/install
5193# SunOS /usr/etc/install
5194# IRIX /sbin/install
5195# AIX /bin/install
5196# AmigaOS /C/install, which installs bootblocks on floppy discs
5197# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5198# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5199# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5200# OS/2's system install, which has a completely different semantic
5201# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005202# Reject install programs that cannot install multiple files.
5203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5204$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005205if test -z "$INSTALL"; then
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00005206if test "${ac_cv_path_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005207 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005208else
5209 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5210for as_dir in $PATH
5211do
5212 IFS=$as_save_IFS
5213 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005214 # Account for people who put trailing slashes in PATH elements.
5215case $as_dir/ in #((
5216 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005217 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005218 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005219 /usr/ucb/* ) ;;
5220 *)
5221 # OSF1 and SCO ODT 3.0 have their own names for install.
5222 # Don't use installbsd from OSF since it installs stuff as root
5223 # by default.
5224 for ac_prog in ginstall scoinst install; do
5225 for ac_exec_ext in '' $ac_executable_extensions; do
5226 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5227 if test $ac_prog = install &&
5228 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5229 # AIX install. It has an incompatible calling convention.
5230 :
5231 elif test $ac_prog = install &&
5232 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5233 # program-specific install script used by HP pwplus--don't use.
5234 :
5235 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005236 rm -rf conftest.one conftest.two conftest.dir
5237 echo one > conftest.one
5238 echo two > conftest.two
5239 mkdir conftest.dir
5240 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5241 test -s conftest.one && test -s conftest.two &&
5242 test -s conftest.dir/conftest.one &&
5243 test -s conftest.dir/conftest.two
5244 then
5245 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5246 break 3
5247 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005248 fi
5249 fi
5250 done
5251 done
5252 ;;
5253esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005254
5255 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005256IFS=$as_save_IFS
5257
Matthias Kloseb9621712010-04-24 17:59:49 +00005258rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005259
5260fi
5261 if test "${ac_cv_path_install+set}" = set; then
5262 INSTALL=$ac_cv_path_install
5263 else
5264 # As a last resort, use the slow shell script. Don't cache a
5265 # value for INSTALL within a source directory, because that will
5266 # break other packages using the cache if that directory is
5267 # removed, or if the value is a relative name.
5268 INSTALL=$ac_install_sh
5269 fi
5270fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5272$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005273
5274# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5275# It thinks the first close brace ends the variable substitution.
5276test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5277
5278test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5279
5280test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5281
5282
5283# Not every filesystem supports hard links
5284
5285if test -z "$LN" ; then
5286 case $ac_sys_system in
5287 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005288 *) LN=ln;;
5289 esac
5290fi
5291
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005292# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005293
5294ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005295
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005296# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5298$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005299
5300# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005301if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005302 withval=$with_pydebug;
5303if test "$withval" != no
5304then
5305
Matthias Kloseb9621712010-04-24 17:59:49 +00005306$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005307
Matthias Kloseb9621712010-04-24 17:59:49 +00005308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5309$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005310 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005311 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005312else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5313$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005314fi
5315else
Matthias Kloseb9621712010-04-24 17:59:49 +00005316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5317$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005318fi
5319
5320
5321# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5322# merged with this chunk of code?
5323
5324# Optimizer/debugger flags
5325# ------------------------
5326# (The following bit of code is complicated enough - please keep things
5327# indented properly. Just pretend you're editing Python code. ;-)
5328
5329# There are two parallel sets of case statements below, one that checks to
5330# see if OPT was set and one that does BASECFLAGS setting based upon
5331# compiler and platform. BASECFLAGS tweaks need to be made even if the
5332# user set OPT.
5333
5334# tweak OPT based on compiler and platform, only if the user didn't set
5335# it on the command line
5336
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005337if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005338then
5339 case $GCC in
5340 yes)
5341 if test "$CC" != 'g++' ; then
5342 STRICT_PROTO="-Wstrict-prototypes"
5343 fi
5344 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5345 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5346 WRAP="-fwrapv"
5347 fi
5348 case $ac_cv_prog_cc_g in
5349 yes)
5350 if test "$Py_DEBUG" = 'true' ; then
5351 # Optimization messes up debuggers, so turn it off for
5352 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005353 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005354 else
5355 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5356 fi
5357 ;;
5358 *)
5359 OPT="-O3 -Wall $STRICT_PROTO"
5360 ;;
5361 esac
5362 case $ac_sys_system in
5363 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5364 ;;
5365 esac
5366 ;;
5367
5368 *)
5369 OPT="-O"
5370 ;;
5371 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005372fi
5373
5374
5375
5376# The -arch flags for universal builds on OSX
5377UNIVERSAL_ARCH_FLAGS=
5378
5379
5380# tweak BASECFLAGS based on compiler and platform
5381case $GCC in
5382yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005383 # Python doesn't violate C99 aliasing rules, but older versions of
5384 # GCC produce warnings for legal Python code. Enable
5385 # -fno-strict-aliasing on versions of GCC that support but produce
5386 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5388$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005389 ac_save_cc="$CC"
5390 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005391 save_CFLAGS="$CFLAGS"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00005392 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005393 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005394else
Matthias Kloseb9621712010-04-24 17:59:49 +00005395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005396/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005397
Matthias Kloseb159a552010-04-25 21:00:44 +00005398
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005399int
5400main ()
5401{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005402
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005403 ;
5404 return 0;
5405}
Matthias Kloseb159a552010-04-25 21:00:44 +00005406
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005408if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005409
5410 CC="$ac_save_cc -fstrict-aliasing"
5411 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005413/* end confdefs.h. */
5414
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005415 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005416int
5417main ()
5418{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005419double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005420 ;
5421 return 0;
5422}
Matthias Kloseb159a552010-04-25 21:00:44 +00005423
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005425if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005426
5427 ac_cv_no_strict_aliasing=no
5428
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005429else
Matthias Kloseb159a552010-04-25 21:00:44 +00005430
5431 ac_cv_no_strict_aliasing=yes
5432
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005433fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005435
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005436else
Matthias Kloseb159a552010-04-25 21:00:44 +00005437
5438 ac_cv_no_strict_aliasing=no
5439
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005440fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005442fi
5443
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005444 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005445 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5447$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005448 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005449 then
5450 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5451 fi
5452
5453 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5454 # support. Without this, treatment of subnormals doesn't follow
5455 # the standard.
5456 case $ac_sys_machine in
5457 alpha*)
5458 BASECFLAGS="$BASECFLAGS -mieee"
5459 ;;
5460 esac
5461
5462 case $ac_sys_system in
5463 SCO_SV*)
5464 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5465 ;;
5466 # is there any other compiler on Darwin besides gcc?
5467 Darwin*)
5468 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5469 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005470 if test "${CC}" = gcc
5471 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5473$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005474 case "${UNIVERSALSDK}" in
5475 */MacOSX10.4u.sdk)
5476 # Build using 10.4 SDK, force usage of gcc when the
5477 # compiler is gcc, otherwise the user will get very
5478 # confusing error messages when building on OSX 10.6
5479 CC=gcc-4.0
5480 CPP=cpp-4.0
5481 ;;
5482 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5484$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005485 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005486
5487
5488 if test "${enable_universalsdk}"; then
5489 UNIVERSAL_ARCH_FLAGS=""
5490 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5491 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5492 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005493 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005494 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5495 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005496 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005497 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005498
5499 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5500 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005501 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005502 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005503
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005504 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5505 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005506 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005507 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005508
5509 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5510 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005511 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005512 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005513
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005514 else
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00005515 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 +00005516
5517 fi
5518
5519
Ronald Oussoren666028b2010-04-18 19:07:43 +00005520 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5521 if test "${UNIVERSALSDK}" != "/"
5522 then
5523 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5524 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005525 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005526 fi
5527 fi
5528
5529 # Calculate the right deployment target for this build.
5530 #
5531 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5532 if test ${cur_target} '>' 10.2; then
5533 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005534 if test ${enable_universalsdk}; then
5535 if test "${UNIVERSAL_ARCHS}" = "all"; then
5536 # Ensure that the default platform for a
5537 # 4-way universal build is OSX 10.5,
5538 # that's the first OS release where
5539 # 4-way builds make sense.
5540 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005541
5542 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5543 cur_target='10.5'
5544
5545 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5546 cur_target='10.5'
5547
5548 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5549 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005550 fi
5551 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005552 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005553 # On Intel macs default to a deployment
5554 # target of 10.4, that's the first OSX
5555 # release with Intel support.
5556 cur_target="10.4"
5557 fi
5558 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005559 fi
5560 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5561
5562 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5563 # environment with a value that is the same as what we'll use
5564 # in the Makefile to ensure that we'll get the same compiler
5565 # environment during configure and build time.
5566 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5567 export MACOSX_DEPLOYMENT_TARGET
5568 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5569
5570 ;;
5571 OSF*)
5572 BASECFLAGS="$BASECFLAGS -mieee"
5573 ;;
5574 esac
5575 ;;
5576
5577*)
5578 case $ac_sys_system in
5579 OpenUNIX*|UnixWare*)
5580 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5581 ;;
5582 OSF*)
5583 BASECFLAGS="$BASECFLAGS -ieee -std"
5584 ;;
5585 SCO_SV*)
5586 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5587 ;;
5588 esac
5589 ;;
5590esac
5591
5592if test "$Py_DEBUG" = 'true'; then
5593 :
5594else
5595 OPT="-DNDEBUG $OPT"
5596fi
5597
5598if test "$ac_arch_flags"
5599then
5600 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5601fi
5602
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005603# Check whether GCC supports PyArg_ParseTuple format
5604if test "$GCC" = "yes"
5605then
Matthias Kloseb9621712010-04-24 17:59:49 +00005606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5607$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005608 save_CFLAGS=$CFLAGS
5609 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005611/* end confdefs.h. */
5612
5613 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005614int
5615main ()
5616{
5617
5618 ;
5619 return 0;
5620}
Matthias Kloseb159a552010-04-25 21:00:44 +00005621
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005623if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005624
Matthias Kloseb159a552010-04-25 21:00:44 +00005625
Matthias Kloseb9621712010-04-24 17:59:49 +00005626$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005627
Matthias Kloseb159a552010-04-25 21:00:44 +00005628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005629$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005630
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005631else
Matthias Kloseb159a552010-04-25 21:00:44 +00005632
5633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005634$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005635
5636fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5638 CFLAGS=$save_CFLAGS
5639fi
5640
5641# On some compilers, pthreads are available without further options
5642# (e.g. MacOS X). On some of these systems, the compiler will not
5643# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5644# So we have to see first whether pthreads are available without
5645# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5647$as_echo_n "checking whether pthreads are available without options... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00005648if test "${ac_cv_pthread_is_default+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005649 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005650else
Matthias Kloseb9621712010-04-24 17:59:49 +00005651 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005652 ac_cv_pthread_is_default=no
5653else
Matthias Kloseb9621712010-04-24 17:59:49 +00005654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005655/* end confdefs.h. */
5656
5657#include <pthread.h>
5658
5659void* routine(void* p){return NULL;}
5660
5661int main(){
5662 pthread_t p;
5663 if(pthread_create(&p,NULL,routine,NULL)!=0)
5664 return 1;
5665 (void)pthread_detach(p);
5666 return 0;
5667}
5668
5669_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005670if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671
5672 ac_cv_pthread_is_default=yes
5673 ac_cv_kthread=no
5674 ac_cv_pthread=no
5675
5676else
Matthias Kloseb9621712010-04-24 17:59:49 +00005677 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005679rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5680 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005681fi
5682
5683
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684fi
5685
Matthias Kloseb9621712010-04-24 17:59:49 +00005686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5687$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005688
5689
5690if test $ac_cv_pthread_is_default = yes
5691then
5692 ac_cv_kpthread=no
5693else
5694# -Kpthread, if available, provides the right #defines
5695# and linker options to make pthread_create available
5696# Some compilers won't report that they do not support -Kpthread,
5697# so we need to run a program to see whether it really made the
5698# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5700$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00005701if test "${ac_cv_kpthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005702 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703else
5704 ac_save_cc="$CC"
5705CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005706if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707 ac_cv_kpthread=no
5708else
Matthias Kloseb9621712010-04-24 17:59:49 +00005709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710/* end confdefs.h. */
5711
5712#include <pthread.h>
5713
5714void* routine(void* p){return NULL;}
5715
5716int main(){
5717 pthread_t p;
5718 if(pthread_create(&p,NULL,routine,NULL)!=0)
5719 return 1;
5720 (void)pthread_detach(p);
5721 return 0;
5722}
5723
5724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005725if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726 ac_cv_kpthread=yes
5727else
Matthias Kloseb9621712010-04-24 17:59:49 +00005728 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005730rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5731 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005732fi
5733
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005734CC="$ac_save_cc"
5735fi
5736
Matthias Kloseb9621712010-04-24 17:59:49 +00005737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5738$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739fi
5740
5741if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5742then
5743# -Kthread, if available, provides the right #defines
5744# and linker options to make pthread_create available
5745# Some compilers won't report that they do not support -Kthread,
5746# so we need to run a program to see whether it really made the
5747# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5749$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00005750if test "${ac_cv_kthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005751 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752else
5753 ac_save_cc="$CC"
5754CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005755if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756 ac_cv_kthread=no
5757else
Matthias Kloseb9621712010-04-24 17:59:49 +00005758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759/* end confdefs.h. */
5760
5761#include <pthread.h>
5762
5763void* routine(void* p){return NULL;}
5764
5765int main(){
5766 pthread_t p;
5767 if(pthread_create(&p,NULL,routine,NULL)!=0)
5768 return 1;
5769 (void)pthread_detach(p);
5770 return 0;
5771}
5772
5773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005774if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775 ac_cv_kthread=yes
5776else
Matthias Kloseb9621712010-04-24 17:59:49 +00005777 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005779rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5780 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005781fi
5782
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783CC="$ac_save_cc"
5784fi
5785
Matthias Kloseb9621712010-04-24 17:59:49 +00005786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5787$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788fi
5789
5790if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5791then
5792# -pthread, if available, provides the right #defines
5793# and linker options to make pthread_create available
5794# Some compilers won't report that they do not support -pthread,
5795# so we need to run a program to see whether it really made the
5796# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5798$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00005799if test "${ac_cv_thread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005800 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801else
5802 ac_save_cc="$CC"
5803CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005804if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005805 ac_cv_pthread=no
5806else
Matthias Kloseb9621712010-04-24 17:59:49 +00005807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005808/* end confdefs.h. */
5809
5810#include <pthread.h>
5811
5812void* routine(void* p){return NULL;}
5813
5814int main(){
5815 pthread_t p;
5816 if(pthread_create(&p,NULL,routine,NULL)!=0)
5817 return 1;
5818 (void)pthread_detach(p);
5819 return 0;
5820}
5821
5822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005823if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005824 ac_cv_pthread=yes
5825else
Matthias Kloseb9621712010-04-24 17:59:49 +00005826 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005828rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5829 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005830fi
5831
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005832CC="$ac_save_cc"
5833fi
5834
Matthias Kloseb9621712010-04-24 17:59:49 +00005835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5836$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837fi
5838
5839# If we have set a CC compiler flag for thread support then
5840# check if it works for CXX, too.
5841ac_cv_cxx_thread=no
5842if test ! -z "$CXX"
5843then
Matthias Kloseb9621712010-04-24 17:59:49 +00005844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5845$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846ac_save_cxx="$CXX"
5847
5848if test "$ac_cv_kpthread" = "yes"
5849then
5850 CXX="$CXX -Kpthread"
5851 ac_cv_cxx_thread=yes
5852elif test "$ac_cv_kthread" = "yes"
5853then
5854 CXX="$CXX -Kthread"
5855 ac_cv_cxx_thread=yes
5856elif test "$ac_cv_pthread" = "yes"
5857then
5858 CXX="$CXX -pthread"
5859 ac_cv_cxx_thread=yes
5860fi
5861
5862if test $ac_cv_cxx_thread = yes
5863then
5864 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5865 $CXX -c conftest.$ac_ext 2>&5
5866 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5867 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5868 then
5869 ac_cv_cxx_thread=yes
5870 else
5871 ac_cv_cxx_thread=no
5872 fi
5873 rm -fr conftest*
5874fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5876$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005877fi
5878CXX="$ac_save_cxx"
5879
5880
5881# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5883$as_echo_n "checking for ANSI C header files... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00005884if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005885 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886else
Matthias Kloseb9621712010-04-24 17:59:49 +00005887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005888/* end confdefs.h. */
5889#include <stdlib.h>
5890#include <stdarg.h>
5891#include <string.h>
5892#include <float.h>
5893
5894int
5895main ()
5896{
5897
5898 ;
5899 return 0;
5900}
5901_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005902if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903 ac_cv_header_stdc=yes
5904else
Matthias Kloseb9621712010-04-24 17:59:49 +00005905 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5908
5909if test $ac_cv_header_stdc = yes; then
5910 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912/* end confdefs.h. */
5913#include <string.h>
5914
5915_ACEOF
5916if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005917 $EGREP "memchr" >/dev/null 2>&1; then :
5918
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919else
5920 ac_cv_header_stdc=no
5921fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005922rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923
5924fi
5925
5926if test $ac_cv_header_stdc = yes; then
5927 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929/* end confdefs.h. */
5930#include <stdlib.h>
5931
5932_ACEOF
5933if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005934 $EGREP "free" >/dev/null 2>&1; then :
5935
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936else
5937 ac_cv_header_stdc=no
5938fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005939rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940
5941fi
5942
5943if test $ac_cv_header_stdc = yes; then
5944 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00005945 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946 :
5947else
Matthias Kloseb9621712010-04-24 17:59:49 +00005948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949/* end confdefs.h. */
5950#include <ctype.h>
5951#include <stdlib.h>
5952#if ((' ' & 0x0FF) == 0x020)
5953# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5954# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5955#else
5956# define ISLOWER(c) \
5957 (('a' <= (c) && (c) <= 'i') \
5958 || ('j' <= (c) && (c) <= 'r') \
5959 || ('s' <= (c) && (c) <= 'z'))
5960# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5961#endif
5962
5963#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5964int
5965main ()
5966{
5967 int i;
5968 for (i = 0; i < 256; i++)
5969 if (XOR (islower (i), ISLOWER (i))
5970 || toupper (i) != TOUPPER (i))
5971 return 2;
5972 return 0;
5973}
5974_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005975if ac_fn_c_try_run "$LINENO"; then :
5976
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005977else
Matthias Kloseb9621712010-04-24 17:59:49 +00005978 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005980rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5981 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005982fi
5983
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984fi
5985fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5987$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005988if test $ac_cv_header_stdc = yes; then
5989
Matthias Kloseb9621712010-04-24 17:59:49 +00005990$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005991
5992fi
5993
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005994for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5995fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005996ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005997shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005998unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005999sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6000sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006001sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006002sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006003sys/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 +00006004sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006005bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006006do :
6007 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6008ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006009eval as_val=\$$as_ac_Header
6010 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006011 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006012#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006013_ACEOF
6014
6015fi
6016
Guido van Rossum627b2d71993-12-24 10:39:16 +00006017done
6018
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006019ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006020for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006021 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6023$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006024if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006025 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006026else
Matthias Kloseb9621712010-04-24 17:59:49 +00006027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006028/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006029#include <sys/types.h>
6030#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006031
Martin v. Löwis11437992002-04-12 09:54:03 +00006032int
6033main ()
6034{
6035if ((DIR *) 0)
6036return 0;
6037 ;
6038 return 0;
6039}
6040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006041if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006042 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006043else
Matthias Kloseb9621712010-04-24 17:59:49 +00006044 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006045fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006047fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006048eval ac_res=\$$as_ac_Header
6049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6050$as_echo "$ac_res" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006051eval as_val=\$$as_ac_Header
6052 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006053 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006054#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006055_ACEOF
6056
6057ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006058fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006059
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006060done
6061# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6062if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6064$as_echo_n "checking for library containing opendir... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006065if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006066 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006067else
Martin v. Löwis11437992002-04-12 09:54:03 +00006068 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006070/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006071
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006072/* Override any GCC internal prototype to avoid an error.
6073 Use char because int might match the return type of a GCC
6074 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006075#ifdef __cplusplus
6076extern "C"
6077#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006078char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006079int
6080main ()
6081{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006082return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006083 ;
6084 return 0;
6085}
6086_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006087for ac_lib in '' dir; do
6088 if test -z "$ac_lib"; then
6089 ac_res="none required"
6090 else
6091 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006092 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006093 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006094 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006095 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006096fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006097rm -f core conftest.err conftest.$ac_objext \
6098 conftest$ac_exeext
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006099 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006100 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006101fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006102done
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006103if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006104
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006105else
6106 ac_cv_search_opendir=no
6107fi
6108rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006109LIBS=$ac_func_search_save_LIBS
6110fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6112$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006113ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006114if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006115 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006116
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006117fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006118
Michael W. Hudson54241132001-12-07 15:38:26 +00006119else
Matthias Kloseb9621712010-04-24 17:59:49 +00006120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6121$as_echo_n "checking for library containing opendir... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006122if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006123 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006124else
6125 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006126cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006127/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006128
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006129/* Override any GCC internal prototype to avoid an error.
6130 Use char because int might match the return type of a GCC
6131 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006132#ifdef __cplusplus
6133extern "C"
6134#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006135char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006136int
6137main ()
6138{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006139return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006140 ;
6141 return 0;
6142}
6143_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006144for ac_lib in '' x; do
6145 if test -z "$ac_lib"; then
6146 ac_res="none required"
6147 else
6148 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006149 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006150 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006151 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006152 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006153fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006154rm -f core conftest.err conftest.$ac_objext \
6155 conftest$ac_exeext
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006156 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006157 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006159done
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006160if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006161
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006162else
6163 ac_cv_search_opendir=no
6164fi
6165rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006166LIBS=$ac_func_search_save_LIBS
6167fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6169$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006170ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006171if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006172 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006173
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006174fi
6175
6176fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006177
Matthias Kloseb9621712010-04-24 17:59:49 +00006178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6179$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006180if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006181 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006182else
Matthias Kloseb9621712010-04-24 17:59:49 +00006183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006184/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006185#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006186int
6187main ()
6188{
6189return makedev(0, 0);
6190 ;
6191 return 0;
6192}
6193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006194if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006195 ac_cv_header_sys_types_h_makedev=yes
6196else
Matthias Kloseb9621712010-04-24 17:59:49 +00006197 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006198fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006199rm -f core conftest.err conftest.$ac_objext \
6200 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006201
6202fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6204$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006205
6206if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006207ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006208if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006209
Matthias Kloseb9621712010-04-24 17:59:49 +00006210$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006211
6212fi
6213
6214
6215
6216 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006217 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006218if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006219
Matthias Kloseb9621712010-04-24 17:59:49 +00006220$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006221
6222fi
6223
6224
6225 fi
6226fi
6227
Michael W. Hudson54241132001-12-07 15:38:26 +00006228
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006229# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006230for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006231do :
6232 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006233#ifdef HAVE_CURSES_H
6234#include <curses.h>
6235#endif
6236
Matthias Kloseb9621712010-04-24 17:59:49 +00006237"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006238if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006239 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006240#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006241_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006242
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006243fi
6244
6245done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006246
6247
Martin v. Löwis11017b12006-01-14 18:12:57 +00006248# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006249for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006250do :
6251 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 +00006252#ifdef HAVE_ASM_TYPES_H
6253#include <asm/types.h>
6254#endif
6255#ifdef HAVE_SYS_SOCKET_H
6256#include <sys/socket.h>
6257#endif
6258
Matthias Kloseb9621712010-04-24 17:59:49 +00006259"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006260if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006261 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006262#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006263_ACEOF
6264
6265fi
6266
6267done
6268
6269
Guido van Rossum627b2d71993-12-24 10:39:16 +00006270# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006271was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6273$as_echo_n "checking for clock_t in time.h... " >&6; }
6274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006275/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006276#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006277
6278_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006279if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006280 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006281 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006282else
Martin v. Löwis11437992002-04-12 09:54:03 +00006283
6284
Matthias Kloseb9621712010-04-24 17:59:49 +00006285$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006286
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006287
Guido van Rossum627b2d71993-12-24 10:39:16 +00006288fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006289rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006290
Matthias Kloseb9621712010-04-24 17:59:49 +00006291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6292$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006293
Neal Norwitz11690112002-07-30 01:08:28 +00006294# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6296$as_echo_n "checking for makedev... " >&6; }
6297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006298/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006299
Jesus Cea740f53a2010-04-28 11:35:30 +00006300#if defined(MAJOR_IN_MKDEV)
6301#include <sys/mkdev.h>
6302#elif defined(MAJOR_IN_SYSMACROS)
6303#include <sys/sysmacros.h>
6304#else
6305#include <sys/types.h>
6306#endif
6307
Neal Norwitz11690112002-07-30 01:08:28 +00006308int
6309main ()
6310{
Jesus Cea740f53a2010-04-28 11:35:30 +00006311
6312 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006313 ;
6314 return 0;
6315}
Matthias Kloseb159a552010-04-25 21:00:44 +00006316
Neal Norwitz11690112002-07-30 01:08:28 +00006317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006318if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006319 ac_cv_has_makedev=yes
6320else
Matthias Kloseb9621712010-04-24 17:59:49 +00006321 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006322fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006323rm -f core conftest.err conftest.$ac_objext \
6324 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006325if test "$ac_cv_has_makedev" = "no"; then
6326 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006328/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006329
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006330#define _OSF_SOURCE 1
6331#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006332
Neal Norwitz11690112002-07-30 01:08:28 +00006333int
6334main ()
6335{
6336 makedev(0, 0)
6337 ;
6338 return 0;
6339}
6340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006341if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006342 ac_cv_has_makedev=yes
6343else
Matthias Kloseb9621712010-04-24 17:59:49 +00006344 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006345fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006346rm -f core conftest.err conftest.$ac_objext \
6347 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006348 if test "$ac_cv_has_makedev" = "yes"; then
6349
Matthias Kloseb9621712010-04-24 17:59:49 +00006350$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006351
6352 fi
6353fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6355$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006356if test "$ac_cv_has_makedev" = "yes"; then
6357
Matthias Kloseb9621712010-04-24 17:59:49 +00006358$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006359
6360fi
6361
Martin v. Löwis399a6892002-10-04 10:22:02 +00006362# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6363# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6364# defined, but the compiler does not support pragma redefine_extname,
6365# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6366# structures (such as rlimit64) without declaring them. As a
6367# work-around, disable LFS on such configurations
6368
6369use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6371$as_echo_n "checking Solaris LFS bug... " >&6; }
6372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006373/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006374
6375#define _LARGEFILE_SOURCE 1
6376#define _FILE_OFFSET_BITS 64
6377#include <sys/resource.h>
6378
Martin v. Löwis399a6892002-10-04 10:22:02 +00006379int
6380main ()
6381{
6382struct rlimit foo;
6383 ;
6384 return 0;
6385}
6386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006387if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006388 sol_lfs_bug=no
6389else
Matthias Kloseb9621712010-04-24 17:59:49 +00006390 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006391fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6394$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006395if test "$sol_lfs_bug" = "yes"; then
6396 use_lfs=no
6397fi
6398
6399if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006400# Two defines needed to enable largefile support on various platforms
6401# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006402case $ac_sys_system/$ac_sys_release in
6403AIX*)
6404
6405$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6406
6407 ;;
6408esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006409
Matthias Kloseb9621712010-04-24 17:59:49 +00006410$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006411
6412
Matthias Kloseb9621712010-04-24 17:59:49 +00006413$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006414
Martin v. Löwis399a6892002-10-04 10:22:02 +00006415fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006416
Guido van Rossum84e7b241996-08-19 21:59:00 +00006417# Add some code to confdefs.h so that the test for off_t works on SCO
6418cat >> confdefs.h <<\EOF
6419#if defined(SCO_DS)
6420#undef _OFF_T
6421#endif
6422EOF
6423
Guido van Rossumef2255b2000-03-10 22:30:29 +00006424# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006425ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006426if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006427
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006428else
Martin v. Löwis11437992002-04-12 09:54:03 +00006429
6430cat >>confdefs.h <<_ACEOF
6431#define mode_t int
6432_ACEOF
6433
6434fi
6435
Matthias Kloseb9621712010-04-24 17:59:49 +00006436ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006437if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006438
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006439else
Martin v. Löwis11437992002-04-12 09:54:03 +00006440
6441cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006442#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006443_ACEOF
6444
6445fi
6446
Matthias Kloseb9621712010-04-24 17:59:49 +00006447ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006448if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006449
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006450else
Martin v. Löwis11437992002-04-12 09:54:03 +00006451
6452cat >>confdefs.h <<_ACEOF
6453#define pid_t int
6454_ACEOF
6455
6456fi
6457
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006458
Martin v. Löwis11437992002-04-12 09:54:03 +00006459cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006460#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006461_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006462
Matthias Kloseb9621712010-04-24 17:59:49 +00006463ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006464if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006465
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006466else
Martin v. Löwis11437992002-04-12 09:54:03 +00006467
6468cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006469#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006470_ACEOF
6471
6472fi
6473
Matthias Kloseb9621712010-04-24 17:59:49 +00006474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6475$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006476if test "${ac_cv_type_uid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006477 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006478else
Matthias Kloseb9621712010-04-24 17:59:49 +00006479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006480/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006481#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006482
6483_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006484if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006485 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006486 ac_cv_type_uid_t=yes
6487else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006488 ac_cv_type_uid_t=no
6489fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006490rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006491
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006492fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6494$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006495if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006496
Matthias Kloseb9621712010-04-24 17:59:49 +00006497$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006498
6499
Matthias Kloseb9621712010-04-24 17:59:49 +00006500$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006501
6502fi
6503
Matthias Kloseb9621712010-04-24 17:59:49 +00006504ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6505case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006506 no|yes) ;; #(
6507 *)
6508
Matthias Kloseb9621712010-04-24 17:59:49 +00006509$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006510
6511
6512cat >>confdefs.h <<_ACEOF
6513#define uint32_t $ac_cv_c_uint32_t
6514_ACEOF
6515;;
6516 esac
6517
Matthias Kloseb9621712010-04-24 17:59:49 +00006518ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6519case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006520 no|yes) ;; #(
6521 *)
6522
Matthias Kloseb9621712010-04-24 17:59:49 +00006523$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006524
6525
6526cat >>confdefs.h <<_ACEOF
6527#define uint64_t $ac_cv_c_uint64_t
6528_ACEOF
6529;;
6530 esac
6531
Matthias Kloseb9621712010-04-24 17:59:49 +00006532ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6533case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006534 no|yes) ;; #(
6535 *)
6536
6537cat >>confdefs.h <<_ACEOF
6538#define int32_t $ac_cv_c_int32_t
6539_ACEOF
6540;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006541esac
6542
Matthias Kloseb9621712010-04-24 17:59:49 +00006543ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6544case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006545 no|yes) ;; #(
6546 *)
6547
6548cat >>confdefs.h <<_ACEOF
6549#define int64_t $ac_cv_c_int64_t
6550_ACEOF
6551;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006552esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006553
Matthias Kloseb9621712010-04-24 17:59:49 +00006554ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006555if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006556
Matthias Kloseb9621712010-04-24 17:59:49 +00006557$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006558
6559fi
6560
Jack Jansendd19cf82001-12-06 22:36:17 +00006561
Michael W. Hudson54241132001-12-07 15:38:26 +00006562# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006563# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006564# The cast to long int works around a bug in the HP C Compiler
6565# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6566# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6567# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6569$as_echo_n "checking size of int... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006570if test "${ac_cv_sizeof_int+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006571 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006572else
Matthias Kloseb9621712010-04-24 17:59:49 +00006573 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 +00006574
Martin v. Löwis11437992002-04-12 09:54:03 +00006575else
Matthias Kloseb9621712010-04-24 17:59:49 +00006576 if test "$ac_cv_type_int" = yes; then
6577 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6578$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006579{ as_fn_set_status 77
6580as_fn_error "cannot compute sizeof (int)
6581See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006582 else
6583 ac_cv_sizeof_int=0
6584 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006586
Martin v. Löwis11437992002-04-12 09:54:03 +00006587fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6589$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006590
6591
6592
Martin v. Löwis11437992002-04-12 09:54:03 +00006593cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006594#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006595_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006596
6597
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006598# The cast to long int works around a bug in the HP C Compiler
6599# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6600# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6601# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6603$as_echo_n "checking size of long... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006604if test "${ac_cv_sizeof_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006605 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006606else
Matthias Kloseb9621712010-04-24 17:59:49 +00006607 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 +00006608
Martin v. Löwis11437992002-04-12 09:54:03 +00006609else
Matthias Kloseb9621712010-04-24 17:59:49 +00006610 if test "$ac_cv_type_long" = yes; then
6611 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6612$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006613{ as_fn_set_status 77
6614as_fn_error "cannot compute sizeof (long)
6615See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006616 else
6617 ac_cv_sizeof_long=0
6618 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006619fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006620
Martin v. Löwis11437992002-04-12 09:54:03 +00006621fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6623$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006624
6625
6626
Martin v. Löwis11437992002-04-12 09:54:03 +00006627cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006628#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006629_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006630
6631
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006632# The cast to long int works around a bug in the HP C Compiler
6633# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6634# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6635# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6637$as_echo_n "checking size of void *... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006638if test "${ac_cv_sizeof_void_p+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006639 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006640else
Matthias Kloseb9621712010-04-24 17:59:49 +00006641 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 +00006642
Martin v. Löwis11437992002-04-12 09:54:03 +00006643else
Matthias Kloseb9621712010-04-24 17:59:49 +00006644 if test "$ac_cv_type_void_p" = yes; then
6645 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6646$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006647{ as_fn_set_status 77
6648as_fn_error "cannot compute sizeof (void *)
6649See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006650 else
6651 ac_cv_sizeof_void_p=0
6652 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006654
Martin v. Löwis11437992002-04-12 09:54:03 +00006655fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6657$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006658
6659
6660
Martin v. Löwis11437992002-04-12 09:54:03 +00006661cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006662#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006663_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006664
6665
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006666# The cast to long int works around a bug in the HP C Compiler
6667# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6668# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6669# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6671$as_echo_n "checking size of short... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006672if test "${ac_cv_sizeof_short+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006673 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006674else
Matthias Kloseb9621712010-04-24 17:59:49 +00006675 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 +00006676
Martin v. Löwis11437992002-04-12 09:54:03 +00006677else
Matthias Kloseb9621712010-04-24 17:59:49 +00006678 if test "$ac_cv_type_short" = yes; then
6679 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6680$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006681{ as_fn_set_status 77
6682as_fn_error "cannot compute sizeof (short)
6683See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006684 else
6685 ac_cv_sizeof_short=0
6686 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006688
Martin v. Löwis11437992002-04-12 09:54:03 +00006689fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6691$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006692
6693
6694
Martin v. Löwis11437992002-04-12 09:54:03 +00006695cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006696#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006697_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006698
6699
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006700# The cast to long int works around a bug in the HP C Compiler
6701# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6702# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6703# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6705$as_echo_n "checking size of float... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006706if test "${ac_cv_sizeof_float+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006707 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006708else
Matthias Kloseb9621712010-04-24 17:59:49 +00006709 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 +00006710
Martin v. Löwis11437992002-04-12 09:54:03 +00006711else
Matthias Kloseb9621712010-04-24 17:59:49 +00006712 if test "$ac_cv_type_float" = yes; then
6713 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6714$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006715{ as_fn_set_status 77
6716as_fn_error "cannot compute sizeof (float)
6717See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006718 else
6719 ac_cv_sizeof_float=0
6720 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006722
Martin v. Löwis11437992002-04-12 09:54:03 +00006723fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6725$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006726
6727
6728
Martin v. Löwis11437992002-04-12 09:54:03 +00006729cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006730#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006731_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006732
6733
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006734# The cast to long int works around a bug in the HP C Compiler
6735# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6736# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6737# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6739$as_echo_n "checking size of double... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006740if test "${ac_cv_sizeof_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006741 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006742else
Matthias Kloseb9621712010-04-24 17:59:49 +00006743 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 +00006744
Martin v. Löwis11437992002-04-12 09:54:03 +00006745else
Matthias Kloseb9621712010-04-24 17:59:49 +00006746 if test "$ac_cv_type_double" = yes; then
6747 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6748$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006749{ as_fn_set_status 77
6750as_fn_error "cannot compute sizeof (double)
6751See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006752 else
6753 ac_cv_sizeof_double=0
6754 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006756
Martin v. Löwis11437992002-04-12 09:54:03 +00006757fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6759$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006760
6761
6762
Martin v. Löwis11437992002-04-12 09:54:03 +00006763cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006764#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006765_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006766
6767
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006768# The cast to long int works around a bug in the HP C Compiler
6769# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6770# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6771# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6773$as_echo_n "checking size of fpos_t... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006774if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006775 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006776else
Matthias Kloseb9621712010-04-24 17:59:49 +00006777 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 +00006778
Martin v. Löwis11437992002-04-12 09:54:03 +00006779else
Matthias Kloseb9621712010-04-24 17:59:49 +00006780 if test "$ac_cv_type_fpos_t" = yes; then
6781 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6782$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006783{ as_fn_set_status 77
6784as_fn_error "cannot compute sizeof (fpos_t)
6785See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006786 else
6787 ac_cv_sizeof_fpos_t=0
6788 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006789fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006790
Martin v. Löwis11437992002-04-12 09:54:03 +00006791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6793$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006794
6795
6796
Martin v. Löwis11437992002-04-12 09:54:03 +00006797cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006798#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006799_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006800
Michael W. Hudson54241132001-12-07 15:38:26 +00006801
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006802# The cast to long int works around a bug in the HP C Compiler
6803# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6804# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6805# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6807$as_echo_n "checking size of size_t... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006808if test "${ac_cv_sizeof_size_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006809 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006810else
Matthias Kloseb9621712010-04-24 17:59:49 +00006811 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 +00006812
Martin v. Löwis18e16552006-02-15 17:27:45 +00006813else
Matthias Kloseb9621712010-04-24 17:59:49 +00006814 if test "$ac_cv_type_size_t" = yes; then
6815 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6816$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006817{ as_fn_set_status 77
6818as_fn_error "cannot compute sizeof (size_t)
6819See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006820 else
6821 ac_cv_sizeof_size_t=0
6822 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006824
Martin v. Löwis18e16552006-02-15 17:27:45 +00006825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6827$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006828
6829
6830
Martin v. Löwis18e16552006-02-15 17:27:45 +00006831cat >>confdefs.h <<_ACEOF
6832#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6833_ACEOF
6834
6835
Christian Heimes400adb02008-02-01 08:12:03 +00006836# The cast to long int works around a bug in the HP C Compiler
6837# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6838# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6839# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6841$as_echo_n "checking size of pid_t... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006842if test "${ac_cv_sizeof_pid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006843 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006844else
Matthias Kloseb9621712010-04-24 17:59:49 +00006845 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 +00006846
Christian Heimes400adb02008-02-01 08:12:03 +00006847else
Matthias Kloseb9621712010-04-24 17:59:49 +00006848 if test "$ac_cv_type_pid_t" = yes; then
6849 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6850$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006851{ as_fn_set_status 77
6852as_fn_error "cannot compute sizeof (pid_t)
6853See \`config.log' for more details." "$LINENO" 5; }; }
Christian Heimes400adb02008-02-01 08:12:03 +00006854 else
6855 ac_cv_sizeof_pid_t=0
6856 fi
6857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006858
Christian Heimes400adb02008-02-01 08:12:03 +00006859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6861$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006862
6863
6864
6865cat >>confdefs.h <<_ACEOF
6866#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6867_ACEOF
6868
6869
Michael W. Hudson54241132001-12-07 15:38:26 +00006870
Matthias Kloseb9621712010-04-24 17:59:49 +00006871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6872$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006873have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006875/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006876
Martin v. Löwis11437992002-04-12 09:54:03 +00006877int
6878main ()
6879{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006880long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006881 ;
6882 return 0;
6883}
6884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006885if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006886
6887
Matthias Kloseb9621712010-04-24 17:59:49 +00006888$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006889
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006890 have_long_long=yes
6891
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006892fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6895$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006896if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006897# The cast to long int works around a bug in the HP C Compiler
6898# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6899# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6900# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6902$as_echo_n "checking size of long long... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006903if test "${ac_cv_sizeof_long_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006904 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006905else
Matthias Kloseb9621712010-04-24 17:59:49 +00006906 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 +00006907
Martin v. Löwis11437992002-04-12 09:54:03 +00006908else
Matthias Kloseb9621712010-04-24 17:59:49 +00006909 if test "$ac_cv_type_long_long" = yes; then
6910 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6911$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006912{ as_fn_set_status 77
6913as_fn_error "cannot compute sizeof (long long)
6914See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006915 else
6916 ac_cv_sizeof_long_long=0
6917 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006918fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006919
Martin v. Löwis11437992002-04-12 09:54:03 +00006920fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6922$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006923
6924
6925
Martin v. Löwis11437992002-04-12 09:54:03 +00006926cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006927#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006928_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006929
Michael W. Hudson54241132001-12-07 15:38:26 +00006930
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006931fi
6932
Matthias Kloseb9621712010-04-24 17:59:49 +00006933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6934$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006935have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006937/* end confdefs.h. */
6938
6939int
6940main ()
6941{
6942long double x; x = (long double)0;
6943 ;
6944 return 0;
6945}
6946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006947if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006948
6949
Matthias Kloseb9621712010-04-24 17:59:49 +00006950$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006951
6952 have_long_double=yes
6953
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006954fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
6957$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006958if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006959# The cast to long int works around a bug in the HP C Compiler
6960# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6961# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6962# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
6964$as_echo_n "checking size of long double... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006965if test "${ac_cv_sizeof_long_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006966 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006967else
Matthias Kloseb9621712010-04-24 17:59:49 +00006968 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 +00006969
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006970else
Matthias Kloseb9621712010-04-24 17:59:49 +00006971 if test "$ac_cv_type_long_double" = yes; then
6972 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6973$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00006974{ as_fn_set_status 77
6975as_fn_error "cannot compute sizeof (long double)
6976See \`config.log' for more details." "$LINENO" 5; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006977 else
6978 ac_cv_sizeof_long_double=0
6979 fi
6980fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006981
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006982fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
6984$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006985
6986
6987
6988cat >>confdefs.h <<_ACEOF
6989#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
6990_ACEOF
6991
6992
6993fi
6994
6995
Matthias Kloseb9621712010-04-24 17:59:49 +00006996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
6997$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00006998have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007000/* end confdefs.h. */
7001
7002int
7003main ()
7004{
7005_Bool x; x = (_Bool)0;
7006 ;
7007 return 0;
7008}
7009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007010if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007011
7012
Matthias Kloseb9621712010-04-24 17:59:49 +00007013$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007014
7015 have_c99_bool=yes
7016
Thomas Woutersb2137042007-02-01 18:02:27 +00007017fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7020$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007021if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007022# The cast to long int works around a bug in the HP C Compiler
7023# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7024# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7025# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7027$as_echo_n "checking size of _Bool... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00007028if test "${ac_cv_sizeof__Bool+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007029 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007030else
Matthias Kloseb9621712010-04-24 17:59:49 +00007031 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 +00007032
Thomas Woutersb2137042007-02-01 18:02:27 +00007033else
Matthias Kloseb9621712010-04-24 17:59:49 +00007034 if test "$ac_cv_type__Bool" = yes; then
7035 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7036$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00007037{ as_fn_set_status 77
7038as_fn_error "cannot compute sizeof (_Bool)
7039See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007040 else
7041 ac_cv_sizeof__Bool=0
7042 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007043fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007044
Thomas Woutersb2137042007-02-01 18:02:27 +00007045fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7047$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007048
7049
7050
Thomas Woutersb2137042007-02-01 18:02:27 +00007051cat >>confdefs.h <<_ACEOF
7052#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7053_ACEOF
7054
7055
7056fi
7057
Matthias Kloseb9621712010-04-24 17:59:49 +00007058ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007059 #include <stdint.h>
7060 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007061 #ifdef HAVE_INTTYPES_H
7062 #include <inttypes.h>
7063 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007064"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00007065if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007066
7067cat >>confdefs.h <<_ACEOF
7068#define HAVE_UINTPTR_T 1
7069_ACEOF
7070
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007071# The cast to long int works around a bug in the HP C Compiler
7072# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7073# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7074# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7076$as_echo_n "checking size of uintptr_t... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00007077if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007078 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007079else
Matthias Kloseb9621712010-04-24 17:59:49 +00007080 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 +00007081
Martin v. Löwis11437992002-04-12 09:54:03 +00007082else
Matthias Kloseb9621712010-04-24 17:59:49 +00007083 if test "$ac_cv_type_uintptr_t" = yes; then
7084 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7085$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00007086{ as_fn_set_status 77
7087as_fn_error "cannot compute sizeof (uintptr_t)
7088See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007089 else
7090 ac_cv_sizeof_uintptr_t=0
7091 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007092fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007093
Martin v. Löwis11437992002-04-12 09:54:03 +00007094fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7096$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007097
7098
7099
Martin v. Löwis11437992002-04-12 09:54:03 +00007100cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007101#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007102_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007103
Michael W. Hudson54241132001-12-07 15:38:26 +00007104
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007105fi
7106
Thomas Wouters89f507f2006-12-13 04:49:30 +00007107
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007108# The cast to long int works around a bug in the HP C Compiler
7109# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7110# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7111# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7113$as_echo_n "checking size of off_t... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00007114if test "${ac_cv_sizeof_off_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007115 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007116else
Matthias Kloseb9621712010-04-24 17:59:49 +00007117 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007118#ifdef HAVE_SYS_TYPES_H
7119#include <sys/types.h>
7120#endif
7121
Matthias Kloseb9621712010-04-24 17:59:49 +00007122"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007123
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007124else
Matthias Kloseb9621712010-04-24 17:59:49 +00007125 if test "$ac_cv_type_off_t" = yes; then
7126 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7127$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00007128{ as_fn_set_status 77
7129as_fn_error "cannot compute sizeof (off_t)
7130See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007131 else
7132 ac_cv_sizeof_off_t=0
7133 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007134fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007135
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007136fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7138$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007139
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007140
7141
Martin v. Löwis11437992002-04-12 09:54:03 +00007142cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007143#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007144_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007145
Michael W. Hudson54241132001-12-07 15:38:26 +00007146
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007147
Matthias Kloseb9621712010-04-24 17:59:49 +00007148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7149$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007150if test "$have_long_long" = yes
7151then
7152if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007153 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007154
Matthias Kloseb9621712010-04-24 17:59:49 +00007155$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007156
Matthias Kloseb9621712010-04-24 17:59:49 +00007157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7158$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007159else
Matthias Kloseb9621712010-04-24 17:59:49 +00007160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7161$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007162fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007163else
Matthias Kloseb9621712010-04-24 17:59:49 +00007164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7165$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007166fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007167
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007168# The cast to long int works around a bug in the HP C Compiler
7169# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7170# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7171# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7173$as_echo_n "checking size of time_t... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00007174if test "${ac_cv_sizeof_time_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007175 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007176else
Matthias Kloseb9621712010-04-24 17:59:49 +00007177 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007178#ifdef HAVE_SYS_TYPES_H
7179#include <sys/types.h>
7180#endif
7181#ifdef HAVE_TIME_H
7182#include <time.h>
7183#endif
7184
Matthias Kloseb9621712010-04-24 17:59:49 +00007185"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007186
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007187else
Matthias Kloseb9621712010-04-24 17:59:49 +00007188 if test "$ac_cv_type_time_t" = yes; then
7189 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7190$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00007191{ as_fn_set_status 77
7192as_fn_error "cannot compute sizeof (time_t)
7193See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007194 else
7195 ac_cv_sizeof_time_t=0
7196 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007197fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007198
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007199fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7201$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007202
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007203
7204
Martin v. Löwis11437992002-04-12 09:54:03 +00007205cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007206#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007207_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007208
Michael W. Hudson54241132001-12-07 15:38:26 +00007209
7210
Trent Mick635f6fb2000-08-23 21:33:05 +00007211# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007212ac_save_cc="$CC"
7213if test "$ac_cv_kpthread" = "yes"
7214then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007215elif test "$ac_cv_kthread" = "yes"
7216then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007217elif test "$ac_cv_pthread" = "yes"
7218then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007219fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007220
Matthias Kloseb9621712010-04-24 17:59:49 +00007221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7222$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007223have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007225/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007226
7227 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007228int
7229main ()
7230{
Guido van Rossum12580492000-09-24 16:47:19 +00007231pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007232 ;
7233 return 0;
7234}
Matthias Kloseb159a552010-04-25 21:00:44 +00007235
Martin v. Löwis11437992002-04-12 09:54:03 +00007236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007237if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007238 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007239fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7242$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007243if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007244 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007245# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7246# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7247# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7249$as_echo_n "checking size of pthread_t... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00007250if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007251 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007252else
Matthias Kloseb9621712010-04-24 17:59:49 +00007253 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007254#ifdef HAVE_PTHREAD_H
7255#include <pthread.h>
7256#endif
7257
Matthias Kloseb9621712010-04-24 17:59:49 +00007258"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007259
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007260else
Matthias Kloseb9621712010-04-24 17:59:49 +00007261 if test "$ac_cv_type_pthread_t" = yes; then
7262 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7263$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00007264{ as_fn_set_status 77
7265as_fn_error "cannot compute sizeof (pthread_t)
7266See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007267 else
7268 ac_cv_sizeof_pthread_t=0
7269 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007270fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007271
Trent Mick635f6fb2000-08-23 21:33:05 +00007272fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7274$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007275
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007276
7277
Martin v. Löwis11437992002-04-12 09:54:03 +00007278cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007279#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007280_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007281
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007282
Trent Mick635f6fb2000-08-23 21:33:05 +00007283fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007284CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007285
Michael W. Hudson54241132001-12-07 15:38:26 +00007286
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007287case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007288 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007289 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7290 ;;
7291 Darwin/*)
7292 OTHER_LIBTOOL_OPT=""
7293 ;;
7294esac
7295
7296
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007297ARCH_RUN_32BIT=""
7298
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007299case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007300 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007301 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7302 if test "${enable_universalsdk}"; then
7303 :
7304 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007305 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007306 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007307 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007308 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007309 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007310 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007311 if test ${gcc_version} '<' 4.0
7312 then
7313 LIBTOOL_CRUFT="-lcc_dynamic"
7314 else
7315 LIBTOOL_CRUFT=""
7316 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007317 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007318 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007319else
Matthias Kloseb9621712010-04-24 17:59:49 +00007320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007321/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007322
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007323 #include <unistd.h>
7324 int main(int argc, char*argv[])
7325 {
7326 if (sizeof(long) == 4) {
7327 return 0;
7328 } else {
7329 return 1;
7330 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007331 }
7332
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007334if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007335 ac_osx_32bit=yes
7336else
Matthias Kloseb9621712010-04-24 17:59:49 +00007337 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007338fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007339rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7340 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007341fi
7342
7343
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007344 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007345 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007346 i386)
7347 MACOSX_DEFAULT_ARCH="i386"
7348 ;;
7349 ppc)
7350 MACOSX_DEFAULT_ARCH="ppc"
7351 ;;
7352 *)
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00007353 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007354 ;;
7355 esac
7356 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007357 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007358 i386)
7359 MACOSX_DEFAULT_ARCH="x86_64"
7360 ;;
7361 ppc)
7362 MACOSX_DEFAULT_ARCH="ppc64"
7363 ;;
7364 *)
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00007365 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007366 ;;
7367 esac
7368
7369 #ARCH_RUN_32BIT="true"
7370 fi
7371
7372 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007373 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007374 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007375esac
7376
Matthias Kloseb9621712010-04-24 17:59:49 +00007377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7378$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007379if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007380then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007381 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007382 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007383 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007384
Matthias Kloseb9621712010-04-24 17:59:49 +00007385$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007386
Matthias Kloseb9621712010-04-24 17:59:49 +00007387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7388$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007389 if test $enable_shared = "yes"
7390 then
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00007391 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 +00007392 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007393else
Matthias Kloseb9621712010-04-24 17:59:49 +00007394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7395$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007396fi
7397
Matthias Kloseb9621712010-04-24 17:59:49 +00007398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7399$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007400case $ac_sys_system/$ac_sys_release in
7401 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007402
Matthias Kloseb9621712010-04-24 17:59:49 +00007403$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007404
Matthias Kloseb9621712010-04-24 17:59:49 +00007405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7406$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007407 ;;
7408 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7410$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007411 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007412esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007413
Guido van Rossum0a516c91994-09-12 10:58:40 +00007414# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007415
Michael W. Hudson54241132001-12-07 15:38:26 +00007416
7417
7418
7419
Benjamin Peterson99f03762010-04-11 22:15:28 +00007420
Thomas Wouters477c8d52006-05-27 19:21:47 +00007421
Georg Brandlb1441c72009-01-03 22:33:39 +00007422
Thomas Wouters477c8d52006-05-27 19:21:47 +00007423cat >>confdefs.h <<_ACEOF
7424#define SHLIB_EXT "$SO"
7425_ACEOF
7426
Guido van Rossum0a516c91994-09-12 10:58:40 +00007427# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007428# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007429# (Shared libraries in this instance are shared modules to be loaded into
7430# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7432$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007433if test -z "$LDSHARED"
7434then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007435 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007436 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007437 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007438 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007439 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007440 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007441 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007442 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007443 if test "$GCC" = "yes" ; then
7444 LDSHARED='$(CC) -shared'
7445 LDCXXSHARED='$(CXX) -shared'
7446 else
7447 LDSHARED='$(CC) -G'
7448 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007449 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007450 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007451 if test "$GCC" = "yes" ; then
7452 LDSHARED='$(CC) -shared'
7453 LDCXXSHARED='$(CXX) -shared'
7454 else
7455 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007456 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007457 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007458 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007459 LDSHARED='$(CC) -bundle'
7460 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007461 if test "$enable_framework" ; then
7462 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007463 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7464 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007465 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007466 else
7467 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007468 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007469 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007470 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007471 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007472 LDSHARED='$(CC) -bundle'
7473 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007474 if test "$enable_framework" ; then
7475 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007476 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7477 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007478 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007479 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007480 # No framework, use the Python app as bundle-loader
7481 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007482 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007483 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007484 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007485 Darwin/*)
7486 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7487 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007488
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007489 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007490 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007491 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007492 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007493 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007494 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7495 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007496 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007497 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007498 LDSHARED='$(CC) -bundle'
7499 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007500 if test "$enable_framework" ; then
7501 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007502 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7503 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007504 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007505 else
7506 # No framework, use the Python app as bundle-loader
7507 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7508 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007509 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007510 fi
7511 fi
7512 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007513 Linux*|GNU*|QNX*)
7514 LDSHARED='$(CC) -shared'
7515 LDCXXSHARED='$(CXX) -shared';;
7516 BSD/OS*/4*)
7517 LDSHARED="gcc -shared"
7518 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007519 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007520 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007521 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007522 LDSHARED='$(CC) -shared'
7523 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007524 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007525 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007526 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007527 OpenBSD*)
7528 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7529 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007530 LDSHARED='$(CC) -shared $(CCSHARED)'
7531 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007532 else
7533 case `uname -r` in
7534 [01].* | 2.[0-7] | 2.[0-7].*)
7535 LDSHARED="ld -Bshareable ${LDFLAGS}"
7536 ;;
7537 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007538 LDSHARED='$(CC) -shared $(CCSHARED)'
7539 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007540 ;;
7541 esac
7542 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007543 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007544 LDSHARED='$(CC) -shared'
7545 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007546 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007547 if test "$GCC" = "yes" ; then
7548 LDSHARED='$(CC) -shared'
7549 LDCXXSHARED='$(CXX) -shared'
7550 else
7551 LDSHARED='$(CC) -G'
7552 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007553 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007554 SCO_SV*)
7555 LDSHARED='$(CC) -Wl,-G,-Bexport'
7556 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7557 CYGWIN*)
7558 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7559 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007560 *) LDSHARED="ld";;
7561 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007562fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7564$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007565LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007566BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007567# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007568# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7570$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007571if test -z "$CCSHARED"
7572then
Guido van Rossum07397971997-04-29 21:49:50 +00007573 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007574 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007575 then CCSHARED="-fPIC";
7576 elif test `uname -p` = sparc;
7577 then CCSHARED="-xcode=pic32";
7578 else CCSHARED="-Kpic";
7579 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007580 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007581 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007582 else CCSHARED="+z";
7583 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007584 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007585 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007586 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007587 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007588 if test "$GCC" = "yes"
7589 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007590 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007591 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007592 SCO_SV*)
7593 if test "$GCC" = "yes"
7594 then CCSHARED="-fPIC"
7595 else CCSHARED="-Kpic -belf"
7596 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007597 IRIX*/6*) case $CC in
7598 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007599 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007600 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007601 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007602fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7604$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007605# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007606# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7608$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007609if test -z "$LINKFORSHARED"
7610then
Guido van Rossum07397971997-04-29 21:49:50 +00007611 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007612 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007613 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007614 LINKFORSHARED="-Wl,-E -Wl,+s";;
7615# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007616 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007617 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007618 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007619 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007620 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007621 if test "$enable_framework"
7622 then
Jack Jansenda49e192005-01-07 13:08:22 +00007623 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007624 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007625 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007626 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007627 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007628 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007629 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007630 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7631 then
7632 LINKFORSHARED="-Wl,--export-dynamic"
7633 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007634 SunOS/5*) case $CC in
7635 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007636 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007637 then
7638 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007639 fi;;
7640 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007641 CYGWIN*)
7642 if test $enable_shared = "no"
7643 then
7644 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7645 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007646 QNX*)
7647 # -Wl,-E causes the symbols to be added to the dynamic
7648 # symbol table so that they can be found when a module
7649 # is loaded. -N 2048K causes the stack size to be set
7650 # to 2048 kilobytes so that the stack doesn't overflow
7651 # when running test_compile.py.
7652 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007653 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007654fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7656$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007657
Michael W. Hudson54241132001-12-07 15:38:26 +00007658
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007659
Matthias Kloseb9621712010-04-24 17:59:49 +00007660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7661$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007662if test ! "$LIBRARY" = "$LDLIBRARY"
7663then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007664 case $ac_sys_system in
7665 CYGWIN*)
7666 # Cygwin needs CCSHARED when building extension DLLs
7667 # but not when building the interpreter DLL.
7668 CFLAGSFORSHARED='';;
7669 *)
7670 CFLAGSFORSHARED='$(CCSHARED)'
7671 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7674$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007675
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007676# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7677# library (with --enable-shared).
7678# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007679# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7680# if it is not required, since it creates a dependency of the shared library
7681# to LIBS. This, in turn, means that applications linking the shared libpython
7682# don't need to link LIBS explicitly. The default should be only changed
7683# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007684
Matthias Kloseb9621712010-04-24 17:59:49 +00007685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7686$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007687case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007688 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007689 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007690esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7692$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007693
7694
Guido van Rossum627b2d71993-12-24 10:39:16 +00007695# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7697$as_echo_n "checking for dlopen in -ldl... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00007698if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007699 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007700else
Martin v. Löwis11437992002-04-12 09:54:03 +00007701 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007702LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007703cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007704/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007705
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007706/* Override any GCC internal prototype to avoid an error.
7707 Use char because int might match the return type of a GCC
7708 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007709#ifdef __cplusplus
7710extern "C"
7711#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007712char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007713int
7714main ()
7715{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007716return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007717 ;
7718 return 0;
7719}
7720_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007721if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007722 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007723else
Matthias Kloseb9621712010-04-24 17:59:49 +00007724 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007725fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007726rm -f core conftest.err conftest.$ac_objext \
7727 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007728LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7731$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00007732if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007733 cat >>confdefs.h <<_ACEOF
7734#define HAVE_LIBDL 1
7735_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007736
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007737 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007738
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007739fi
7740 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7742$as_echo_n "checking for shl_load in -ldld... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00007743if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007744 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007745else
Martin v. Löwis11437992002-04-12 09:54:03 +00007746 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007747LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007749/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007750
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007751/* Override any GCC internal prototype to avoid an error.
7752 Use char because int might match the return type of a GCC
7753 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007754#ifdef __cplusplus
7755extern "C"
7756#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007757char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007758int
7759main ()
7760{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007761return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007762 ;
7763 return 0;
7764}
7765_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007766if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007767 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007768else
Matthias Kloseb9621712010-04-24 17:59:49 +00007769 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007771rm -f core conftest.err conftest.$ac_objext \
7772 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007773LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7776$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00007777if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007778 cat >>confdefs.h <<_ACEOF
7779#define HAVE_LIBDLD 1
7780_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007781
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007782 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007783
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007784fi
7785 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007786
Georg Brandlb1441c72009-01-03 22:33:39 +00007787# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007788if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7790$as_echo_n "checking for library containing sem_init... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00007791if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007792 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007793else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007794 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007796/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007797
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007798/* Override any GCC internal prototype to avoid an error.
7799 Use char because int might match the return type of a GCC
7800 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007801#ifdef __cplusplus
7802extern "C"
7803#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007804char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007805int
7806main ()
7807{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007808return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007809 ;
7810 return 0;
7811}
7812_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007813for ac_lib in '' pthread rt posix4; do
7814 if test -z "$ac_lib"; then
7815 ac_res="none required"
7816 else
7817 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007818 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007819 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007820 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007821 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007822fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007823rm -f core conftest.err conftest.$ac_objext \
7824 conftest$ac_exeext
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00007825 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007826 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007827fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007828done
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00007829if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007830
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007831else
7832 ac_cv_search_sem_init=no
7833fi
7834rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007835LIBS=$ac_func_search_save_LIBS
7836fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7838$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007839ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007840if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007841 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007842
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007843fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007844 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007845 # posix4 on Solaris 2.6
7846 # pthread (first!) on Linux
7847fi
7848
Martin v. Löwis19d17342003-06-14 21:03:05 +00007849# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7851$as_echo_n "checking for textdomain in -lintl... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00007852if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007853 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007854else
7855 ac_check_lib_save_LIBS=$LIBS
7856LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007858/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007859
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007860/* Override any GCC internal prototype to avoid an error.
7861 Use char because int might match the return type of a GCC
7862 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007863#ifdef __cplusplus
7864extern "C"
7865#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007866char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007867int
7868main ()
7869{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007870return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007871 ;
7872 return 0;
7873}
7874_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007875if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007876 ac_cv_lib_intl_textdomain=yes
7877else
Matthias Kloseb9621712010-04-24 17:59:49 +00007878 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007879fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007880rm -f core conftest.err conftest.$ac_objext \
7881 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007882LIBS=$ac_check_lib_save_LIBS
7883fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7885$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00007886if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007887
Matthias Kloseb9621712010-04-24 17:59:49 +00007888$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007889
Brett Cannonc6d936e2009-06-07 20:09:53 +00007890 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007891fi
7892
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007893
7894# checks for system dependent C++ extensions support
7895case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007896 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7897$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007899/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007900
Georg Brandl59e87bd2011-02-15 19:48:59 +00007901 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007902int
7903main ()
7904{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007905loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007906 ;
7907 return 0;
7908}
Matthias Kloseb159a552010-04-25 21:00:44 +00007909
Martin v. Löwis11437992002-04-12 09:54:03 +00007910_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007911if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007912
Matthias Kloseb159a552010-04-25 21:00:44 +00007913
Matthias Kloseb9621712010-04-24 17:59:49 +00007914$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007915
Matthias Kloseb159a552010-04-25 21:00:44 +00007916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007917$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007918
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007919else
Matthias Kloseb159a552010-04-25 21:00:44 +00007920
7921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007922$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007923
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007924fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007925rm -f core conftest.err conftest.$ac_objext \
7926 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007927 *) ;;
7928esac
7929
Guido van Rossum70c7f481998-03-26 18:44:10 +00007930# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7932$as_echo_n "checking for t_open in -lnsl... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00007933if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007934 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007935else
Martin v. Löwis11437992002-04-12 09:54:03 +00007936 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007937LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007939/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007940
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007941/* Override any GCC internal prototype to avoid an error.
7942 Use char because int might match the return type of a GCC
7943 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007944#ifdef __cplusplus
7945extern "C"
7946#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007947char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007948int
7949main ()
7950{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007951return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007952 ;
7953 return 0;
7954}
7955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007956if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007957 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007958else
Matthias Kloseb9621712010-04-24 17:59:49 +00007959 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007961rm -f core conftest.err conftest.$ac_objext \
7962 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007963LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007964fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
7966$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00007967if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007968 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007969fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00007970 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00007971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
7972$as_echo_n "checking for socket in -lsocket... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00007973if test "${ac_cv_lib_socket_socket+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007974 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007975else
Martin v. Löwis11437992002-04-12 09:54:03 +00007976 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007977LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007979/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007980
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007981/* Override any GCC internal prototype to avoid an error.
7982 Use char because int might match the return type of a GCC
7983 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007984#ifdef __cplusplus
7985extern "C"
7986#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007987char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007988int
7989main ()
7990{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007991return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007992 ;
7993 return 0;
7994}
7995_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007996if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007997 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007998else
Matthias Kloseb9621712010-04-24 17:59:49 +00007999 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008000fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008001rm -f core conftest.err conftest.$ac_objext \
8002 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008003LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008004fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8006$as_echo "$ac_cv_lib_socket_socket" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00008007if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008008 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008009fi
8010 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008011
Matthias Kloseb9621712010-04-24 17:59:49 +00008012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8013$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008014
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008015# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008016if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008017 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8019$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008020LIBS="$withval $LIBS"
8021
8022else
Matthias Kloseb9621712010-04-24 17:59:49 +00008023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8024$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008025fi
8026
Guido van Rossum7f43da71994-08-01 12:15:30 +00008027
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008028if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008029 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8030set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8032$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00008033if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008034 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008035else
8036 case $PKG_CONFIG in
8037 [\\/]* | ?:[\\/]*)
8038 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8039 ;;
8040 *)
8041 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8042for as_dir in $PATH
8043do
8044 IFS=$as_save_IFS
8045 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008046 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008047 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8048 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008049 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008050 break 2
8051 fi
8052done
Matthias Kloseb9621712010-04-24 17:59:49 +00008053 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008054IFS=$as_save_IFS
8055
8056 ;;
8057esac
8058fi
8059PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8060if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8062$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008063else
Matthias Kloseb9621712010-04-24 17:59:49 +00008064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8065$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008066fi
8067
8068
8069fi
8070if test -z "$ac_cv_path_PKG_CONFIG"; then
8071 ac_pt_PKG_CONFIG=$PKG_CONFIG
8072 # Extract the first word of "pkg-config", so it can be a program name with args.
8073set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8075$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00008076if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008077 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008078else
8079 case $ac_pt_PKG_CONFIG in
8080 [\\/]* | ?:[\\/]*)
8081 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8082 ;;
8083 *)
8084 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8085for as_dir in $PATH
8086do
8087 IFS=$as_save_IFS
8088 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008089 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008090 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8091 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008092 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008093 break 2
8094 fi
8095done
Matthias Kloseb9621712010-04-24 17:59:49 +00008096 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008097IFS=$as_save_IFS
8098
8099 ;;
8100esac
8101fi
8102ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8103if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8105$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008106else
Matthias Kloseb9621712010-04-24 17:59:49 +00008107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8108$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008109fi
8110
8111 if test "x$ac_pt_PKG_CONFIG" = x; then
8112 PKG_CONFIG=""
8113 else
8114 case $cross_compiling:$ac_tool_warned in
8115yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008116{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8117$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008118ac_tool_warned=yes ;;
8119esac
8120 PKG_CONFIG=$ac_pt_PKG_CONFIG
8121 fi
8122else
8123 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8124fi
8125
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008126
8127# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8129$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008130
8131# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008132if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008133 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008134else
8135 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008136fi
8137
8138
Matthias Kloseb9621712010-04-24 17:59:49 +00008139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8140$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008141
8142# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8144$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008145
8146# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008147if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008148 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008149else
8150 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008151fi
8152
8153
8154if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008155 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8156else
8157 LIBFFI_INCLUDEDIR=""
8158fi
8159
8160
Matthias Kloseb9621712010-04-24 17:59:49 +00008161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8162$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008163
Benjamin Peterson076ed002010-10-31 17:11:02 +00008164# Check for support for loadable sqlite extensions
8165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8166$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8167# Check whether --enable-loadable-sqlite-extensions was given.
8168if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8169 enableval=$enable_loadable_sqlite_extensions;
8170else
8171 enable_loadable_sqlite_extensions="no"
8172fi
8173
8174
8175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8176$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8177
Matthias Klose55708cc2009-04-30 08:06:49 +00008178# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8180$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008181
8182# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008183if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008184 withval=$with_dbmliborder;
8185if test x$with_dbmliborder = xyes
8186then
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00008187as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008188else
8189 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8190 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8191 then
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00008192 as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008193 fi
8194 done
8195fi
8196fi
8197
Matthias Kloseb9621712010-04-24 17:59:49 +00008198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8199$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008200
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008201# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008202
8203
Matthias Kloseb9621712010-04-24 17:59:49 +00008204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8205$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008206
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008207# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008208if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008209 withval=$with_signal_module;
8210fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008211
8212
8213if test -z "$with_signal_module"
8214then with_signal_module="yes"
8215fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8217$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008218
8219if test "${with_signal_module}" = "yes"; then
8220 USE_SIGNAL_MODULE=""
8221 SIGNAL_OBJS=""
8222else
8223 USE_SIGNAL_MODULE="#"
8224 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8225fi
8226
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008227# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008228
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008229USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008230
Matthias Kloseb9621712010-04-24 17:59:49 +00008231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8232$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008233
Guido van Rossumec2f0731997-01-22 20:54:01 +00008234
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008235# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008236if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008237 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8239$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008240LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008241if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008242 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008243fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008244else
Matthias Kloseb9621712010-04-24 17:59:49 +00008245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8246$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008247fi
8248
Martin v. Löwis11437992002-04-12 09:54:03 +00008249
8250# Templates for things AC_DEFINEd more than once.
8251# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008252
8253
Martin v. Löwis11437992002-04-12 09:54:03 +00008254
8255
Matthias Kloseb9621712010-04-24 17:59:49 +00008256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8257$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008258
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008259# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008260if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008261 withval=$with_threads;
8262fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008263
8264
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008265# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008266
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008267# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008268if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008269 withval=$with_thread; with_threads=$with_thread
8270fi
8271
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008272
8273if test -z "$with_threads"
8274then with_threads="yes"
8275fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8277$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008278
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008279
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008280if test "$with_threads" = "no"
8281then
8282 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008283elif test "$ac_cv_pthread_is_default" = yes
8284then
Matthias Kloseb9621712010-04-24 17:59:49 +00008285 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008286
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008287 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008288 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008289
8290 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008291 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008292elif test "$ac_cv_kpthread" = "yes"
8293then
8294 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008295 if test "$ac_cv_cxx_thread" = "yes"; then
8296 CXX="$CXX -Kpthread"
8297 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008298 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008299
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008300 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008301 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008302elif test "$ac_cv_kthread" = "yes"
8303then
8304 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008305 if test "$ac_cv_cxx_thread" = "yes"; then
8306 CXX="$CXX -Kthread"
8307 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008308 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008309
8310 posix_threads=yes
8311 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008312elif test "$ac_cv_pthread" = "yes"
8313then
8314 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008315 if test "$ac_cv_cxx_thread" = "yes"; then
8316 CXX="$CXX -pthread"
8317 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008318 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008319
8320 posix_threads=yes
8321 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008322else
8323 if test ! -z "$with_threads" -a -d "$with_threads"
8324 then LDFLAGS="$LDFLAGS -L$with_threads"
8325 fi
8326 if test ! -z "$withval" -a -d "$withval"
8327 then LDFLAGS="$LDFLAGS -L$withval"
8328 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008329
8330 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008331 # define _POSIX_THREADS in unistd.h. Some apparently don't
8332 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8334$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008336/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008337
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008338#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008339#ifdef _POSIX_THREADS
8340yes
8341#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008342
8343_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008344if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008345 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008346 unistd_defines_pthreads=yes
8347else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008348 unistd_defines_pthreads=no
8349fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008350rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008351
Matthias Kloseb9621712010-04-24 17:59:49 +00008352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8353$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008354
Matthias Kloseb9621712010-04-24 17:59:49 +00008355 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008356
Matthias Kloseb9621712010-04-24 17:59:49 +00008357 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00008358if test "x$ac_cv_header_cthreads_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008359 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008360
Matthias Kloseb9621712010-04-24 17:59:49 +00008361 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008362
Martin v. Löwis11437992002-04-12 09:54:03 +00008363
Matthias Kloseb9621712010-04-24 17:59:49 +00008364$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008365
8366 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008367 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008368else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008369
Matthias Kloseb9621712010-04-24 17:59:49 +00008370 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00008371if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008372 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008373
Matthias Kloseb9621712010-04-24 17:59:49 +00008374 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008375
Martin v. Löwis11437992002-04-12 09:54:03 +00008376
Matthias Kloseb9621712010-04-24 17:59:49 +00008377$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008378
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008379 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008380else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008381
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008382 # Just looking for pthread_create in libpthread is not enough:
8383 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8384 # So we really have to include pthread.h, and then link.
8385 _libs=$LIBS
8386 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8388$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008390/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008391#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008392
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008393void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008394int
8395main ()
8396{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008397
8398pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008399 ;
8400 return 0;
8401}
8402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008403if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008404
Matthias Kloseb9621712010-04-24 17:59:49 +00008405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8406$as_echo "yes" >&6; }
8407 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008408
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008409 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008410 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008411else
Martin v. Löwis11437992002-04-12 09:54:03 +00008412
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008413 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008414 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00008415if test "x$ac_cv_func_pthread_detach" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008416 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008417
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008418 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008419 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008420else
Guido van Rossumad678af1998-10-02 14:42:15 +00008421
Matthias Kloseb9621712010-04-24 17:59:49 +00008422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8423$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00008424if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008425 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008426else
Martin v. Löwis11437992002-04-12 09:54:03 +00008427 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008428LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008429cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008430/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008431
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008432/* Override any GCC internal prototype to avoid an error.
8433 Use char because int might match the return type of a GCC
8434 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008435#ifdef __cplusplus
8436extern "C"
8437#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008438char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008439int
8440main ()
8441{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008442return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008443 ;
8444 return 0;
8445}
8446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008447if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008448 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008449else
Matthias Kloseb9621712010-04-24 17:59:49 +00008450 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008451fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008452rm -f core conftest.err conftest.$ac_objext \
8453 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008454LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008455fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8457$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00008458if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008459 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008460
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008461 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008462 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008463 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008464else
Greg Steinadf63d62000-07-05 10:38:09 +00008465
Matthias Kloseb9621712010-04-24 17:59:49 +00008466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8467$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00008468if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008469 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008470else
Martin v. Löwis11437992002-04-12 09:54:03 +00008471 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008472LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008473cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008474/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008475
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008476/* Override any GCC internal prototype to avoid an error.
8477 Use char because int might match the return type of a GCC
8478 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008479#ifdef __cplusplus
8480extern "C"
8481#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008482char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008483int
8484main ()
8485{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008486return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008487 ;
8488 return 0;
8489}
8490_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008491if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008492 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008493else
Matthias Kloseb9621712010-04-24 17:59:49 +00008494 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008495fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008496rm -f core conftest.err conftest.$ac_objext \
8497 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008498LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008499fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8501$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00008502if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008503 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008504
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008505 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008506 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008507 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008508else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008509
Matthias Kloseb9621712010-04-24 17:59:49 +00008510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8511$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00008512if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008513 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008514else
Martin v. Löwis11437992002-04-12 09:54:03 +00008515 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008516LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008518/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008519
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008520/* Override any GCC internal prototype to avoid an error.
8521 Use char because int might match the return type of a GCC
8522 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008523#ifdef __cplusplus
8524extern "C"
8525#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008526char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008527int
8528main ()
8529{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008530return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008531 ;
8532 return 0;
8533}
8534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008535if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008536 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008537else
Matthias Kloseb9621712010-04-24 17:59:49 +00008538 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008539fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008540rm -f core conftest.err conftest.$ac_objext \
8541 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008542LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008543fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8545$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00008546if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008547 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008548
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008549 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008550 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008551 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008552else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008553
Matthias Kloseb9621712010-04-24 17:59:49 +00008554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8555$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00008556if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008557 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008558else
Martin v. Löwis11437992002-04-12 09:54:03 +00008559 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008560LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008562/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008563
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008564/* Override any GCC internal prototype to avoid an error.
8565 Use char because int might match the return type of a GCC
8566 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008567#ifdef __cplusplus
8568extern "C"
8569#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008570char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008571int
8572main ()
8573{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008574return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008575 ;
8576 return 0;
8577}
8578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008579if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008580 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008581else
Matthias Kloseb9621712010-04-24 17:59:49 +00008582 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008584rm -f core conftest.err conftest.$ac_objext \
8585 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008586LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008587fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8589$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00008590if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008591 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008592
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008593 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008594 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008595 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008596else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008597
Martin v. Löwis130fb172001-07-19 11:00:41 +00008598 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008599fi
8600
Guido van Rossum627b2d71993-12-24 10:39:16 +00008601
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008602fi
8603
Guido van Rossum0be3e491997-05-22 20:33:33 +00008604fi
8605
Guido van Rossum49545951997-12-02 19:28:29 +00008606fi
8607
Guido van Rossumb93a8621998-05-07 13:27:32 +00008608fi
8609
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008610fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008611rm -f core conftest.err conftest.$ac_objext \
8612 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008613fi
8614
Martin v. Löwis11437992002-04-12 09:54:03 +00008615
8616fi
8617
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008618
Michael W. Hudson54241132001-12-07 15:38:26 +00008619
Matthias Kloseb9621712010-04-24 17:59:49 +00008620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8621$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00008622if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008623 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008624else
Martin v. Löwis11437992002-04-12 09:54:03 +00008625 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008626LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008628/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008629
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008630/* Override any GCC internal prototype to avoid an error.
8631 Use char because int might match the return type of a GCC
8632 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008633#ifdef __cplusplus
8634extern "C"
8635#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008636char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008637int
8638main ()
8639{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008640return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008641 ;
8642 return 0;
8643}
8644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008645if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008646 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008647else
Matthias Kloseb9621712010-04-24 17:59:49 +00008648 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008649fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008650rm -f core conftest.err conftest.$ac_objext \
8651 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008652LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8655$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00008656if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008657 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008658
Martin v. Löwis130fb172001-07-19 11:00:41 +00008659 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008660 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008661 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008662fi
8663
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008664
Neal Norwitza978ab02002-11-02 16:58:05 +00008665 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8667$as_echo_n "checking for thr_create in -lthread... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00008668if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008669 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008670else
Martin v. Löwis11437992002-04-12 09:54:03 +00008671 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008672LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008674/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008675
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008676/* Override any GCC internal prototype to avoid an error.
8677 Use char because int might match the return type of a GCC
8678 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008679#ifdef __cplusplus
8680extern "C"
8681#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008682char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008683int
8684main ()
8685{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008686return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008687 ;
8688 return 0;
8689}
8690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008691if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008692 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008693else
Matthias Kloseb9621712010-04-24 17:59:49 +00008694 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008696rm -f core conftest.err conftest.$ac_objext \
8697 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008698LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008699fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8701$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00008702if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008703 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008704
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008705 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008706 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008707 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008708fi
8709
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008710 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008711
Martin v. Löwis130fb172001-07-19 11:00:41 +00008712 if test "$USE_THREAD_MODULE" != "#"
8713 then
8714 # If the above checks didn't disable threads, (at least) OSF1
8715 # needs this '-threads' argument during linking.
8716 case $ac_sys_system in
8717 OSF1) LDLAST=-threads;;
8718 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008719 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008720fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008721
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008722if test "$posix_threads" = "yes"; then
8723 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008724
Matthias Kloseb9621712010-04-24 17:59:49 +00008725$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008726
8727 fi
8728
8729 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8730 case $ac_sys_system/$ac_sys_release in
8731 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008732$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008733
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008734 ;;
8735 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008736$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008737
8738 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008739 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008740$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008741
8742 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008743 AIX/6)
8744$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8745
8746 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008747 esac
8748
Matthias Kloseb9621712010-04-24 17:59:49 +00008749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8750$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00008751 if test "${ac_cv_pthread_system_supported+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008752 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008753else
Matthias Kloseb9621712010-04-24 17:59:49 +00008754 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008755 ac_cv_pthread_system_supported=no
8756else
Matthias Kloseb9621712010-04-24 17:59:49 +00008757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008758/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008759#include <pthread.h>
8760 void *foo(void *parm) {
8761 return NULL;
8762 }
8763 main() {
8764 pthread_attr_t attr;
8765 pthread_t id;
8766 if (pthread_attr_init(&attr)) exit(-1);
8767 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8768 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8769 exit(0);
8770 }
8771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008772if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008773 ac_cv_pthread_system_supported=yes
8774else
Matthias Kloseb9621712010-04-24 17:59:49 +00008775 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8778 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008779fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008780
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008781
Guido van Rossum627b2d71993-12-24 10:39:16 +00008782fi
8783
Matthias Kloseb9621712010-04-24 17:59:49 +00008784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8785$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008786 if test "$ac_cv_pthread_system_supported" = "yes"; then
8787
Matthias Kloseb9621712010-04-24 17:59:49 +00008788$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008789
8790 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008791 for ac_func in pthread_sigmask
8792do :
8793 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00008794if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008795 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008796#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008797_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008798 case $ac_sys_system in
8799 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008800
Matthias Kloseb9621712010-04-24 17:59:49 +00008801$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008802
8803 ;;
8804 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008805fi
8806done
8807
8808fi
8809
8810
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008811# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008812
Matthias Kloseb9621712010-04-24 17:59:49 +00008813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8814$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008815# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008816if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008817 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008818 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8820$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008821 ipv6=no
8822 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008823 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8824$as_echo "yes" >&6; }
8825 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008826
8827 ipv6=yes
8828 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008829 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008830else
Martin v. Löwis11437992002-04-12 09:54:03 +00008831
Matthias Kloseb9621712010-04-24 17:59:49 +00008832 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008833
Matthias Kloseb9621712010-04-24 17:59:49 +00008834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8835$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008836 ipv6=no
8837
8838else
Matthias Kloseb9621712010-04-24 17:59:49 +00008839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008840/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008841 /* AF_INET6 available check */
8842#include <sys/types.h>
8843#include <sys/socket.h>
8844main()
8845{
8846 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8847 exit(1);
8848 else
8849 exit(0);
8850}
8851
Martin v. Löwis11437992002-04-12 09:54:03 +00008852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008853if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008854
Matthias Kloseb9621712010-04-24 17:59:49 +00008855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8856$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008857 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008858
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008859else
Matthias Kloseb159a552010-04-25 21:00:44 +00008860
Matthias Kloseb9621712010-04-24 17:59:49 +00008861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8862$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008863 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008864
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008865fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008866rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8867 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008868fi
8869
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008870
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008871if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8873$as_echo_n "checking if RFC2553 API is available... " >&6; }
8874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008875/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008876
8877 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008878#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008879int
8880main ()
8881{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008882struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008883 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008884 ;
8885 return 0;
8886}
Matthias Kloseb159a552010-04-25 21:00:44 +00008887
Martin v. Löwis11437992002-04-12 09:54:03 +00008888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008889if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008890
8891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008892$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008893 ipv6=yes
8894
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008895else
Matthias Kloseb159a552010-04-25 21:00:44 +00008896
8897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008898$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008899 ipv6=no
8900
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008901fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008903fi
8904
8905if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008906 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008907
8908fi
8909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008910fi
8911
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008912
8913ipv6type=unknown
8914ipv6lib=none
8915ipv6trylibc=no
8916
8917if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8919$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008920 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8921 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008922 case $i in
8923 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008925/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008926
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008927#include <netinet/in.h>
8928#ifdef IPV6_INRIA_VERSION
8929yes
8930#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008931_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008932if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008933 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008934 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008935fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008936rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008937
8938 ;;
8939 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008941/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008942
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008943#include <netinet/in.h>
8944#ifdef __KAME__
8945yes
8946#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008947_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008948if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008949 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008950 ipv6type=$i;
8951 ipv6lib=inet6
8952 ipv6libdir=/usr/local/v6/lib
8953 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008954fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008955rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008956
8957 ;;
8958 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008960/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008961
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008962#include <features.h>
8963#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
8964yes
8965#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008966_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008967if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008968 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008969 ipv6type=$i;
8970 ipv6trylibc=yes
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 linux-inet6)
8976 if test -d /usr/inet6; then
8977 ipv6type=$i
8978 ipv6lib=inet6
8979 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00008980 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008981 fi
8982 ;;
8983 solaris)
8984 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00008985 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008986 ipv6type=$i
8987 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008988 fi
8989 fi
8990 ;;
8991 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00008992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008993/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008994
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008995#include <sys/param.h>
8996#ifdef _TOSHIBA_INET6
8997yes
8998#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008999_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009000if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009001 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009002 ipv6type=$i;
9003 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009004 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009005fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009006rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009007
9008 ;;
9009 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009011/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009012
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009013#include </usr/local/v6/include/sys/v6config.h>
9014#ifdef __V6D__
9015yes
9016#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009017_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009018if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009019 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009020 ipv6type=$i;
9021 ipv6lib=v6;
9022 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009023 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009024fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009025rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009026
9027 ;;
9028 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009030/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009031
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009032#include <sys/param.h>
9033#ifdef _ZETA_MINAMI_INET6
9034yes
9035#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009036_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009037if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009038 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009039 ipv6type=$i;
9040 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009041 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009042fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009043rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009044
9045 ;;
9046 esac
9047 if test "$ipv6type" != "unknown"; then
9048 break
9049 fi
9050 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9052$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009053fi
9054
9055if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9056 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9057 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9058 echo "using lib$ipv6lib"
9059 else
9060 if test $ipv6trylibc = "yes"; then
9061 echo "using libc"
9062 else
9063 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9064 echo "You need to fetch lib$ipv6lib.a from appropriate"
9065 echo 'ipv6 kit and compile beforehand.'
9066 exit 1
9067 fi
9068 fi
9069fi
9070
Matthias Kloseb9621712010-04-24 17:59:49 +00009071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9072$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009074/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009075
9076 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009077int
9078main ()
9079{
9080FSIORefNum fRef = 0
9081 ;
9082 return 0;
9083}
Matthias Kloseb159a552010-04-25 21:00:44 +00009084
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009086if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009087
Matthias Kloseb159a552010-04-25 21:00:44 +00009088
Matthias Kloseb9621712010-04-24 17:59:49 +00009089$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009090
Matthias Kloseb9621712010-04-24 17:59:49 +00009091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9092$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009093
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009094else
Matthias Kloseb159a552010-04-25 21:00:44 +00009095
Matthias Kloseb9621712010-04-24 17:59:49 +00009096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9097$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009098
9099fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9101
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009102# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9104$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009105
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009106# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009107if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009108 withval=$with_doc_strings;
9109fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009110
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009111
9112if test -z "$with_doc_strings"
9113then with_doc_strings="yes"
9114fi
9115if test "$with_doc_strings" != "no"
9116then
9117
Matthias Kloseb9621712010-04-24 17:59:49 +00009118$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009119
9120fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9122$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009123
Antoine Pitrou042b1282010-08-13 21:15:58 +00009124# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9126$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009127
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009128# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009129if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009130 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009131if test "$withval" != no
9132then
9133
Matthias Kloseb9621712010-04-24 17:59:49 +00009134$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009135
Matthias Kloseb9621712010-04-24 17:59:49 +00009136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9137$as_echo "yes" >&6; }
9138else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9139$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009140fi
9141else
Matthias Kloseb9621712010-04-24 17:59:49 +00009142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9143$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009144fi
9145
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009146
9147# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9149$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009150
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009151# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009152if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009153 withval=$with_pymalloc;
9154fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009155
Neil Schemenauera35c6882001-02-27 04:45:05 +00009156
Neil Schemenauer16c22972002-03-22 15:34:49 +00009157if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009158then
9159 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009160 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009161fi
9162if test "$with_pymalloc" != "no"
9163then
Martin v. Löwis11437992002-04-12 09:54:03 +00009164
Matthias Kloseb9621712010-04-24 17:59:49 +00009165$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009166
9167fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9169$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009170
Benjamin Peterson05159c42009-12-03 03:01:27 +00009171# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9173$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009174
9175# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009176if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009177 withval=$with_valgrind;
9178else
9179 with_valgrind=no
9180fi
9181
Matthias Kloseb9621712010-04-24 17:59:49 +00009182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9183$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009184if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009185 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00009186if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009187
Matthias Kloseb9621712010-04-24 17:59:49 +00009188$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009189
9190else
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00009191 as_fn_error "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009192
9193fi
9194
9195
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009196 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009197fi
9198
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009199# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009200
Guido van Rossum98935bf2001-09-05 19:13:16 +00009201DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009202
Guido van Rossume97ee181999-12-20 21:27:22 +00009203# the dlopen() function means we might want to use dynload_shlib.o. some
9204# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009205for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009206do :
9207 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00009208if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009209 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009210#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009211_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009212
Guido van Rossume97ee181999-12-20 21:27:22 +00009213fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009214done
Guido van Rossume97ee181999-12-20 21:27:22 +00009215
Michael W. Hudson54241132001-12-07 15:38:26 +00009216
Guido van Rossume97ee181999-12-20 21:27:22 +00009217# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9218# loading of modules.
9219
Matthias Kloseb9621712010-04-24 17:59:49 +00009220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9221$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009222if test -z "$DYNLOADFILE"
9223then
9224 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009225 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9226 if test "$ac_cv_func_dlopen" = yes
9227 then DYNLOADFILE="dynload_shlib.o"
9228 else DYNLOADFILE="dynload_aix.o"
9229 fi
9230 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009231 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009232 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9233 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009234 *)
9235 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9236 # out any dynamic loading
9237 if test "$ac_cv_func_dlopen" = yes
9238 then DYNLOADFILE="dynload_shlib.o"
9239 else DYNLOADFILE="dynload_stub.o"
9240 fi
9241 ;;
9242 esac
9243fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9245$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009246if test "$DYNLOADFILE" != "dynload_stub.o"
9247then
Martin v. Löwis11437992002-04-12 09:54:03 +00009248
Matthias Kloseb9621712010-04-24 17:59:49 +00009249$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009250
9251fi
9252
Neil Schemenauer4e425612001-06-19 15:44:15 +00009253# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9254
Michael W. Hudson54241132001-12-07 15:38:26 +00009255
Matthias Kloseb9621712010-04-24 17:59:49 +00009256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9257$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009258if test -z "$MACHDEP_OBJS"
9259then
Jack Jansene578a632001-08-15 01:27:14 +00009260 MACHDEP_OBJS=$extra_machdep_objs
9261else
9262 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009263fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9265$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009266
Guido van Rossum627b2d71993-12-24 10:39:16 +00009267# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009268for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Martin v. Löwis823725e2008-03-24 13:39:54 +00009269 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009270 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009271 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009272 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009273 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009274 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009275 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9276 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009277 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009278 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009279 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009280 truncate uname unsetenv utimes waitpid wait3 wait4 \
9281 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009282do :
9283 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9284ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00009285eval as_val=\$$as_ac_var
9286 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009287 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009288#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009289_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009290
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009291fi
9292done
9293
Michael W. Hudson54241132001-12-07 15:38:26 +00009294
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009295# For some functions, having a definition is not sufficient, since
9296# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9298$as_echo_n "checking for chroot... " >&6; }
9299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009300/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009301#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009302int
9303main ()
9304{
9305void *x=chroot
9306 ;
9307 return 0;
9308}
9309_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009310if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009311
Matthias Kloseb9621712010-04-24 17:59:49 +00009312$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009313
Matthias Kloseb159a552010-04-25 21:00:44 +00009314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009315$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009316else
Matthias Kloseb9621712010-04-24 17:59:49 +00009317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9318$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009319
9320fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9323$as_echo_n "checking for link... " >&6; }
9324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009325/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009326#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009327int
9328main ()
9329{
9330void *x=link
9331 ;
9332 return 0;
9333}
9334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009335if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009336
Matthias Kloseb9621712010-04-24 17:59:49 +00009337$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009338
Matthias Kloseb159a552010-04-25 21:00:44 +00009339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009340$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009341else
Matthias Kloseb9621712010-04-24 17:59:49 +00009342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9343$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009344
9345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9348$as_echo_n "checking for symlink... " >&6; }
9349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009350/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009351#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009352int
9353main ()
9354{
9355void *x=symlink
9356 ;
9357 return 0;
9358}
9359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009360if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009361
Matthias Kloseb9621712010-04-24 17:59:49 +00009362$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009363
Matthias Kloseb159a552010-04-25 21:00:44 +00009364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009365$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009366else
Matthias Kloseb9621712010-04-24 17:59:49 +00009367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9368$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009369
9370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9373$as_echo_n "checking for fchdir... " >&6; }
9374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009375/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009376#include <unistd.h>
9377int
9378main ()
9379{
9380void *x=fchdir
9381 ;
9382 return 0;
9383}
9384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009385if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009386
Matthias Kloseb9621712010-04-24 17:59:49 +00009387$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009388
Matthias Kloseb159a552010-04-25 21:00:44 +00009389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009390$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009391else
Matthias Kloseb9621712010-04-24 17:59:49 +00009392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9393$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009394
9395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9398$as_echo_n "checking for fsync... " >&6; }
9399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009400/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009401#include <unistd.h>
9402int
9403main ()
9404{
9405void *x=fsync
9406 ;
9407 return 0;
9408}
9409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009410if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009411
Matthias Kloseb9621712010-04-24 17:59:49 +00009412$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009413
Matthias Kloseb159a552010-04-25 21:00:44 +00009414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009415$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009416else
Matthias Kloseb9621712010-04-24 17:59:49 +00009417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9418$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009419
9420fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9423$as_echo_n "checking for fdatasync... " >&6; }
9424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009425/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009426#include <unistd.h>
9427int
9428main ()
9429{
9430void *x=fdatasync
9431 ;
9432 return 0;
9433}
9434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009435if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009436
Matthias Kloseb9621712010-04-24 17:59:49 +00009437$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009438
Matthias Kloseb159a552010-04-25 21:00:44 +00009439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009440$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009441else
Matthias Kloseb9621712010-04-24 17:59:49 +00009442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9443$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009444
9445fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9448$as_echo_n "checking for epoll... " >&6; }
9449cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009450/* end confdefs.h. */
9451#include <sys/epoll.h>
9452int
9453main ()
9454{
9455void *x=epoll_create
9456 ;
9457 return 0;
9458}
9459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009460if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009461
Matthias Kloseb9621712010-04-24 17:59:49 +00009462$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009463
Matthias Kloseb159a552010-04-25 21:00:44 +00009464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009465$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009466else
Matthias Kloseb9621712010-04-24 17:59:49 +00009467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9468$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009469
9470fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9473$as_echo_n "checking for kqueue... " >&6; }
9474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009475/* end confdefs.h. */
9476
9477#include <sys/types.h>
9478#include <sys/event.h>
9479
9480int
9481main ()
9482{
9483int x=kqueue()
9484 ;
9485 return 0;
9486}
9487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009488if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009489
Matthias Kloseb9621712010-04-24 17:59:49 +00009490$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009491
Matthias Kloseb159a552010-04-25 21:00:44 +00009492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009493$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009494else
Matthias Kloseb9621712010-04-24 17:59:49 +00009495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9496$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009497
9498fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009500# On some systems (eg. FreeBSD 5), we would find a definition of the
9501# functions ctermid_r, setgroups in the library, but no prototype
9502# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9503# address to avoid compiler warnings and potential miscompilations
9504# because of the missing prototypes.
9505
Matthias Kloseb9621712010-04-24 17:59:49 +00009506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9507$as_echo_n "checking for ctermid_r... " >&6; }
9508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009509/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009510
Martin v. Löwisd5843682002-11-21 20:41:28 +00009511#include <stdio.h>
9512
Martin v. Löwisd5843682002-11-21 20:41:28 +00009513int
9514main ()
9515{
9516void* p = ctermid_r
9517 ;
9518 return 0;
9519}
9520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009521if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009522
Matthias Kloseb9621712010-04-24 17:59:49 +00009523$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009524
Matthias Kloseb159a552010-04-25 21:00:44 +00009525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009526$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009527else
Matthias Kloseb9621712010-04-24 17:59:49 +00009528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9529$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009530
9531fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9533
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9535$as_echo_n "checking for flock declaration... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00009536if test "${ac_cv_flock_decl+set}" = set; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009537 $as_echo_n "(cached) " >&6
9538else
9539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009540/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009541#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009542int
9543main ()
9544{
9545void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009546
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009547 ;
9548 return 0;
9549}
9550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009551if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009552 ac_cv_flock_decl=yes
9553else
9554 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009555
9556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009558
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009559fi
9560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9561$as_echo "$ac_cv_flock_decl" >&6; }
9562if test "x${ac_cv_flock_decl}" = xyes; then
9563 for ac_func in flock
9564do :
9565 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00009566if test "x$ac_cv_func_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009567 cat >>confdefs.h <<_ACEOF
9568#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009569_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009570
Antoine Pitroua3000072010-09-07 14:52:42 +00009571else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009573$as_echo_n "checking for flock in -lbsd... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00009574if test "${ac_cv_lib_bsd_flock+set}" = set; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009575 $as_echo_n "(cached) " >&6
9576else
9577 ac_check_lib_save_LIBS=$LIBS
9578LIBS="-lbsd $LIBS"
9579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9580/* end confdefs.h. */
9581
9582/* Override any GCC internal prototype to avoid an error.
9583 Use char because int might match the return type of a GCC
9584 builtin and then its argument prototype would still apply. */
9585#ifdef __cplusplus
9586extern "C"
9587#endif
9588char flock ();
9589int
9590main ()
9591{
9592return flock ();
9593 ;
9594 return 0;
9595}
9596_ACEOF
9597if ac_fn_c_try_link "$LINENO"; then :
9598 ac_cv_lib_bsd_flock=yes
9599else
9600 ac_cv_lib_bsd_flock=no
9601fi
9602rm -f core conftest.err conftest.$ac_objext \
9603 conftest$ac_exeext conftest.$ac_ext
9604LIBS=$ac_check_lib_save_LIBS
9605fi
9606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9607$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00009608if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009609 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009610
9611
9612$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9613
9614
9615fi
9616
9617
9618fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009619done
9620
Antoine Pitroua3000072010-09-07 14:52:42 +00009621fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009622
Matthias Kloseb9621712010-04-24 17:59:49 +00009623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9624$as_echo_n "checking for getpagesize... " >&6; }
9625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009626/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009627
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009628#include <unistd.h>
9629
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009630int
9631main ()
9632{
9633void* p = getpagesize
9634 ;
9635 return 0;
9636}
9637_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009638if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009639
Matthias Kloseb9621712010-04-24 17:59:49 +00009640$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009641
Matthias Kloseb159a552010-04-25 21:00:44 +00009642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009643$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009644else
Matthias Kloseb9621712010-04-24 17:59:49 +00009645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9646$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009647
9648fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009650
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009651for ac_prog in true
9652do
9653 # Extract the first word of "$ac_prog", so it can be a program name with args.
9654set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9656$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00009657if test "${ac_cv_prog_TRUE+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009658 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009659else
9660 if test -n "$TRUE"; then
9661 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9662else
9663as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9664for as_dir in $PATH
9665do
9666 IFS=$as_save_IFS
9667 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009668 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009669 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 +00009670 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009671 $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 +00009672 break 2
9673 fi
9674done
Matthias Kloseb9621712010-04-24 17:59:49 +00009675 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009676IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009677
9678fi
9679fi
9680TRUE=$ac_cv_prog_TRUE
9681if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9683$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009684else
Matthias Kloseb9621712010-04-24 17:59:49 +00009685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9686$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009687fi
9688
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009689
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009690 test -n "$TRUE" && break
9691done
9692test -n "$TRUE" || TRUE="/bin/true"
9693
9694
Matthias Kloseb9621712010-04-24 17:59:49 +00009695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9696$as_echo_n "checking for inet_aton in -lc... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00009697if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009698 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009699else
9700 ac_check_lib_save_LIBS=$LIBS
9701LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009703/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009704
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009705/* Override any GCC internal prototype to avoid an error.
9706 Use char because int might match the return type of a GCC
9707 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009708#ifdef __cplusplus
9709extern "C"
9710#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009711char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009712int
9713main ()
9714{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009715return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009716 ;
9717 return 0;
9718}
9719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009720if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009721 ac_cv_lib_c_inet_aton=yes
9722else
Matthias Kloseb9621712010-04-24 17:59:49 +00009723 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009724fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009725rm -f core conftest.err conftest.$ac_objext \
9726 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009727LIBS=$ac_check_lib_save_LIBS
9728fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9730$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00009731if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009732 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009733else
Matthias Kloseb9621712010-04-24 17:59:49 +00009734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9735$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00009736if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009737 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009738else
9739 ac_check_lib_save_LIBS=$LIBS
9740LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009742/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009743
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009744/* Override any GCC internal prototype to avoid an error.
9745 Use char because int might match the return type of a GCC
9746 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009747#ifdef __cplusplus
9748extern "C"
9749#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009750char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009751int
9752main ()
9753{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009754return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009755 ;
9756 return 0;
9757}
9758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009759if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009760 ac_cv_lib_resolv_inet_aton=yes
9761else
Matthias Kloseb9621712010-04-24 17:59:49 +00009762 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009763fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009764rm -f core conftest.err conftest.$ac_objext \
9765 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009766LIBS=$ac_check_lib_save_LIBS
9767fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9769$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00009770if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009771 cat >>confdefs.h <<_ACEOF
9772#define HAVE_LIBRESOLV 1
9773_ACEOF
9774
9775 LIBS="-lresolv $LIBS"
9776
9777fi
9778
9779
9780fi
9781
9782
Christian Heimesd0764e22007-12-04 15:00:33 +00009783# On Tru64, chflags seems to be present, but calling it will
9784# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9786$as_echo_n "checking for chflags... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00009787if test "${ac_cv_have_chflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009788 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009789else
Matthias Kloseb9621712010-04-24 17:59:49 +00009790 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009791 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009792else
Matthias Kloseb9621712010-04-24 17:59:49 +00009793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009794/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009795[
Christian Heimesd0764e22007-12-04 15:00:33 +00009796#include <sys/stat.h>
9797#include <unistd.h>
9798int main(int argc, char*argv[])
9799{
9800 if(chflags(argv[0], 0) != 0)
9801 return 1;
9802 return 0;
9803}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009804]
Christian Heimesd0764e22007-12-04 15:00:33 +00009805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009806if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009807 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009808else
Matthias Kloseb9621712010-04-24 17:59:49 +00009809 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009811rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9812 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009813fi
9814
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009815
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009816fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9818$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009819if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009820 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00009821if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009822 ac_cv_have_chflags="yes"
9823else
9824 ac_cv_have_chflags="no"
9825fi
9826
9827fi
9828if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009829
Matthias Kloseb9621712010-04-24 17:59:49 +00009830$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009831
9832fi
9833
Matthias Kloseb9621712010-04-24 17:59:49 +00009834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9835$as_echo_n "checking for lchflags... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00009836if test "${ac_cv_have_lchflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009837 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009838else
Matthias Kloseb9621712010-04-24 17:59:49 +00009839 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009840 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009841else
Matthias Kloseb9621712010-04-24 17:59:49 +00009842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009843/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009844[
Christian Heimesd0764e22007-12-04 15:00:33 +00009845#include <sys/stat.h>
9846#include <unistd.h>
9847int main(int argc, char*argv[])
9848{
9849 if(lchflags(argv[0], 0) != 0)
9850 return 1;
9851 return 0;
9852}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009853]
Christian Heimesd0764e22007-12-04 15:00:33 +00009854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009855if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009856 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009857else
Matthias Kloseb9621712010-04-24 17:59:49 +00009858 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009860rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9861 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009862fi
9863
9864
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009865fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9867$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009868if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009869 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00009870if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009871 ac_cv_have_lchflags="yes"
9872else
9873 ac_cv_have_lchflags="no"
9874fi
9875
9876fi
9877if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009878
Matthias Kloseb9621712010-04-24 17:59:49 +00009879$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009880
9881fi
9882
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009883case $ac_sys_system/$ac_sys_release in
9884Darwin/*)
9885 _CUR_CFLAGS="${CFLAGS}"
9886 _CUR_LDFLAGS="${LDFLAGS}"
9887 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9888 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9889 ;;
9890esac
9891
Matthias Kloseb9621712010-04-24 17:59:49 +00009892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9893$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00009894if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009895 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009896else
9897 ac_check_lib_save_LIBS=$LIBS
9898LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009900/* end confdefs.h. */
9901
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009902/* Override any GCC internal prototype to avoid an error.
9903 Use char because int might match the return type of a GCC
9904 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009905#ifdef __cplusplus
9906extern "C"
9907#endif
9908char inflateCopy ();
9909int
9910main ()
9911{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009912return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009913 ;
9914 return 0;
9915}
9916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009917if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009918 ac_cv_lib_z_inflateCopy=yes
9919else
Matthias Kloseb9621712010-04-24 17:59:49 +00009920 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009921fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009922rm -f core conftest.err conftest.$ac_objext \
9923 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009924LIBS=$ac_check_lib_save_LIBS
9925fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9927$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +00009928if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009929
Matthias Kloseb9621712010-04-24 17:59:49 +00009930$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009931
9932fi
9933
9934
9935case $ac_sys_system/$ac_sys_release in
9936Darwin/*)
9937 CFLAGS="${_CUR_CFLAGS}"
9938 LDFLAGS="${_CUR_LDFLAGS}"
9939 ;;
9940esac
9941
Matthias Kloseb9621712010-04-24 17:59:49 +00009942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9943$as_echo_n "checking for hstrerror... " >&6; }
9944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009945/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009946
Martin v. Löwise9416172003-05-03 10:12:45 +00009947#include <netdb.h>
9948
Martin v. Löwise9416172003-05-03 10:12:45 +00009949int
9950main ()
9951{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009952void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009953 ;
9954 return 0;
9955}
9956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009957if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009958
Matthias Kloseb9621712010-04-24 17:59:49 +00009959$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009960
Matthias Kloseb159a552010-04-25 21:00:44 +00009961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009962$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009963else
Matthias Kloseb9621712010-04-24 17:59:49 +00009964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9965$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009966
9967fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009968rm -f core conftest.err conftest.$ac_objext \
9969 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009970
Matthias Kloseb9621712010-04-24 17:59:49 +00009971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
9972$as_echo_n "checking for inet_aton... " >&6; }
9973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009974/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009975
Martin v. Löwis86d66262006-02-17 08:40:11 +00009976#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009977#include <sys/socket.h>
9978#include <netinet/in.h>
9979#include <arpa/inet.h>
9980
Martin v. Löwise9416172003-05-03 10:12:45 +00009981int
9982main ()
9983{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009984void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009985 ;
9986 return 0;
9987}
9988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009989if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009990
Matthias Kloseb9621712010-04-24 17:59:49 +00009991$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009992
Matthias Kloseb159a552010-04-25 21:00:44 +00009993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009994$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009995else
Matthias Kloseb9621712010-04-24 17:59:49 +00009996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9997$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009998
9999fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010000rm -f core conftest.err conftest.$ac_objext \
10001 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010002
Matthias Kloseb9621712010-04-24 17:59:49 +000010003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10004$as_echo_n "checking for inet_pton... " >&6; }
10005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010006/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010007
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010008#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010009#include <sys/socket.h>
10010#include <netinet/in.h>
10011#include <arpa/inet.h>
10012
Martin v. Löwise9416172003-05-03 10:12:45 +000010013int
10014main ()
10015{
10016void* p = inet_pton
10017 ;
10018 return 0;
10019}
10020_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010021if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010022
Matthias Kloseb9621712010-04-24 17:59:49 +000010023$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010024
Matthias Kloseb159a552010-04-25 21:00:44 +000010025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010026$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010027else
Matthias Kloseb9621712010-04-24 17:59:49 +000010028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10029$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010030
10031fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010033
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010034# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10036$as_echo_n "checking for setgroups... " >&6; }
10037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010038/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010039
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010040#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010041#ifdef HAVE_GRP_H
10042#include <grp.h>
10043#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010044
Martin v. Löwisd5843682002-11-21 20:41:28 +000010045int
10046main ()
10047{
10048void* p = setgroups
10049 ;
10050 return 0;
10051}
10052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010053if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010054
Matthias Kloseb9621712010-04-24 17:59:49 +000010055$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010056
Matthias Kloseb159a552010-04-25 21:00:44 +000010057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010058$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010059else
Matthias Kloseb9621712010-04-24 17:59:49 +000010060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10061$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010062
10063fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010065
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010066# check for openpty and forkpty
10067
10068for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010069do :
10070 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010071if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010072 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010073#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010074_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010075
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010076else
Matthias Kloseb9621712010-04-24 17:59:49 +000010077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10078$as_echo_n "checking for openpty in -lutil... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010079if test "${ac_cv_lib_util_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010080 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010081else
Martin v. Löwis11437992002-04-12 09:54:03 +000010082 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010083LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010085/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010086
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010087/* Override any GCC internal prototype to avoid an error.
10088 Use char because int might match the return type of a GCC
10089 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010090#ifdef __cplusplus
10091extern "C"
10092#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010093char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010094int
10095main ()
10096{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010097return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010098 ;
10099 return 0;
10100}
10101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010102if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010103 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010104else
Matthias Kloseb9621712010-04-24 17:59:49 +000010105 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010106fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010107rm -f core conftest.err conftest.$ac_objext \
10108 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010109LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010110fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10112$as_echo "$ac_cv_lib_util_openpty" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010113if test "x$ac_cv_lib_util_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010114 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010115 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010116else
Matthias Kloseb9621712010-04-24 17:59:49 +000010117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10118$as_echo_n "checking for openpty in -lbsd... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010119if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010120 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010121else
10122 ac_check_lib_save_LIBS=$LIBS
10123LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010125/* end confdefs.h. */
10126
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010127/* Override any GCC internal prototype to avoid an error.
10128 Use char because int might match the return type of a GCC
10129 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010130#ifdef __cplusplus
10131extern "C"
10132#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010133char openpty ();
10134int
10135main ()
10136{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010137return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010138 ;
10139 return 0;
10140}
10141_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010142if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010143 ac_cv_lib_bsd_openpty=yes
10144else
Matthias Kloseb9621712010-04-24 17:59:49 +000010145 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010146fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010147rm -f core conftest.err conftest.$ac_objext \
10148 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010149LIBS=$ac_check_lib_save_LIBS
10150fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10152$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010153if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010154 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010155 LIBS="$LIBS -lbsd"
10156fi
10157
10158
10159fi
10160
Fred Drake8cef4cf2000-06-28 16:40:38 +000010161
10162fi
10163done
10164
10165for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010166do :
10167 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010168if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010169 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010170#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010171_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010172
Fred Drake8cef4cf2000-06-28 16:40:38 +000010173else
Matthias Kloseb9621712010-04-24 17:59:49 +000010174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10175$as_echo_n "checking for forkpty in -lutil... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010176if test "${ac_cv_lib_util_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010177 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010178else
Martin v. Löwis11437992002-04-12 09:54:03 +000010179 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010180LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010181cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010182/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010183
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010184/* Override any GCC internal prototype to avoid an error.
10185 Use char because int might match the return type of a GCC
10186 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010187#ifdef __cplusplus
10188extern "C"
10189#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010190char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010191int
10192main ()
10193{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010194return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010195 ;
10196 return 0;
10197}
10198_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010199if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010200 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010201else
Matthias Kloseb9621712010-04-24 17:59:49 +000010202 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010203fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010204rm -f core conftest.err conftest.$ac_objext \
10205 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010206LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010207fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10209$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010210if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010211 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010212 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010213else
Matthias Kloseb9621712010-04-24 17:59:49 +000010214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10215$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010216if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010217 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010218else
10219 ac_check_lib_save_LIBS=$LIBS
10220LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010222/* end confdefs.h. */
10223
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010224/* Override any GCC internal prototype to avoid an error.
10225 Use char because int might match the return type of a GCC
10226 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010227#ifdef __cplusplus
10228extern "C"
10229#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010230char forkpty ();
10231int
10232main ()
10233{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010234return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010235 ;
10236 return 0;
10237}
10238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010239if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010240 ac_cv_lib_bsd_forkpty=yes
10241else
Matthias Kloseb9621712010-04-24 17:59:49 +000010242 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010243fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010244rm -f core conftest.err conftest.$ac_objext \
10245 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010246LIBS=$ac_check_lib_save_LIBS
10247fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10249$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010250if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010251 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010252 LIBS="$LIBS -lbsd"
10253fi
10254
10255
10256fi
10257
Fred Drake8cef4cf2000-06-28 16:40:38 +000010258
10259fi
10260done
10261
Jack Jansendd19cf82001-12-06 22:36:17 +000010262
Christian Heimesb186d002008-03-18 15:15:01 +000010263# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010264for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010265do :
10266 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010267if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010268 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010269#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010270_ACEOF
10271
10272fi
10273done
10274
10275
Michael W. Hudson54241132001-12-07 15:38:26 +000010276# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010277for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010278do :
10279 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10280ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010281eval as_val=\$$as_ac_var
10282 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010283 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010284#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010285_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010286
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010287fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010288done
10289
Michael W. Hudson54241132001-12-07 15:38:26 +000010290
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010291for ac_func in dup2 getcwd strdup
10292do :
10293 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10294ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10295eval as_val=\$$as_ac_var
10296 if test "x$as_val" = x""yes; then :
10297 cat >>confdefs.h <<_ACEOF
10298#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10299_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000010300
Martin v. Löwis1142de32002-03-29 16:28:31 +000010301else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010302 case " $LIBOBJS " in
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010303 *" $ac_func.$ac_objext "* ) ;;
10304 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010305 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010306esac
10307
Martin v. Löwis1142de32002-03-29 16:28:31 +000010308fi
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010309done
Martin v. Löwis1142de32002-03-29 16:28:31 +000010310
10311
10312for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010313do :
10314 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010315if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010316 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010317#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010320/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010321#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010322int
10323main ()
10324{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010325getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010326 ;
10327 return 0;
10328}
10329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010330if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010331
Matthias Kloseb9621712010-04-24 17:59:49 +000010332$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010333
Guido van Rossum627b2d71993-12-24 10:39:16 +000010334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010336
Guido van Rossum627b2d71993-12-24 10:39:16 +000010337fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010338done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010339
Jack Jansen150753c2003-03-29 22:07:47 +000010340for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010341do :
10342 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010343if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010344 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010345#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010348/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010349#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010350int
10351main ()
10352{
10353setpgrp(0,0);
10354 ;
10355 return 0;
10356}
10357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010358if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010359
Matthias Kloseb9621712010-04-24 17:59:49 +000010360$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010361
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010364
10365fi
10366done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010367
Thomas Wouters3a584202000-08-05 23:28:51 +000010368for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010369do :
10370 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010371if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010372 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010373#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010376/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010377#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010378int
10379main ()
10380{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010381gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010382 ;
10383 return 0;
10384}
10385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010386if ac_fn_c_try_compile "$LINENO"; then :
10387
Guido van Rossum627b2d71993-12-24 10:39:16 +000010388else
Skip Montanaro6dead952003-09-25 14:50:04 +000010389
Matthias Kloseb9621712010-04-24 17:59:49 +000010390$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010391
Martin v. Löwis11437992002-04-12 09:54:03 +000010392
Guido van Rossum627b2d71993-12-24 10:39:16 +000010393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010395
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010396fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010397done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010398
Michael W. Hudson54241132001-12-07 15:38:26 +000010399
Matthias Kloseb9621712010-04-24 17:59:49 +000010400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10401$as_echo_n "checking for major... " >&6; }
10402cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010403/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010404
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010405#if defined(MAJOR_IN_MKDEV)
10406#include <sys/mkdev.h>
10407#elif defined(MAJOR_IN_SYSMACROS)
10408#include <sys/sysmacros.h>
10409#else
10410#include <sys/types.h>
10411#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010412
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010413int
10414main ()
10415{
10416
10417 makedev(major(0),minor(0));
10418
10419 ;
10420 return 0;
10421}
10422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010423if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010424
10425
Matthias Kloseb9621712010-04-24 17:59:49 +000010426$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010427
Matthias Kloseb9621712010-04-24 17:59:49 +000010428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10429$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010430
10431else
Skip Montanaro6dead952003-09-25 14:50:04 +000010432
Matthias Kloseb9621712010-04-24 17:59:49 +000010433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10434$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010435
10436fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010437rm -f core conftest.err conftest.$ac_objext \
10438 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010439
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010440# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010441# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10443$as_echo_n "checking for getaddrinfo... " >&6; }
10444cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010445/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010446
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010447#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010448#include <sys/socket.h>
10449#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010450#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010451
Martin v. Löwis11437992002-04-12 09:54:03 +000010452int
10453main ()
10454{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010455getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010456 ;
10457 return 0;
10458}
10459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010460if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010461 have_getaddrinfo=yes
10462else
Matthias Kloseb9621712010-04-24 17:59:49 +000010463 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010464fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010465rm -f core conftest.err conftest.$ac_objext \
10466 conftest$ac_exeext conftest.$ac_ext
10467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10468$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010469if test $have_getaddrinfo = yes
10470then
Matthias Kloseb9621712010-04-24 17:59:49 +000010471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10472$as_echo_n "checking getaddrinfo bug... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010473 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010474 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010475else
Matthias Kloseb9621712010-04-24 17:59:49 +000010476 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010477 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010478else
Matthias Kloseb9621712010-04-24 17:59:49 +000010479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010480/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010481
10482#include <sys/types.h>
10483#include <netdb.h>
10484#include <string.h>
10485#include <sys/socket.h>
10486#include <netinet/in.h>
10487
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010488int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010489{
10490 int passive, gaierr, inet4 = 0, inet6 = 0;
10491 struct addrinfo hints, *ai, *aitop;
10492 char straddr[INET6_ADDRSTRLEN], strport[16];
10493
10494 for (passive = 0; passive <= 1; passive++) {
10495 memset(&hints, 0, sizeof(hints));
10496 hints.ai_family = AF_UNSPEC;
10497 hints.ai_flags = passive ? AI_PASSIVE : 0;
10498 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010499 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010500 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10501 (void)gai_strerror(gaierr);
10502 goto bad;
10503 }
10504 for (ai = aitop; ai; ai = ai->ai_next) {
10505 if (ai->ai_addr == NULL ||
10506 ai->ai_addrlen == 0 ||
10507 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10508 straddr, sizeof(straddr), strport, sizeof(strport),
10509 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10510 goto bad;
10511 }
10512 switch (ai->ai_family) {
10513 case AF_INET:
10514 if (strcmp(strport, "54321") != 0) {
10515 goto bad;
10516 }
10517 if (passive) {
10518 if (strcmp(straddr, "0.0.0.0") != 0) {
10519 goto bad;
10520 }
10521 } else {
10522 if (strcmp(straddr, "127.0.0.1") != 0) {
10523 goto bad;
10524 }
10525 }
10526 inet4++;
10527 break;
10528 case AF_INET6:
10529 if (strcmp(strport, "54321") != 0) {
10530 goto bad;
10531 }
10532 if (passive) {
10533 if (strcmp(straddr, "::") != 0) {
10534 goto bad;
10535 }
10536 } else {
10537 if (strcmp(straddr, "::1") != 0) {
10538 goto bad;
10539 }
10540 }
10541 inet6++;
10542 break;
10543 case AF_UNSPEC:
10544 goto bad;
10545 break;
10546 default:
10547 /* another family support? */
10548 break;
10549 }
10550 }
10551 }
10552
10553 if (!(inet4 == 0 || inet4 == 2))
10554 goto bad;
10555 if (!(inet6 == 0 || inet6 == 2))
10556 goto bad;
10557
10558 if (aitop)
10559 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010560 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010561
10562 bad:
10563 if (aitop)
10564 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010565 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010566}
10567
Martin v. Löwis11437992002-04-12 09:54:03 +000010568_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010569if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010570 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010571else
Matthias Kloseb9621712010-04-24 17:59:49 +000010572 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010573fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010574rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10575 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010576fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010577
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010578fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010579
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010580fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010581
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10583$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10584
Mark Dickinson2df5d282009-12-31 21:22:50 +000010585if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010586then
10587 if test $ipv6 = yes
10588 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010589 echo 'Fatal: You must get working getaddrinfo() function.'
10590 echo ' or you can specify "--disable-ipv6"'.
10591 exit 1
10592 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010593else
Martin v. Löwis11437992002-04-12 09:54:03 +000010594
Matthias Kloseb9621712010-04-24 17:59:49 +000010595$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010596
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010597fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010598
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010599for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010600do :
10601 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010602if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010603 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010604#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010605_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010606
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010607fi
10608done
10609
Michael W. Hudson54241132001-12-07 15:38:26 +000010610
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010611# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10613$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010614if test "${ac_cv_header_time+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010615 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010616else
Matthias Kloseb9621712010-04-24 17:59:49 +000010617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010618/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010619#include <sys/types.h>
10620#include <sys/time.h>
10621#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010622
Martin v. Löwis11437992002-04-12 09:54:03 +000010623int
10624main ()
10625{
10626if ((struct tm *) 0)
10627return 0;
10628 ;
10629 return 0;
10630}
10631_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010632if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010633 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010634else
Matthias Kloseb9621712010-04-24 17:59:49 +000010635 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010636fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010638fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10640$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010641if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010642
Matthias Kloseb9621712010-04-24 17:59:49 +000010643$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010644
10645fi
10646
Matthias Kloseb9621712010-04-24 17:59:49 +000010647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10648$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010649if test "${ac_cv_struct_tm+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010650 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010651else
Matthias Kloseb9621712010-04-24 17:59:49 +000010652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010653/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010654#include <sys/types.h>
10655#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010656
Martin v. Löwis11437992002-04-12 09:54:03 +000010657int
10658main ()
10659{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010660struct tm tm;
10661 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010662 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010663 ;
10664 return 0;
10665}
10666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010667if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010668 ac_cv_struct_tm=time.h
10669else
Matthias Kloseb9621712010-04-24 17:59:49 +000010670 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010671fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010673fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10675$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010676if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010677
Matthias Kloseb9621712010-04-24 17:59:49 +000010678$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010679
10680fi
10681
Matthias Kloseb9621712010-04-24 17:59:49 +000010682ac_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 +000010683#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010684
Matthias Kloseb9621712010-04-24 17:59:49 +000010685"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010686if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010687
10688cat >>confdefs.h <<_ACEOF
10689#define HAVE_STRUCT_TM_TM_ZONE 1
10690_ACEOF
10691
10692
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010693fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010694
Martin v. Löwis11437992002-04-12 09:54:03 +000010695if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10696
Matthias Kloseb9621712010-04-24 17:59:49 +000010697$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010698
10699else
Matthias Kloseb9621712010-04-24 17:59:49 +000010700 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10701"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010702if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010703 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010704else
Matthias Kloseb9621712010-04-24 17:59:49 +000010705 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010706fi
10707
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010708cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010709#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010710_ACEOF
10711
Matthias Kloseb9621712010-04-24 17:59:49 +000010712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10713$as_echo_n "checking for tzname... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010714if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010715 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010716else
Matthias Kloseb9621712010-04-24 17:59:49 +000010717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010718/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010719#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010720#if !HAVE_DECL_TZNAME
10721extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010722#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010723
Martin v. Löwis11437992002-04-12 09:54:03 +000010724int
10725main ()
10726{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010727return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010728 ;
10729 return 0;
10730}
10731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010732if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010733 ac_cv_var_tzname=yes
10734else
Matthias Kloseb9621712010-04-24 17:59:49 +000010735 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010736fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010737rm -f core conftest.err conftest.$ac_objext \
10738 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010739fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10741$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010742 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010743
Matthias Kloseb9621712010-04-24 17:59:49 +000010744$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010745
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010746 fi
10747fi
10748
Matthias Kloseb9621712010-04-24 17:59:49 +000010749ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010750if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010751
10752cat >>confdefs.h <<_ACEOF
10753#define HAVE_STRUCT_STAT_ST_RDEV 1
10754_ACEOF
10755
10756
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010757fi
10758
Matthias Kloseb9621712010-04-24 17:59:49 +000010759ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010760if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010761
Martin v. Löwis11437992002-04-12 09:54:03 +000010762cat >>confdefs.h <<_ACEOF
10763#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10764_ACEOF
10765
10766
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010767fi
10768
Matthias Kloseb9621712010-04-24 17:59:49 +000010769ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010770if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010771
10772cat >>confdefs.h <<_ACEOF
10773#define HAVE_STRUCT_STAT_ST_FLAGS 1
10774_ACEOF
10775
10776
10777fi
10778
Matthias Kloseb9621712010-04-24 17:59:49 +000010779ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010780if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010781
10782cat >>confdefs.h <<_ACEOF
10783#define HAVE_STRUCT_STAT_ST_GEN 1
10784_ACEOF
10785
10786
10787fi
10788
Matthias Kloseb9621712010-04-24 17:59:49 +000010789ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010790if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010791
10792cat >>confdefs.h <<_ACEOF
10793#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10794_ACEOF
10795
10796
10797fi
10798
Matthias Kloseb9621712010-04-24 17:59:49 +000010799ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010800if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010801
Martin v. Löwis11437992002-04-12 09:54:03 +000010802cat >>confdefs.h <<_ACEOF
10803#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10804_ACEOF
10805
10806
Matthias Kloseb9621712010-04-24 17:59:49 +000010807$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010808
10809else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010810 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010811 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010812 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10813 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010814esac
10815
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010816fi
10817
Michael W. Hudson54241132001-12-07 15:38:26 +000010818
Martin v. Löwis11437992002-04-12 09:54:03 +000010819
Matthias Kloseb9621712010-04-24 17:59:49 +000010820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10821$as_echo_n "checking for time.h that defines altzone... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010822if test "${ac_cv_header_time_altzone+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010823 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010824else
Matthias Kloseb159a552010-04-25 21:00:44 +000010825
Matthias Kloseb9621712010-04-24 17:59:49 +000010826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010827/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010828#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010829int
10830main ()
10831{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010832return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010833 ;
10834 return 0;
10835}
10836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010837if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010838 ac_cv_header_time_altzone=yes
10839else
Matthias Kloseb9621712010-04-24 17:59:49 +000010840 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010843
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010844fi
10845
Matthias Kloseb9621712010-04-24 17:59:49 +000010846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10847$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010848if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010849
Matthias Kloseb9621712010-04-24 17:59:49 +000010850$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010851
10852fi
10853
Guido van Rossumda88dad1995-01-26 00:46:29 +000010854was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10856$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010858/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010859
10860#include <sys/types.h>
10861#include <sys/select.h>
10862#include <sys/time.h>
10863
Martin v. Löwis11437992002-04-12 09:54:03 +000010864int
10865main ()
10866{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010867;
Martin v. Löwis11437992002-04-12 09:54:03 +000010868 ;
10869 return 0;
10870}
10871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010872if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010873
10874
Matthias Kloseb9621712010-04-24 17:59:49 +000010875$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010876
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010877 was_it_defined=yes
10878
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010879fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10882$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010883
Matthias Kloseb9621712010-04-24 17:59:49 +000010884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10885$as_echo_n "checking for addrinfo... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010886if test "${ac_cv_struct_addrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010887 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010888else
Matthias Kloseb9621712010-04-24 17:59:49 +000010889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010890/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010891#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010892int
10893main ()
10894{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010895struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010896 ;
10897 return 0;
10898}
10899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010900if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010901 ac_cv_struct_addrinfo=yes
10902else
Matthias Kloseb9621712010-04-24 17:59:49 +000010903 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010904fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10906fi
10907
Matthias Kloseb9621712010-04-24 17:59:49 +000010908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10909$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010910if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010911
Matthias Kloseb9621712010-04-24 17:59:49 +000010912$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010913
10914fi
10915
Matthias Kloseb9621712010-04-24 17:59:49 +000010916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10917$as_echo_n "checking for sockaddr_storage... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010918if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010919 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010920else
Matthias Kloseb9621712010-04-24 17:59:49 +000010921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010922/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010923
10924# include <sys/types.h>
10925# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010926int
10927main ()
10928{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010929struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010930 ;
10931 return 0;
10932}
10933_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010934if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010935 ac_cv_struct_sockaddr_storage=yes
10936else
Matthias Kloseb9621712010-04-24 17:59:49 +000010937 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010938fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10940fi
10941
Matthias Kloseb9621712010-04-24 17:59:49 +000010942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10943$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010944if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010945
Matthias Kloseb9621712010-04-24 17:59:49 +000010946$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010947
10948fi
10949
Guido van Rossum627b2d71993-12-24 10:39:16 +000010950# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000010951
Matthias Kloseb9621712010-04-24 17:59:49 +000010952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10953$as_echo_n "checking whether char is unsigned... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010954if test "${ac_cv_c_char_unsigned+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010955 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000010956else
Matthias Kloseb9621712010-04-24 17:59:49 +000010957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010958/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010959$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010960int
10961main ()
10962{
10963static int test_array [1 - 2 * !(((char) -1) < 0)];
10964test_array [0] = 0
10965
10966 ;
10967 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000010968}
Martin v. Löwis11437992002-04-12 09:54:03 +000010969_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010970if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000010971 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010972else
Matthias Kloseb9621712010-04-24 17:59:49 +000010973 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010974fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010976fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
10978$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010979if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010980 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010981
10982fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000010983
Matthias Kloseb9621712010-04-24 17:59:49 +000010984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
10985$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000010986if test "${ac_cv_c_const+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010987 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010988else
Matthias Kloseb9621712010-04-24 17:59:49 +000010989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010990/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010991
Martin v. Löwis11437992002-04-12 09:54:03 +000010992int
10993main ()
10994{
10995/* FIXME: Include the comments suggested by Paul. */
10996#ifndef __cplusplus
10997 /* Ultrix mips cc rejects this. */
10998 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010999 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011000 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011001 char const *const *pcpcc;
11002 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011003 /* NEC SVR4.0.2 mips cc rejects this. */
11004 struct point {int x, y;};
11005 static struct point const zero = {0,0};
11006 /* AIX XL C 1.02.0.0 rejects this.
11007 It does not let you subtract one const X* pointer from another in
11008 an arm of an if-expression whose if-part is not a constant
11009 expression */
11010 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011011 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011012 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011013 ++pcpcc;
11014 ppc = (char**) pcpcc;
11015 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011016 { /* SCO 3.2v4 cc rejects this. */
11017 char *t;
11018 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011019
Martin v. Löwis11437992002-04-12 09:54:03 +000011020 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011021 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011022 }
11023 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11024 int x[] = {25, 17};
11025 const int *foo = &x[0];
11026 ++foo;
11027 }
11028 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11029 typedef const int *iptr;
11030 iptr p = 0;
11031 ++p;
11032 }
11033 { /* AIX XL C 1.02.0.0 rejects this saying
11034 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11035 struct s { int j; const int *ap[3]; };
11036 struct s *b; b->j = 5;
11037 }
11038 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11039 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011040 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011041 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011042 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011043#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011044
Martin v. Löwis11437992002-04-12 09:54:03 +000011045 ;
11046 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011047}
Martin v. Löwis11437992002-04-12 09:54:03 +000011048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011049if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011050 ac_cv_c_const=yes
11051else
Matthias Kloseb9621712010-04-24 17:59:49 +000011052 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011053fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011055fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11057$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011058if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011059
Matthias Kloseb9621712010-04-24 17:59:49 +000011060$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011061
11062fi
11063
Michael W. Hudson54241132001-12-07 15:38:26 +000011064
Guido van Rossumda88dad1995-01-26 00:46:29 +000011065works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11067$as_echo_n "checking for working volatile... " >&6; }
11068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011069/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011070
Martin v. Löwis11437992002-04-12 09:54:03 +000011071int
11072main ()
11073{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011074volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011075 ;
11076 return 0;
11077}
11078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011079if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011080 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011081else
Skip Montanaro6dead952003-09-25 14:50:04 +000011082
Matthias Kloseb9621712010-04-24 17:59:49 +000011083$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011084
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011085
Guido van Rossum627b2d71993-12-24 10:39:16 +000011086fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11089$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011090
Guido van Rossumda88dad1995-01-26 00:46:29 +000011091works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11093$as_echo_n "checking for working signed char... " >&6; }
11094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011095/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011096
Martin v. Löwis11437992002-04-12 09:54:03 +000011097int
11098main ()
11099{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011100signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011101 ;
11102 return 0;
11103}
11104_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011105if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011106 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011107else
Skip Montanaro6dead952003-09-25 14:50:04 +000011108
Matthias Kloseb9621712010-04-24 17:59:49 +000011109$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011110
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011111
Guido van Rossum7f43da71994-08-01 12:15:30 +000011112fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11115$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011116
Guido van Rossumda88dad1995-01-26 00:46:29 +000011117have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11119$as_echo_n "checking for prototypes... " >&6; }
11120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011121/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011122int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011123int
11124main ()
11125{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011126return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011127 ;
11128 return 0;
11129}
11130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011131if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011132
Matthias Kloseb9621712010-04-24 17:59:49 +000011133$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011134
Matthias Kloseb159a552010-04-25 21:00:44 +000011135 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011136fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11139$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011140
Guido van Rossumda88dad1995-01-26 00:46:29 +000011141works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11143$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011145/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011146
11147#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011148int foo(int x, ...) {
11149 va_list va;
11150 va_start(va, x);
11151 va_arg(va, int);
11152 va_arg(va, char *);
11153 va_arg(va, double);
11154 return 0;
11155}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011156
Martin v. Löwis11437992002-04-12 09:54:03 +000011157int
11158main ()
11159{
Guido van Rossum90eea071996-08-30 20:58:57 +000011160return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011161 ;
11162 return 0;
11163}
11164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011165if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011166
11167
Matthias Kloseb9621712010-04-24 17:59:49 +000011168$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011169
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011170 works=yes
11171
Guido van Rossum627b2d71993-12-24 10:39:16 +000011172fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11175$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011176
Martin v. Löwisd6320502004-08-12 13:45:08 +000011177# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11179$as_echo_n "checking for socketpair... " >&6; }
11180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011181/* end confdefs.h. */
11182
11183#include <sys/types.h>
11184#include <sys/socket.h>
11185
11186int
11187main ()
11188{
11189void *x=socketpair
11190 ;
11191 return 0;
11192}
11193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011194if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011195
Matthias Kloseb9621712010-04-24 17:59:49 +000011196$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011197
Matthias Kloseb159a552010-04-25 21:00:44 +000011198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011199$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011200else
Matthias Kloseb9621712010-04-24 17:59:49 +000011201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11202$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011203
11204fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011206
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011207# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11209$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011211/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011212#include <sys/types.h>
11213#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011214int
11215main ()
11216{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011217struct sockaddr x;
11218x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011219 ;
11220 return 0;
11221}
11222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011223if ac_fn_c_try_compile "$LINENO"; then :
11224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11225$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011226
Matthias Kloseb9621712010-04-24 17:59:49 +000011227$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011228
11229else
Matthias Kloseb9621712010-04-24 17:59:49 +000011230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11231$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011232
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011235
Guido van Rossumda88dad1995-01-26 00:46:29 +000011236va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11238$as_echo_n "checking whether va_list is an array... " >&6; }
11239cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011240/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011241
11242#ifdef HAVE_STDARG_PROTOTYPES
11243#include <stdarg.h>
11244#else
11245#include <varargs.h>
11246#endif
11247
Martin v. Löwis11437992002-04-12 09:54:03 +000011248int
11249main ()
11250{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011251va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011252 ;
11253 return 0;
11254}
11255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011256if ac_fn_c_try_compile "$LINENO"; then :
11257
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011258else
Skip Montanaro6dead952003-09-25 14:50:04 +000011259
Martin v. Löwis11437992002-04-12 09:54:03 +000011260
Matthias Kloseb9621712010-04-24 17:59:49 +000011261$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011262
Guido van Rossumda88dad1995-01-26 00:46:29 +000011263 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011264
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011265fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11268$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011269
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011270# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011271
11272
Matthias Kloseb9621712010-04-24 17:59:49 +000011273ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000011274if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011275
Matthias Kloseb9621712010-04-24 17:59:49 +000011276 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011277
Matthias Kloseb9621712010-04-24 17:59:49 +000011278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11279$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011280 OLD_CFLAGS=$CFLAGS
11281 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011283/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011284
11285# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011286
Martin v. Löwis11437992002-04-12 09:54:03 +000011287int
11288main ()
11289{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011290
11291 char *name;
11292 struct hostent *he, *res;
11293 char buffer[2048];
11294 int buflen = 2048;
11295 int h_errnop;
11296
11297 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011298
11299 ;
11300 return 0;
11301}
11302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011303if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011304
Matthias Kloseb9621712010-04-24 17:59:49 +000011305 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011306
Martin v. Löwis11437992002-04-12 09:54:03 +000011307
Matthias Kloseb9621712010-04-24 17:59:49 +000011308$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011309
Matthias Kloseb9621712010-04-24 17:59:49 +000011310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11311$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011312
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011313else
Skip Montanaro6dead952003-09-25 14:50:04 +000011314
Matthias Kloseb9621712010-04-24 17:59:49 +000011315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11316$as_echo "no" >&6; }
11317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11318$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011320/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011321
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011322# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011323
Martin v. Löwis11437992002-04-12 09:54:03 +000011324int
11325main ()
11326{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011327
11328 char *name;
11329 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011330 char buffer[2048];
11331 int buflen = 2048;
11332 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011333
Matthias Kloseb159a552010-04-25 21:00:44 +000011334 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011335
11336 ;
11337 return 0;
11338}
11339_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011340if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011341
Matthias Kloseb9621712010-04-24 17:59:49 +000011342 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011343
Martin v. Löwis11437992002-04-12 09:54:03 +000011344
Matthias Kloseb159a552010-04-25 21:00:44 +000011345$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011346
Matthias Kloseb9621712010-04-24 17:59:49 +000011347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11348$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011349
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011350else
Skip Montanaro6dead952003-09-25 14:50:04 +000011351
Matthias Kloseb9621712010-04-24 17:59:49 +000011352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11353$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11355$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11357/* end confdefs.h. */
11358
11359# include <netdb.h>
11360
11361int
11362main ()
11363{
11364
11365 char *name;
11366 struct hostent *he;
11367 struct hostent_data data;
11368
11369 (void) gethostbyname_r(name, he, &data);
11370
11371 ;
11372 return 0;
11373}
11374_ACEOF
11375if ac_fn_c_try_compile "$LINENO"; then :
11376
11377 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11378
11379
11380$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11381
11382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11383$as_echo "yes" >&6; }
11384
11385else
11386
11387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11388$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011389
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011392
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011395
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011398 CFLAGS=$OLD_CFLAGS
11399
11400else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011401
Matthias Kloseb9621712010-04-24 17:59:49 +000011402 for ac_func in gethostbyname
11403do :
11404 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000011405if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011406 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011407#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011408_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011409
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011410fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011411done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011412
Michael W. Hudson54241132001-12-07 15:38:26 +000011413
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011414fi
11415
Michael W. Hudson54241132001-12-07 15:38:26 +000011416
11417
11418
11419
11420
11421
Guido van Rossum627b2d71993-12-24 10:39:16 +000011422# checks for system services
11423# (none yet)
11424
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011425# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011426ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000011427if test "x$ac_cv_func___fpu_control" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011428
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011429else
Matthias Kloseb9621712010-04-24 17:59:49 +000011430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11431$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000011432if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011433 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011434else
Martin v. Löwis11437992002-04-12 09:54:03 +000011435 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011436LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011438/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011439
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011440/* Override any GCC internal prototype to avoid an error.
11441 Use char because int might match the return type of a GCC
11442 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011443#ifdef __cplusplus
11444extern "C"
11445#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011446char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011447int
11448main ()
11449{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011450return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011451 ;
11452 return 0;
11453}
11454_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011455if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011456 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011457else
Matthias Kloseb9621712010-04-24 17:59:49 +000011458 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011459fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011460rm -f core conftest.err conftest.$ac_objext \
11461 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011462LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011463fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11465$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000011466if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011467 cat >>confdefs.h <<_ACEOF
11468#define HAVE_LIBIEEE 1
11469_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011470
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011471 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011472
Guido van Rossum627b2d71993-12-24 10:39:16 +000011473fi
11474
Michael W. Hudson54241132001-12-07 15:38:26 +000011475
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011476fi
11477
Michael W. Hudson54241132001-12-07 15:38:26 +000011478
Guido van Rossum7f253911997-05-09 02:42:48 +000011479# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11481$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011482
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011483# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011484if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011485 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011486if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011487then
11488
Matthias Kloseb9621712010-04-24 17:59:49 +000011489$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011490
Matthias Kloseb9621712010-04-24 17:59:49 +000011491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11492$as_echo "yes" >&6; }
11493else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11494$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011495fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011496else
Matthias Kloseb9621712010-04-24 17:59:49 +000011497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11498$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011499fi
11500
Guido van Rossum7f253911997-05-09 02:42:48 +000011501
Guido van Rossum7f43da71994-08-01 12:15:30 +000011502# check for --with-libm=...
11503
Guido van Rossum563e7081996-09-10 18:20:48 +000011504case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011505Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011506*) LIBM=-lm
11507esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11509$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011510
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011511# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011512if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011513 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011514if test "$withval" = no
11515then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11517$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011518elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011519then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11521$as_echo "set LIBM=\"$withval\"" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000011522else as_fn_error "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011523fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011524else
Matthias Kloseb9621712010-04-24 17:59:49 +000011525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11526$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011527fi
11528
Guido van Rossum7f43da71994-08-01 12:15:30 +000011529
11530# check for --with-libc=...
11531
Matthias Kloseb9621712010-04-24 17:59:49 +000011532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11533$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011534
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011535# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011536if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011537 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011538if test "$withval" = no
11539then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11541$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011542elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011543then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11545$as_echo "set LIBC=\"$withval\"" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000011546else as_fn_error "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011547fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011548else
Matthias Kloseb9621712010-04-24 17:59:49 +000011549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11550$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011551fi
11552
Guido van Rossum7f43da71994-08-01 12:15:30 +000011553
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011554# **************************************************
11555# * Check for various properties of floating point *
11556# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011557
Matthias Kloseb9621712010-04-24 17:59:49 +000011558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11559$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000011560if test "${ac_cv_little_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011561 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011562else
11563
Matthias Kloseb9621712010-04-24 17:59:49 +000011564if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011565 ac_cv_little_endian_double=no
11566else
Matthias Kloseb9621712010-04-24 17:59:49 +000011567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011568/* end confdefs.h. */
11569
11570#include <string.h>
11571int main() {
11572 double x = 9006104071832581.0;
11573 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11574 return 0;
11575 else
11576 return 1;
11577}
11578
11579_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011580if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011581 ac_cv_little_endian_double=yes
11582else
Matthias Kloseb9621712010-04-24 17:59:49 +000011583 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011584fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011585rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11586 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011587fi
11588
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011589fi
11590
Matthias Kloseb9621712010-04-24 17:59:49 +000011591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11592$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011593if test "$ac_cv_little_endian_double" = yes
11594then
11595
Matthias Kloseb9621712010-04-24 17:59:49 +000011596$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011597
11598fi
11599
Matthias Kloseb9621712010-04-24 17:59:49 +000011600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11601$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000011602if test "${ac_cv_big_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011603 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011604else
11605
Matthias Kloseb9621712010-04-24 17:59:49 +000011606if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011607 ac_cv_big_endian_double=no
11608else
Matthias Kloseb9621712010-04-24 17:59:49 +000011609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011610/* end confdefs.h. */
11611
11612#include <string.h>
11613int main() {
11614 double x = 9006104071832581.0;
11615 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11616 return 0;
11617 else
11618 return 1;
11619}
11620
11621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011622if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011623 ac_cv_big_endian_double=yes
11624else
Matthias Kloseb9621712010-04-24 17:59:49 +000011625 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011626fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011627rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11628 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011629fi
11630
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011631fi
11632
Matthias Kloseb9621712010-04-24 17:59:49 +000011633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11634$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011635if test "$ac_cv_big_endian_double" = yes
11636then
11637
Matthias Kloseb9621712010-04-24 17:59:49 +000011638$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011639
11640fi
11641
11642# Some ARM platforms use a mixed-endian representation for doubles.
11643# While Python doesn't currently have full support for these platforms
11644# (see e.g., issue 1762561), we can at least make sure that float <-> string
11645# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11647$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000011648if test "${ac_cv_mixed_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011649 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011650else
11651
Matthias Kloseb9621712010-04-24 17:59:49 +000011652if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011653 ac_cv_mixed_endian_double=no
11654else
Matthias Kloseb9621712010-04-24 17:59:49 +000011655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011656/* end confdefs.h. */
11657
11658#include <string.h>
11659int main() {
11660 double x = 9006104071832581.0;
11661 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11662 return 0;
11663 else
11664 return 1;
11665}
11666
11667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011668if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011669 ac_cv_mixed_endian_double=yes
11670else
Matthias Kloseb9621712010-04-24 17:59:49 +000011671 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011672fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011673rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11674 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011675fi
11676
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011677fi
11678
Matthias Kloseb9621712010-04-24 17:59:49 +000011679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11680$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011681if test "$ac_cv_mixed_endian_double" = yes
11682then
11683
Matthias Kloseb9621712010-04-24 17:59:49 +000011684$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011685
11686fi
11687
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011688# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011689# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011690# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011691# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011692# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011693# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011694
11695# This inline assembler syntax may also work for suncc and icc,
11696# so we try it on all platforms.
11697
Matthias Kloseb9621712010-04-24 17:59:49 +000011698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11699$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11700cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011701/* end confdefs.h. */
11702
11703int
11704main ()
11705{
11706
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011707 unsigned short cw;
11708 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11709 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011710
11711 ;
11712 return 0;
11713}
11714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011715if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011716 have_gcc_asm_for_x87=yes
11717else
Matthias Kloseb9621712010-04-24 17:59:49 +000011718 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011719fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11722$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011723if test "$have_gcc_asm_for_x87" = yes
11724then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011725
Matthias Kloseb9621712010-04-24 17:59:49 +000011726$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011727
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011728fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011729
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011730# Detect whether system arithmetic is subject to x87-style double
11731# rounding issues. The result of this test has little meaning on non
11732# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11733# mode is round-to-nearest and double rounding issues are present, and
11734# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11736$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011737# $BASECFLAGS may affect the result
11738ac_save_cc="$CC"
11739CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011740if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011741 ac_cv_x87_double_rounding=no
11742else
Matthias Kloseb9621712010-04-24 17:59:49 +000011743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011744/* end confdefs.h. */
11745
11746#include <stdlib.h>
11747#include <math.h>
11748int main() {
11749 volatile double x, y, z;
11750 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11751 x = 0.99999999999999989; /* 1-2**-53 */
11752 y = 1./x;
11753 if (y != 1.)
11754 exit(0);
11755 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11756 x = 1e16;
11757 y = 2.99999;
11758 z = x + y;
11759 if (z != 1e16+4.)
11760 exit(0);
11761 /* both tests show evidence of double rounding */
11762 exit(1);
11763}
11764
11765_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011766if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011767 ac_cv_x87_double_rounding=no
11768else
Matthias Kloseb9621712010-04-24 17:59:49 +000011769 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011770fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011771rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11772 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011773fi
11774
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011775CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11777$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011778if test "$ac_cv_x87_double_rounding" = yes
11779then
11780
Matthias Kloseb9621712010-04-24 17:59:49 +000011781$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011782
11783fi
11784
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011785# ************************************
11786# * Check for mathematical functions *
11787# ************************************
11788
11789LIBS_SAVE=$LIBS
11790LIBS="$LIBS $LIBM"
11791
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011792for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11793do :
11794 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11795ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000011796eval as_val=\$$as_ac_var
11797 if test "x$as_val" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011798 cat >>confdefs.h <<_ACEOF
11799#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11800_ACEOF
11801
11802fi
11803done
11804
11805for ac_func in hypot lgamma log1p round tgamma
11806do :
11807 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11808ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000011809eval as_val=\$$as_ac_var
11810 if test "x$as_val" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011811 cat >>confdefs.h <<_ACEOF
11812#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11813_ACEOF
11814
11815fi
11816done
11817
11818ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11819"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000011820if test "x$ac_cv_have_decl_isinf" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011821 ac_have_decl=1
11822else
11823 ac_have_decl=0
11824fi
11825
11826cat >>confdefs.h <<_ACEOF
11827#define HAVE_DECL_ISINF $ac_have_decl
11828_ACEOF
11829ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11830"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000011831if test "x$ac_cv_have_decl_isnan" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011832 ac_have_decl=1
11833else
11834 ac_have_decl=0
11835fi
11836
11837cat >>confdefs.h <<_ACEOF
11838#define HAVE_DECL_ISNAN $ac_have_decl
11839_ACEOF
11840ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11841"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000011842if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011843 ac_have_decl=1
11844else
11845 ac_have_decl=0
11846fi
11847
11848cat >>confdefs.h <<_ACEOF
11849#define HAVE_DECL_ISFINITE $ac_have_decl
11850_ACEOF
11851
11852
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011853# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11854# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11856$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000011857if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011858 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011859else
11860
Matthias Kloseb9621712010-04-24 17:59:49 +000011861if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011862 ac_cv_tanh_preserves_zero_sign=no
11863else
Matthias Kloseb9621712010-04-24 17:59:49 +000011864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011865/* end confdefs.h. */
11866
11867#include <math.h>
11868#include <stdlib.h>
11869int main() {
11870 /* return 0 if either negative zeros don't exist
11871 on this platform or if negative zeros exist
11872 and tanh(-0.) == -0. */
11873 if (atan2(0., -1.) == atan2(-0., -1.) ||
11874 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11875 else exit(1);
11876}
11877
11878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011879if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011880 ac_cv_tanh_preserves_zero_sign=yes
11881else
Matthias Kloseb9621712010-04-24 17:59:49 +000011882 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011883fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011884rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11885 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011886fi
11887
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011888fi
11889
Matthias Kloseb9621712010-04-24 17:59:49 +000011890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11891$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011892if test "$ac_cv_tanh_preserves_zero_sign" = yes
11893then
11894
Matthias Kloseb9621712010-04-24 17:59:49 +000011895$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011896
11897fi
11898
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011899if test "$ac_cv_func_log1p" = yes
11900then
11901 # On some versions of AIX, log1p(-0.) returns 0. instead of
11902 # -0. See issue #9920.
11903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
11904$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000011905 if test "${ac_cv_log1p_drops_zero_sign+set}" = set; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011906 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011907else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011908
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011909 if test "$cross_compiling" = yes; then :
11910 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011911else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11913/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011914
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011915 #include <math.h>
11916 #include <stdlib.h>
11917 int main() {
11918 /* Fail if the signs of log1p(-0.) and -0. can be
11919 distinguished. */
11920 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
11921 return 0;
11922 else
11923 return 1;
11924 }
11925
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011926_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011927if ac_fn_c_try_run "$LINENO"; then :
11928 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011929else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011930 ac_cv_log1p_drops_zero_sign=yes
11931fi
11932rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11933 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011934fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011935
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011936fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011937
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
11939$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
11940fi
11941if test "$ac_cv_log1p_drops_zero_sign" = yes
11942then
11943
11944$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
11945
11946fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011947
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011948LIBS=$LIBS_SAVE
11949
Mark Dickinsona614f042009-11-28 12:48:43 +000011950# For multiprocessing module, check that sem_open
11951# actually works. For FreeBSD versions <= 7.2,
11952# the kernel module that provides POSIX semaphores
11953# isn't loaded by default, so an attempt to call
11954# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000011955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
11956$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000011957if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011958 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000011959else
Matthias Kloseb9621712010-04-24 17:59:49 +000011960 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011961 ac_cv_posix_semaphores_enabled=yes
11962else
Matthias Kloseb9621712010-04-24 17:59:49 +000011963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011964/* end confdefs.h. */
11965
11966#include <unistd.h>
11967#include <fcntl.h>
11968#include <stdio.h>
11969#include <semaphore.h>
11970#include <sys/stat.h>
11971
11972int main(void) {
11973 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
11974 if (a == SEM_FAILED) {
11975 perror("sem_open");
11976 return 1;
11977 }
11978 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011979 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000011980 return 0;
11981}
11982
11983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011984if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011985 ac_cv_posix_semaphores_enabled=yes
11986else
Matthias Kloseb9621712010-04-24 17:59:49 +000011987 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000011988fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011989rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11990 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011991fi
11992
11993
Mark Dickinsona614f042009-11-28 12:48:43 +000011994fi
11995
Matthias Kloseb9621712010-04-24 17:59:49 +000011996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
11997$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000011998if test $ac_cv_posix_semaphores_enabled = no
11999then
12000
Matthias Kloseb9621712010-04-24 17:59:49 +000012001$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012002
12003fi
12004
Mark Dickinson10683072009-04-18 21:18:19 +000012005# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12007$as_echo_n "checking for broken sem_getvalue... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000012008if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012009 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012010else
Matthias Kloseb9621712010-04-24 17:59:49 +000012011 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012012 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012013else
Matthias Kloseb9621712010-04-24 17:59:49 +000012014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012015/* end confdefs.h. */
12016
12017#include <unistd.h>
12018#include <fcntl.h>
12019#include <stdio.h>
12020#include <semaphore.h>
12021#include <sys/stat.h>
12022
12023int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012024 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012025 int count;
12026 int res;
12027 if(a==SEM_FAILED){
12028 perror("sem_open");
12029 return 1;
12030
12031 }
12032 res = sem_getvalue(a, &count);
12033 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012034 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012035 return res==-1 ? 1 : 0;
12036}
12037
Mark Dickinson10683072009-04-18 21:18:19 +000012038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012039if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012040 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012041else
Matthias Kloseb9621712010-04-24 17:59:49 +000012042 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012043fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012044rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12045 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012046fi
12047
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012048
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012049fi
12050
Matthias Kloseb9621712010-04-24 17:59:49 +000012051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12052$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012053if test $ac_cv_broken_sem_getvalue = yes
12054then
12055
Matthias Kloseb9621712010-04-24 17:59:49 +000012056$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012057
12058fi
12059
Mark Dickinsonbd792642009-03-18 20:06:12 +000012060# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12062$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012063# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012064if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012065 enableval=$enable_big_digits; case $enable_big_digits in
12066yes)
12067 enable_big_digits=30 ;;
12068no)
12069 enable_big_digits=15 ;;
1207015|30)
12071 ;;
12072*)
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000012073 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 +000012074esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12076$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012077
12078cat >>confdefs.h <<_ACEOF
12079#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12080_ACEOF
12081
12082
12083else
Matthias Kloseb9621712010-04-24 17:59:49 +000012084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12085$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012086fi
12087
12088
Guido van Rossumef2255b2000-03-10 22:30:29 +000012089# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012090ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000012091if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012092
12093
Matthias Kloseb9621712010-04-24 17:59:49 +000012094$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012095
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012096 wchar_h="yes"
12097
Guido van Rossumef2255b2000-03-10 22:30:29 +000012098else
Martin v. Löwis11437992002-04-12 09:54:03 +000012099 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012100
12101fi
12102
Michael W. Hudson54241132001-12-07 15:38:26 +000012103
Martin v. Löwis11437992002-04-12 09:54:03 +000012104
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012105# determine wchar_t size
12106if test "$wchar_h" = yes
12107then
Matthias Kloseb9621712010-04-24 17:59:49 +000012108 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012109# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12110# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12111# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12113$as_echo_n "checking size of wchar_t... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000012114if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012115 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012116else
Matthias Kloseb9621712010-04-24 17:59:49 +000012117 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12118"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012119
Martin v. Löwis11437992002-04-12 09:54:03 +000012120else
Matthias Kloseb9621712010-04-24 17:59:49 +000012121 if test "$ac_cv_type_wchar_t" = yes; then
12122 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12123$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000012124{ as_fn_set_status 77
12125as_fn_error "cannot compute sizeof (wchar_t)
12126See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012127 else
12128 ac_cv_sizeof_wchar_t=0
12129 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012130fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012131
Martin v. Löwis11437992002-04-12 09:54:03 +000012132fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12134$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012135
12136
12137
Martin v. Löwis11437992002-04-12 09:54:03 +000012138cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012139#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012140_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012141
Michael W. Hudson54241132001-12-07 15:38:26 +000012142
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012143fi
12144
Matthias Kloseb9621712010-04-24 17:59:49 +000012145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12146$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012147have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012149/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012150
12151#include <tcl.h>
12152#if TCL_UTF_MAX != 6
12153# error "NOT UCS4_TCL"
12154#endif
12155int
12156main ()
12157{
12158
12159 ;
12160 return 0;
12161}
12162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012163if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012164
12165
Matthias Kloseb9621712010-04-24 17:59:49 +000012166$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012167
12168 have_ucs4_tcl=yes
12169
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12173$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012174
Skip Montanaro6dead952003-09-25 14:50:04 +000012175# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012176if test "$wchar_h" = yes
12177then
12178 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12180$as_echo_n "checking whether wchar_t is signed... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000012181 if test "${ac_cv_wchar_t_signed+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012182 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012183else
12184
Matthias Kloseb9621712010-04-24 17:59:49 +000012185 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012186 ac_cv_wchar_t_signed=yes
12187else
Matthias Kloseb9621712010-04-24 17:59:49 +000012188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012189/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012190
12191 #include <wchar.h>
12192 int main()
12193 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012194 /* Success: exit code 0 */
12195 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012196 }
12197
12198_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012199if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012200 ac_cv_wchar_t_signed=yes
12201else
Matthias Kloseb9621712010-04-24 17:59:49 +000012202 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012203fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012204rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12205 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012206fi
12207
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012208fi
12209
Matthias Kloseb9621712010-04-24 17:59:49 +000012210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12211$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012212fi
12213
Matthias Kloseb9621712010-04-24 17:59:49 +000012214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12215$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012216
12217# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012218if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012219 withval=$with_wide_unicode;
12220if test "$withval" != no
12221then unicode_size="4"
12222else unicode_size="2"
12223fi
12224
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012225else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012226
Georg Brandl52d168a2008-01-07 18:10:24 +000012227case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012228 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012229 *) unicode_size="2" ;;
12230esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012231
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012232fi
12233
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012234
12235
Georg Brandl52d168a2008-01-07 18:10:24 +000012236case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012237 4)
12238 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12239
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012240 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012241 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012242 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012243 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012244esac
12245
Michael W. Hudson54241132001-12-07 15:38:26 +000012246
Martin v. Löwis11437992002-04-12 09:54:03 +000012247
Georg Brandl52d168a2008-01-07 18:10:24 +000012248# wchar_t is only usable if it maps to an unsigned type
12249if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012250 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012251then
12252 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012253
Matthias Kloseb9621712010-04-24 17:59:49 +000012254$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012255
Matthias Kloseb9621712010-04-24 17:59:49 +000012256 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012257
Georg Brandl52d168a2008-01-07 18:10:24 +000012258elif test "$ac_cv_sizeof_short" = "$unicode_size"
12259then
12260 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012261 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012262
Georg Brandl52d168a2008-01-07 18:10:24 +000012263elif test "$ac_cv_sizeof_long" = "$unicode_size"
12264then
12265 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012266 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012267
Georg Brandl52d168a2008-01-07 18:10:24 +000012268else
12269 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012270fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12272$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012273
12274# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12276$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000012277if test "${ac_cv_c_bigendian+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012278 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012279else
Matthias Kloseb9621712010-04-24 17:59:49 +000012280 ac_cv_c_bigendian=unknown
12281 # See if we're dealing with a universal compiler.
12282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12283/* end confdefs.h. */
12284#ifndef __APPLE_CC__
12285 not a universal capable compiler
12286 #endif
12287 typedef int dummy;
12288
Skip Montanaro6dead952003-09-25 14:50:04 +000012289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012290if ac_fn_c_try_compile "$LINENO"; then :
12291
12292 # Check for potential -arch flags. It is not universal unless
12293 # there are at least two -arch flags with different values.
12294 ac_arch=
12295 ac_prev=
12296 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12297 if test -n "$ac_prev"; then
12298 case $ac_word in
12299 i?86 | x86_64 | ppc | ppc64)
12300 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12301 ac_arch=$ac_word
12302 else
12303 ac_cv_c_bigendian=universal
12304 break
12305 fi
12306 ;;
12307 esac
12308 ac_prev=
12309 elif test "x$ac_word" = "x-arch"; then
12310 ac_prev=arch
12311 fi
12312 done
12313fi
12314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12315 if test $ac_cv_c_bigendian = unknown; then
12316 # See if sys/param.h defines the BYTE_ORDER macro.
12317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012318/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012319#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012320 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012321
Martin v. Löwis11437992002-04-12 09:54:03 +000012322int
12323main ()
12324{
Matthias Kloseb9621712010-04-24 17:59:49 +000012325#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12326 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12327 && LITTLE_ENDIAN)
12328 bogus endian macros
12329 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012330
12331 ;
12332 return 0;
12333}
12334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012335if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012336 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012338/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012339#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012340 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012341
Martin v. Löwis11437992002-04-12 09:54:03 +000012342int
12343main ()
12344{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012345#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012346 not big endian
12347 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012348
12349 ;
12350 return 0;
12351}
12352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012353if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012354 ac_cv_c_bigendian=yes
12355else
Matthias Kloseb9621712010-04-24 17:59:49 +000012356 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012359fi
12360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12361 fi
12362 if test $ac_cv_c_bigendian = unknown; then
12363 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012365/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012366#include <limits.h>
12367
Martin v. Löwis11437992002-04-12 09:54:03 +000012368int
12369main ()
12370{
Matthias Kloseb9621712010-04-24 17:59:49 +000012371#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12372 bogus endian macros
12373 #endif
12374
Martin v. Löwis11437992002-04-12 09:54:03 +000012375 ;
12376 return 0;
12377}
12378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012379if ac_fn_c_try_compile "$LINENO"; then :
12380 # It does; now see whether it defined to _BIG_ENDIAN or not.
12381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12382/* end confdefs.h. */
12383#include <limits.h>
12384
12385int
12386main ()
12387{
12388#ifndef _BIG_ENDIAN
12389 not big endian
12390 #endif
12391
12392 ;
12393 return 0;
12394}
12395_ACEOF
12396if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012397 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012398else
Matthias Kloseb9621712010-04-24 17:59:49 +000012399 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012400fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12402fi
12403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12404 fi
12405 if test $ac_cv_c_bigendian = unknown; then
12406 # Compile a test program.
12407 if test "$cross_compiling" = yes; then :
12408 # Try to guess by grepping values from an object file.
12409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12410/* end confdefs.h. */
12411short int ascii_mm[] =
12412 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12413 short int ascii_ii[] =
12414 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12415 int use_ascii (int i) {
12416 return ascii_mm[i] + ascii_ii[i];
12417 }
12418 short int ebcdic_ii[] =
12419 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12420 short int ebcdic_mm[] =
12421 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12422 int use_ebcdic (int i) {
12423 return ebcdic_mm[i] + ebcdic_ii[i];
12424 }
12425 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012426
Matthias Kloseb9621712010-04-24 17:59:49 +000012427int
12428main ()
12429{
12430return use_ascii (foo) == use_ebcdic (foo);
12431 ;
12432 return 0;
12433}
12434_ACEOF
12435if ac_fn_c_try_compile "$LINENO"; then :
12436 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12437 ac_cv_c_bigendian=yes
12438 fi
12439 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12440 if test "$ac_cv_c_bigendian" = unknown; then
12441 ac_cv_c_bigendian=no
12442 else
12443 # finding both strings is unlikely to happen, but who knows?
12444 ac_cv_c_bigendian=unknown
12445 fi
12446 fi
12447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012449else
Matthias Kloseb9621712010-04-24 17:59:49 +000012450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012451/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012452$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012453int
12454main ()
12455{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012456
Matthias Kloseb9621712010-04-24 17:59:49 +000012457 /* Are we little or big endian? From Harbison&Steele. */
12458 union
12459 {
12460 long int l;
12461 char c[sizeof (long int)];
12462 } u;
12463 u.l = 1;
12464 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012465
12466 ;
12467 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012468}
Martin v. Löwis11437992002-04-12 09:54:03 +000012469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012470if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012471 ac_cv_c_bigendian=no
12472else
Matthias Kloseb9621712010-04-24 17:59:49 +000012473 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012474fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012475rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12476 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012477fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012478
Matthias Kloseb9621712010-04-24 17:59:49 +000012479 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012480fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12482$as_echo "$ac_cv_c_bigendian" >&6; }
12483 case $ac_cv_c_bigendian in #(
12484 yes)
12485 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12486;; #(
12487 no)
12488 ;; #(
12489 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012490
Matthias Kloseb9621712010-04-24 17:59:49 +000012491$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012492
Matthias Kloseb9621712010-04-24 17:59:49 +000012493 ;; #(
12494 *)
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000012495 as_fn_error "unknown endianness
Antoine Pitrouc2244582011-01-02 19:34:03 +000012496 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012497 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012498
Michael W. Hudson54241132001-12-07 15:38:26 +000012499
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012500# ABI version string for Python extension modules. This appears between the
12501# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12502# from the following attributes which affect the ABI of this Python build (in
12503# this order):
12504#
12505# * The Python implementation (always 'cpython-' for us)
12506# * The major and minor version numbers
12507# * --with-pydebug (adds a 'd')
12508# * --with-pymalloc (adds a 'm')
12509# * --with-wide-unicode (adds a 'u')
12510#
12511# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012512# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12513# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012514
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12516$as_echo_n "checking ABIFLAGS... " >&6; }
12517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12518$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12520$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012521SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12523$as_echo "$SOABI" >&6; }
12524
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12526$as_echo_n "checking LDVERSION... " >&6; }
12527LDVERSION='$(VERSION)$(ABIFLAGS)'
12528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12529$as_echo "$LDVERSION" >&6; }
12530
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012531# SO is the extension of shared libraries `(including the dot!)
12532# -- usually .so, .sl on HP-UX, .dll on Cygwin
12533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12534$as_echo_n "checking SO... " >&6; }
12535if test -z "$SO"
12536then
12537 case $ac_sys_system in
12538 hp*|HP*)
12539 case `uname -m` in
12540 ia64) SO=.so;;
12541 *) SO=.sl;;
12542 esac
12543 ;;
12544 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012545 Linux*|GNU*)
12546 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012547 *) SO=.so;;
12548 esac
12549else
12550 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012551 echo
12552 echo '====================================================================='
12553 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012554 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012555 echo '+ Do you really mean to change the extension for shared libraries? +'
12556 echo '+ Continuing in 10 seconds to let you to ponder. +'
12557 echo '+ +'
12558 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012559 sleep 10
12560fi
12561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12562$as_echo "$SO" >&6; }
12563
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012564# Check whether right shifting a negative integer extends the sign bit
12565# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12567$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000012568if test "${ac_cv_rshift_extends_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012569 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012570else
Martin v. Löwis11437992002-04-12 09:54:03 +000012571
Matthias Kloseb9621712010-04-24 17:59:49 +000012572if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012573 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012574else
Matthias Kloseb9621712010-04-24 17:59:49 +000012575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012576/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012577
12578int main()
12579{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012580 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012581}
12582
Martin v. Löwis11437992002-04-12 09:54:03 +000012583_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012584if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012585 ac_cv_rshift_extends_sign=yes
12586else
Matthias Kloseb9621712010-04-24 17:59:49 +000012587 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012588fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012589rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12590 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012591fi
12592
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012593fi
12594
Matthias Kloseb9621712010-04-24 17:59:49 +000012595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12596$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012597if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012598then
Martin v. Löwis11437992002-04-12 09:54:03 +000012599
Matthias Kloseb9621712010-04-24 17:59:49 +000012600$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012601
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012602fi
12603
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012604# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12606$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000012607if test "${ac_cv_have_getc_unlocked+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012608 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012609else
Martin v. Löwis11437992002-04-12 09:54:03 +000012610
Matthias Kloseb9621712010-04-24 17:59:49 +000012611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012612/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012613#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012614int
12615main ()
12616{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012617
12618 FILE *f = fopen("/dev/null", "r");
12619 flockfile(f);
12620 getc_unlocked(f);
12621 funlockfile(f);
12622
Martin v. Löwis11437992002-04-12 09:54:03 +000012623 ;
12624 return 0;
12625}
12626_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012627if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012628 ac_cv_have_getc_unlocked=yes
12629else
Matthias Kloseb9621712010-04-24 17:59:49 +000012630 ac_cv_have_getc_unlocked=no
12631fi
12632rm -f core conftest.err conftest.$ac_objext \
12633 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012634fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012635
Matthias Kloseb9621712010-04-24 17:59:49 +000012636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12637$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012638if test "$ac_cv_have_getc_unlocked" = yes
12639then
Martin v. Löwis11437992002-04-12 09:54:03 +000012640
Matthias Kloseb9621712010-04-24 17:59:49 +000012641$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012642
12643fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012644
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012645# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012646# save the value of LIBS so we don't actually link Python with readline
12647LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012648
Gregory P. Smith18820942008-09-07 06:24:49 +000012649# On some systems we need to link readline to a termcap compatible
12650# library. NOTE: Keep the precedence of listed libraries synchronised
12651# with setup.py.
12652py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12654$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012655for py_libtermcap in "" ncursesw ncurses curses termcap; do
12656 if test -z "$py_libtermcap"; then
12657 READLINE_LIBS="-lreadline"
12658 else
12659 READLINE_LIBS="-lreadline -l$py_libtermcap"
12660 fi
12661 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012663/* end confdefs.h. */
12664
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012665/* Override any GCC internal prototype to avoid an error.
12666 Use char because int might match the return type of a GCC
12667 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012668#ifdef __cplusplus
12669extern "C"
12670#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012671char readline ();
12672int
12673main ()
12674{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012675return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012676 ;
12677 return 0;
12678}
12679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012680if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012681 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012682fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012683rm -f core conftest.err conftest.$ac_objext \
12684 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012685 if test $py_cv_lib_readline = yes; then
12686 break
12687 fi
12688done
12689# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12690#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012691if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12693$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012694else
Matthias Kloseb9621712010-04-24 17:59:49 +000012695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12696$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012697
Matthias Kloseb9621712010-04-24 17:59:49 +000012698$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012699
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012700fi
12701
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012702# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12704$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000012705if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012706 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012707else
12708 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012709LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012711/* end confdefs.h. */
12712
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012713/* Override any GCC internal prototype to avoid an error.
12714 Use char because int might match the return type of a GCC
12715 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012716#ifdef __cplusplus
12717extern "C"
12718#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012719char rl_callback_handler_install ();
12720int
12721main ()
12722{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012723return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012724 ;
12725 return 0;
12726}
12727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012728if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012729 ac_cv_lib_readline_rl_callback_handler_install=yes
12730else
Matthias Kloseb9621712010-04-24 17:59:49 +000012731 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012732fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012733rm -f core conftest.err conftest.$ac_objext \
12734 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012735LIBS=$ac_check_lib_save_LIBS
12736fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12738$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000012739if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012740
Matthias Kloseb9621712010-04-24 17:59:49 +000012741$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012742
12743fi
12744
12745
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012746# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012748/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012749#include <readline/readline.h>
12750_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012751if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012752 have_readline=yes
12753else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012754 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012755
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012756fi
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000012757rm -f conftest.err conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012758if test $have_readline = yes
12759then
Matthias Kloseb9621712010-04-24 17:59:49 +000012760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012761/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012762#include <readline/readline.h>
12763
12764_ACEOF
12765if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012766 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012767
Matthias Kloseb9621712010-04-24 17:59:49 +000012768$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012769
12770fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012771rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012772
Matthias Kloseb9621712010-04-24 17:59:49 +000012773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012774/* end confdefs.h. */
12775#include <readline/readline.h>
12776
12777_ACEOF
12778if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012779 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012780
Matthias Kloseb9621712010-04-24 17:59:49 +000012781$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012782
12783fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012784rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012785
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012786fi
12787
Martin v. Löwis0daad592001-09-30 21:09:59 +000012788# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12790$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000012791if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012792 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012793else
Martin v. Löwis11437992002-04-12 09:54:03 +000012794 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012795LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012797/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012798
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012799/* Override any GCC internal prototype to avoid an error.
12800 Use char because int might match the return type of a GCC
12801 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012802#ifdef __cplusplus
12803extern "C"
12804#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012805char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012806int
12807main ()
12808{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012809return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012810 ;
12811 return 0;
12812}
12813_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012814if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012815 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012816else
Matthias Kloseb9621712010-04-24 17:59:49 +000012817 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012818fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012819rm -f core conftest.err conftest.$ac_objext \
12820 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012821LIBS=$ac_check_lib_save_LIBS
12822fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12824$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000012825if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012826
Matthias Kloseb9621712010-04-24 17:59:49 +000012827$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012828
Martin v. Löwis0daad592001-09-30 21:09:59 +000012829fi
12830
Michael W. Hudson54241132001-12-07 15:38:26 +000012831
Thomas Wouters89d996e2007-09-08 17:39:28 +000012832# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12834$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000012835if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012836 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012837else
12838 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012839LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012841/* end confdefs.h. */
12842
12843/* Override any GCC internal prototype to avoid an error.
12844 Use char because int might match the return type of a GCC
12845 builtin and then its argument prototype would still apply. */
12846#ifdef __cplusplus
12847extern "C"
12848#endif
12849char rl_completion_display_matches_hook ();
12850int
12851main ()
12852{
12853return rl_completion_display_matches_hook ();
12854 ;
12855 return 0;
12856}
12857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012858if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012859 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12860else
Matthias Kloseb9621712010-04-24 17:59:49 +000012861 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012862fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012863rm -f core conftest.err conftest.$ac_objext \
12864 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012865LIBS=$ac_check_lib_save_LIBS
12866fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12868$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000012869if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012870
Matthias Kloseb9621712010-04-24 17:59:49 +000012871$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012872
12873fi
12874
12875
Martin v. Löwis0daad592001-09-30 21:09:59 +000012876# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12878$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000012879if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012880 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012881else
Martin v. Löwis11437992002-04-12 09:54:03 +000012882 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012883LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012885/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012886
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012887/* Override any GCC internal prototype to avoid an error.
12888 Use char because int might match the return type of a GCC
12889 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012890#ifdef __cplusplus
12891extern "C"
12892#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012893char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012894int
12895main ()
12896{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012897return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012898 ;
12899 return 0;
12900}
12901_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012902if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012903 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012904else
Matthias Kloseb9621712010-04-24 17:59:49 +000012905 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012906fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012907rm -f core conftest.err conftest.$ac_objext \
12908 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012909LIBS=$ac_check_lib_save_LIBS
12910fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12912$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000012913if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012914
Matthias Kloseb9621712010-04-24 17:59:49 +000012915$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012916
Guido van Rossum353ae582001-07-10 16:45:32 +000012917fi
12918
Jack Jansendd19cf82001-12-06 22:36:17 +000012919
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012920# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012922/* end confdefs.h. */
12923#include <readline/readline.h>
12924_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012925if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012926 have_readline=yes
12927else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012928 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012929
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012930fi
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000012931rm -f conftest.err conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012932if test $have_readline = yes
12933then
Matthias Kloseb9621712010-04-24 17:59:49 +000012934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012935/* end confdefs.h. */
12936#include <readline/readline.h>
12937
12938_ACEOF
12939if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012940 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012941
Matthias Kloseb9621712010-04-24 17:59:49 +000012942$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012943
12944fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012945rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012946
12947fi
12948
Martin v. Löwis82bca632006-02-10 20:49:30 +000012949# End of readline checks: restore LIBS
12950LIBS=$LIBS_no_readline
12951
Matthias Kloseb9621712010-04-24 17:59:49 +000012952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
12953$as_echo_n "checking for broken nice()... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000012954if test "${ac_cv_broken_nice+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012955 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012956else
Martin v. Löwis11437992002-04-12 09:54:03 +000012957
Matthias Kloseb9621712010-04-24 17:59:49 +000012958if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012959 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012960else
Matthias Kloseb9621712010-04-24 17:59:49 +000012961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012962/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012963
12964int main()
12965{
12966 int val1 = nice(1);
12967 if (val1 != -1 && val1 == nice(2))
12968 exit(0);
12969 exit(1);
12970}
12971
Martin v. Löwis11437992002-04-12 09:54:03 +000012972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012973if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012974 ac_cv_broken_nice=yes
12975else
Matthias Kloseb9621712010-04-24 17:59:49 +000012976 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012977fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012978rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12979 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012980fi
12981
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012982fi
12983
Matthias Kloseb9621712010-04-24 17:59:49 +000012984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
12985$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012986if test "$ac_cv_broken_nice" = yes
12987then
Martin v. Löwis11437992002-04-12 09:54:03 +000012988
Matthias Kloseb9621712010-04-24 17:59:49 +000012989$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012990
12991fi
12992
Matthias Kloseb9621712010-04-24 17:59:49 +000012993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
12994$as_echo_n "checking for broken poll()... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000012995if test "${ac_cv_broken_poll+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012996 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012997else
Matthias Kloseb9621712010-04-24 17:59:49 +000012998 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012999 ac_cv_broken_poll=no
13000else
Matthias Kloseb9621712010-04-24 17:59:49 +000013001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013002/* end confdefs.h. */
13003
13004#include <poll.h>
13005
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013006int main()
13007{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013008 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013009 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013010
13011 close (42);
13012
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013013 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013014 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013015 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013016 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013017 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013018 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013019 return 1;
13020}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013021
13022_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013023if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013024 ac_cv_broken_poll=yes
13025else
Matthias Kloseb9621712010-04-24 17:59:49 +000013026 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013027fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013028rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13029 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013030fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013031
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013032fi
13033
Matthias Kloseb9621712010-04-24 17:59:49 +000013034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13035$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013036if test "$ac_cv_broken_poll" = yes
13037then
13038
Matthias Kloseb9621712010-04-24 17:59:49 +000013039$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013040
13041fi
13042
Brett Cannon43802422005-02-10 20:48:03 +000013043# 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 +000013044# (which is not required by ISO C or UNIX spec) and/or if we support
13045# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013046ac_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 +000013047#include <$ac_cv_struct_tm>
13048
Matthias Kloseb9621712010-04-24 17:59:49 +000013049"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000013050if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013051
13052cat >>confdefs.h <<_ACEOF
13053#define HAVE_STRUCT_TM_TM_ZONE 1
13054_ACEOF
13055
13056
13057fi
13058
13059if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13060
Matthias Kloseb9621712010-04-24 17:59:49 +000013061$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013062
13063else
Matthias Kloseb9621712010-04-24 17:59:49 +000013064 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13065"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000013066if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013067 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013068else
Matthias Kloseb9621712010-04-24 17:59:49 +000013069 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013070fi
13071
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013072cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013073#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013074_ACEOF
13075
Matthias Kloseb9621712010-04-24 17:59:49 +000013076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13077$as_echo_n "checking for tzname... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000013078if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013079 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013080else
Matthias Kloseb9621712010-04-24 17:59:49 +000013081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013082/* end confdefs.h. */
13083#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013084#if !HAVE_DECL_TZNAME
13085extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013086#endif
13087
13088int
13089main ()
13090{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013091return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013092 ;
13093 return 0;
13094}
13095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013096if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013097 ac_cv_var_tzname=yes
13098else
Matthias Kloseb9621712010-04-24 17:59:49 +000013099 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013100fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013101rm -f core conftest.err conftest.$ac_objext \
13102 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013103fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13105$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013106 if test $ac_cv_var_tzname = yes; then
13107
Matthias Kloseb9621712010-04-24 17:59:49 +000013108$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013109
13110 fi
13111fi
13112
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013113
Martin v. Löwis1d459062005-03-14 21:23:33 +000013114# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13116$as_echo_n "checking for working tzset()... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000013117if test "${ac_cv_working_tzset+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013118 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013119else
13120
Matthias Kloseb9621712010-04-24 17:59:49 +000013121if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013122 ac_cv_working_tzset=no
13123else
Matthias Kloseb9621712010-04-24 17:59:49 +000013124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013125/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013126
13127#include <stdlib.h>
13128#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013129#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013130
13131#if HAVE_TZNAME
13132extern char *tzname[];
13133#endif
13134
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013135int main()
13136{
Brett Cannon18367812003-09-19 00:59:16 +000013137 /* Note that we need to ensure that not only does tzset(3)
13138 do 'something' with localtime, but it works as documented
13139 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013140 This includes making sure that tzname is set properly if
13141 tm->tm_zone does not exist since it is the alternative way
13142 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013143
13144 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013145 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013146 */
13147
Martin v. Löwis1d459062005-03-14 21:23:33 +000013148 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013149 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13150
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013151 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013152 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013153 if (localtime(&groundhogday)->tm_hour != 0)
13154 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013155#if HAVE_TZNAME
13156 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13157 if (strcmp(tzname[0], "UTC") ||
13158 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13159 exit(1);
13160#endif
Brett Cannon18367812003-09-19 00:59:16 +000013161
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013162 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013163 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013164 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013165 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013166#if HAVE_TZNAME
13167 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13168 exit(1);
13169#endif
Brett Cannon18367812003-09-19 00:59:16 +000013170
13171 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13172 tzset();
13173 if (localtime(&groundhogday)->tm_hour != 11)
13174 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013175#if HAVE_TZNAME
13176 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13177 exit(1);
13178#endif
13179
13180#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013181 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13182 exit(1);
13183 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13184 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013185#endif
Brett Cannon18367812003-09-19 00:59:16 +000013186
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013187 exit(0);
13188}
13189
13190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013191if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013192 ac_cv_working_tzset=yes
13193else
Matthias Kloseb9621712010-04-24 17:59:49 +000013194 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013195fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013196rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13197 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013198fi
13199
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013200fi
13201
Matthias Kloseb9621712010-04-24 17:59:49 +000013202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13203$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013204if test "$ac_cv_working_tzset" = yes
13205then
13206
Matthias Kloseb9621712010-04-24 17:59:49 +000013207$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013208
13209fi
13210
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013211# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13213$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000013214if test "${ac_cv_stat_tv_nsec+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013215 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013216else
Matthias Kloseb9621712010-04-24 17:59:49 +000013217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013218/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013219#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013220int
13221main ()
13222{
13223
13224struct stat st;
13225st.st_mtim.tv_nsec = 1;
13226
13227 ;
13228 return 0;
13229}
13230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013231if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013232 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013233else
Matthias Kloseb9621712010-04-24 17:59:49 +000013234 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013235fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13237fi
13238
Matthias Kloseb9621712010-04-24 17:59:49 +000013239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13240$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013241if test "$ac_cv_stat_tv_nsec" = yes
13242then
13243
Matthias Kloseb9621712010-04-24 17:59:49 +000013244$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013245
13246fi
13247
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013248# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13250$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000013251if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013252 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013253else
Matthias Kloseb9621712010-04-24 17:59:49 +000013254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013255/* end confdefs.h. */
13256#include <sys/stat.h>
13257int
13258main ()
13259{
13260
13261struct stat st;
13262st.st_mtimespec.tv_nsec = 1;
13263
13264 ;
13265 return 0;
13266}
13267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013268if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013269 ac_cv_stat_tv_nsec2=yes
13270else
Matthias Kloseb9621712010-04-24 17:59:49 +000013271 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13274fi
13275
Matthias Kloseb9621712010-04-24 17:59:49 +000013276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13277$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013278if test "$ac_cv_stat_tv_nsec2" = yes
13279then
13280
Matthias Kloseb9621712010-04-24 17:59:49 +000013281$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013282
13283fi
13284
Jack Jansen666b1e72001-10-31 12:11:48 +000013285# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13287$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000013288if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013289 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013290else
Matthias Kloseb9621712010-04-24 17:59:49 +000013291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013292/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013293#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013294int
13295main ()
13296{
Jack Jansen666b1e72001-10-31 12:11:48 +000013297
13298 int rtn;
13299 rtn = mvwdelch(0,0,0);
13300
Martin v. Löwis11437992002-04-12 09:54:03 +000013301 ;
13302 return 0;
13303}
13304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013305if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013306 ac_cv_mvwdelch_is_expression=yes
13307else
Matthias Kloseb9621712010-04-24 17:59:49 +000013308 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013309fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13311fi
13312
Matthias Kloseb9621712010-04-24 17:59:49 +000013313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13314$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013315
13316if test "$ac_cv_mvwdelch_is_expression" = yes
13317then
Martin v. Löwis11437992002-04-12 09:54:03 +000013318
Matthias Kloseb9621712010-04-24 17:59:49 +000013319$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013320
13321fi
13322
Matthias Kloseb9621712010-04-24 17:59:49 +000013323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13324$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000013325if test "${ac_cv_window_has_flags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013326 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013327else
Matthias Kloseb9621712010-04-24 17:59:49 +000013328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013329/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013330#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013331int
13332main ()
13333{
Jack Jansen666b1e72001-10-31 12:11:48 +000013334
13335 WINDOW *w;
13336 w->_flags = 0;
13337
Martin v. Löwis11437992002-04-12 09:54:03 +000013338 ;
13339 return 0;
13340}
13341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013342if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013343 ac_cv_window_has_flags=yes
13344else
Matthias Kloseb9621712010-04-24 17:59:49 +000013345 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013346fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13348fi
13349
Matthias Kloseb9621712010-04-24 17:59:49 +000013350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13351$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013352
Jack Jansen666b1e72001-10-31 12:11:48 +000013353
13354if test "$ac_cv_window_has_flags" = yes
13355then
Martin v. Löwis11437992002-04-12 09:54:03 +000013356
Matthias Kloseb9621712010-04-24 17:59:49 +000013357$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013358
13359fi
13360
Matthias Kloseb9621712010-04-24 17:59:49 +000013361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13362$as_echo_n "checking for is_term_resized... " >&6; }
13363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013364/* end confdefs.h. */
13365#include <curses.h>
13366int
13367main ()
13368{
13369void *x=is_term_resized
13370 ;
13371 return 0;
13372}
13373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013374if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013375
Matthias Kloseb9621712010-04-24 17:59:49 +000013376$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013377
Matthias Kloseb159a552010-04-25 21:00:44 +000013378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013379$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013380else
Matthias Kloseb9621712010-04-24 17:59:49 +000013381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13382$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013383
13384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13386
Matthias Kloseb9621712010-04-24 17:59:49 +000013387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13388$as_echo_n "checking for resize_term... " >&6; }
13389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013390/* end confdefs.h. */
13391#include <curses.h>
13392int
13393main ()
13394{
13395void *x=resize_term
13396 ;
13397 return 0;
13398}
13399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013400if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013401
Matthias Kloseb9621712010-04-24 17:59:49 +000013402$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013403
Matthias Kloseb159a552010-04-25 21:00:44 +000013404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013405$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013406else
Matthias Kloseb9621712010-04-24 17:59:49 +000013407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13408$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013409
13410fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13412
Matthias Kloseb9621712010-04-24 17:59:49 +000013413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13414$as_echo_n "checking for resizeterm... " >&6; }
13415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013416/* end confdefs.h. */
13417#include <curses.h>
13418int
13419main ()
13420{
13421void *x=resizeterm
13422 ;
13423 return 0;
13424}
13425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013426if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013427
Matthias Kloseb9621712010-04-24 17:59:49 +000013428$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013429
Matthias Kloseb159a552010-04-25 21:00:44 +000013430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013431$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013432else
Matthias Kloseb9621712010-04-24 17:59:49 +000013433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13434$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013435
13436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13438
Matthias Kloseb9621712010-04-24 17:59:49 +000013439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13440$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013441
13442if test -r /dev/ptmx
13443then
Matthias Kloseb9621712010-04-24 17:59:49 +000013444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13445$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013446
Matthias Kloseb9621712010-04-24 17:59:49 +000013447$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013448
Thomas Wouters89f507f2006-12-13 04:49:30 +000013449else
Matthias Kloseb9621712010-04-24 17:59:49 +000013450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13451$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013452fi
13453
Matthias Kloseb9621712010-04-24 17:59:49 +000013454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13455$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013456
13457if test -r /dev/ptc
13458then
Matthias Kloseb9621712010-04-24 17:59:49 +000013459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13460$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013461
Matthias Kloseb9621712010-04-24 17:59:49 +000013462$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013463
Thomas Wouters89f507f2006-12-13 04:49:30 +000013464else
Matthias Kloseb9621712010-04-24 17:59:49 +000013465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13466$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013467fi
13468
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013469if test "$have_long_long" = yes
13470then
Matthias Kloseb9621712010-04-24 17:59:49 +000013471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13472$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000013473 if test "${ac_cv_have_long_long_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013474 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013475else
Matthias Kloseb9621712010-04-24 17:59:49 +000013476 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013477 ac_cv_have_long_long_format=no
13478else
Matthias Kloseb9621712010-04-24 17:59:49 +000013479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013480/* end confdefs.h. */
13481
13482 #include <stdio.h>
13483 #include <stddef.h>
13484 #include <string.h>
13485
13486 #ifdef HAVE_SYS_TYPES_H
13487 #include <sys/types.h>
13488 #endif
13489
13490 int main()
13491 {
13492 char buffer[256];
13493
13494 if (sprintf(buffer, "%lld", (long long)123) < 0)
13495 return 1;
13496 if (strcmp(buffer, "123"))
13497 return 1;
13498
13499 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13500 return 1;
13501 if (strcmp(buffer, "-123"))
13502 return 1;
13503
13504 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13505 return 1;
13506 if (strcmp(buffer, "123"))
13507 return 1;
13508
13509 return 0;
13510 }
13511
13512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013513if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013514 ac_cv_have_long_long_format=yes
13515else
Matthias Kloseb9621712010-04-24 17:59:49 +000013516 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013517fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013518rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13519 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013520fi
13521
13522
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013523fi
13524
Matthias Kloseb9621712010-04-24 17:59:49 +000013525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13526$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013527fi
13528
Mark Dickinson89d7d412009-12-31 20:50:59 +000013529if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013530then
13531
Matthias Kloseb9621712010-04-24 17:59:49 +000013532$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013533
13534fi
13535
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013536if test $ac_sys_system = Darwin
13537then
13538 LIBS="$LIBS -framework CoreFoundation"
13539fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013540
Matthias Kloseb9621712010-04-24 17:59:49 +000013541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13542$as_echo_n "checking for %zd printf() format support... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000013543if test "${ac_cv_have_size_t_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013544 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013545else
Matthias Kloseb9621712010-04-24 17:59:49 +000013546 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013547 ac_cv_have_size_t_format="cross -- assuming yes"
13548
Thomas Wouters477c8d52006-05-27 19:21:47 +000013549else
Matthias Kloseb9621712010-04-24 17:59:49 +000013550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013551/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013552
Thomas Wouters477c8d52006-05-27 19:21:47 +000013553#include <stdio.h>
13554#include <stddef.h>
13555#include <string.h>
13556
Christian Heimes2c181612007-12-17 20:04:13 +000013557#ifdef HAVE_SYS_TYPES_H
13558#include <sys/types.h>
13559#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013560
13561#ifdef HAVE_SSIZE_T
13562typedef ssize_t Py_ssize_t;
13563#elif SIZEOF_VOID_P == SIZEOF_LONG
13564typedef long Py_ssize_t;
13565#else
13566typedef int Py_ssize_t;
13567#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013568
Christian Heimes2c181612007-12-17 20:04:13 +000013569int main()
13570{
13571 char buffer[256];
13572
Thomas Wouters477c8d52006-05-27 19:21:47 +000013573 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13574 return 1;
13575
Thomas Wouters89f507f2006-12-13 04:49:30 +000013576 if (strcmp(buffer, "123"))
13577 return 1;
13578
13579 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13580 return 1;
13581
13582 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013583 return 1;
13584
13585 return 0;
13586}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013587
Thomas Wouters477c8d52006-05-27 19:21:47 +000013588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013589if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013590 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013591else
Matthias Kloseb9621712010-04-24 17:59:49 +000013592 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013593fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013594rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13595 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013596fi
13597
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013598fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13600$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013601if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013602
Matthias Kloseb9621712010-04-24 17:59:49 +000013603$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013604
13605fi
13606
Matthias Kloseb9621712010-04-24 17:59:49 +000013607ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013608#ifdef HAVE_SYS_TYPES_H
13609#include <sys/types.h>
13610#endif
13611#ifdef HAVE_SYS_SOCKET_H
13612#include <sys/socket.h>
13613#endif
13614
Matthias Kloseb9621712010-04-24 17:59:49 +000013615"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000013616if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013617
Martin v. Löwis11437992002-04-12 09:54:03 +000013618else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013619
Matthias Kloseb9621712010-04-24 17:59:49 +000013620$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013621
13622fi
13623
Michael W. Hudson54241132001-12-07 15:38:26 +000013624
Matthias Kloseb9621712010-04-24 17:59:49 +000013625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13626$as_echo_n "checking for broken mbstowcs... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000013627if test "${ac_cv_broken_mbstowcs+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013628 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013629else
Matthias Kloseb9621712010-04-24 17:59:49 +000013630 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013631 ac_cv_broken_mbstowcs=no
13632else
Matthias Kloseb9621712010-04-24 17:59:49 +000013633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013634/* end confdefs.h. */
13635
13636#include<stdlib.h>
13637int main() {
13638 size_t len = -1;
13639 const char *str = "text";
13640 len = mbstowcs(NULL, str, 0);
13641 return (len != 4);
13642}
13643
13644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013645if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013646 ac_cv_broken_mbstowcs=no
13647else
Matthias Kloseb9621712010-04-24 17:59:49 +000013648 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013649fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013650rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13651 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013652fi
13653
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013654fi
13655
Matthias Kloseb9621712010-04-24 17:59:49 +000013656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13657$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013658if test "$ac_cv_broken_mbstowcs" = yes
13659then
13660
Matthias Kloseb9621712010-04-24 17:59:49 +000013661$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013662
13663fi
13664
Antoine Pitrou042b1282010-08-13 21:15:58 +000013665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13666$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000013667if test "${ac_cv_computed_gotos+set}" = set; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013668 $as_echo_n "(cached) " >&6
13669else
13670 if test "$cross_compiling" = yes; then :
13671 ac_cv_computed_gotos=no
13672else
13673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13674/* end confdefs.h. */
13675
13676int main(int argc, char **argv)
13677{
13678 static void *targets[1] = { &&LABEL1 };
13679 goto LABEL2;
13680LABEL1:
13681 return 0;
13682LABEL2:
13683 goto *targets[0];
13684 return 1;
13685}
13686
13687_ACEOF
13688if ac_fn_c_try_run "$LINENO"; then :
13689 ac_cv_computed_gotos=yes
13690else
13691 ac_cv_computed_gotos=no
13692fi
13693rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13694 conftest.$ac_objext conftest.beam conftest.$ac_ext
13695fi
13696
13697fi
13698
13699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13700$as_echo "$ac_cv_computed_gotos" >&6; }
13701if test "$ac_cv_computed_gotos" = yes
13702then
13703
13704$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13705
13706fi
13707
Antoine Pitroub52ec782009-01-25 16:34:23 +000013708# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13710$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013711
13712# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013713if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013714 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013715if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013716then
13717
Matthias Kloseb9621712010-04-24 17:59:49 +000013718$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013719
Matthias Kloseb9621712010-04-24 17:59:49 +000013720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13721$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013722fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013723if test "$withval" = no
13724then
13725
13726$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13727
Matthias Kloseb9621712010-04-24 17:59:49 +000013728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13729$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013730fi
13731
Antoine Pitrou042b1282010-08-13 21:15:58 +000013732else
13733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13734$as_echo "no value specified" >&6; }
13735fi
13736
Antoine Pitroub52ec782009-01-25 16:34:23 +000013737
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013738case $ac_sys_system in
13739AIX*)
13740
13741$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13742 ;;
13743esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013744
Michael W. Hudson54241132001-12-07 15:38:26 +000013745
Jesus Cea6a792292010-05-03 21:18:48 +000013746case $ac_sys_system in
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000013747 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 +000013748esac
13749
Gregory P. Smith138fa432010-12-13 08:00:52 +000013750ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000013751if test "x$ac_cv_func_pipe2" = x""yes; then :
Gregory P. Smith138fa432010-12-13 08:00:52 +000013752
13753$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
13754
13755fi
Jesus Cea6a792292010-05-03 21:18:48 +000013756
13757
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013758
13759
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013760for h in `(cd $srcdir;echo Python/thread_*.h)`
13761do
13762 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13763done
13764
Michael W. Hudson54241132001-12-07 15:38:26 +000013765
Neal Norwitzd24499d2005-12-18 21:36:39 +000013766SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13768$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013769for dir in $SRCDIRS; do
13770 if test ! -d $dir; then
13771 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013772 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013773done
Matthias Kloseb9621712010-04-24 17:59:49 +000013774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13775$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013776
Guido van Rossum627b2d71993-12-24 10:39:16 +000013777# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013778ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013779
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013780ac_config_files="$ac_config_files Modules/ld_so_aix"
13781
Martin v. Löwis11437992002-04-12 09:54:03 +000013782cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013783# This file is a shell script that caches the results of configure
13784# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013785# scripts and configure runs, see configure's option --config-cache.
13786# It is not useful on other systems. If it contains results you don't
13787# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013788#
Martin v. Löwis11437992002-04-12 09:54:03 +000013789# config.status only pays attention to the cache file if you give it
13790# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013791#
Skip Montanaro6dead952003-09-25 14:50:04 +000013792# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013793# loading this file, other *unset* `ac_cv_foo' will be assigned the
13794# following values.
13795
13796_ACEOF
13797
Guido van Rossumf78abae1997-01-21 22:02:36 +000013798# The following way of writing the cache mishandles newlines in values,
13799# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013800# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013801# Ultrix sh set writes to stderr and can't be redirected directly,
13802# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013803(
13804 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13805 eval ac_val=\$$ac_var
13806 case $ac_val in #(
13807 *${as_nl}*)
13808 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013809 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13810$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013811 esac
13812 case $ac_var in #(
13813 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013814 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13815 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013816 esac ;;
13817 esac
13818 done
13819
Martin v. Löwis11437992002-04-12 09:54:03 +000013820 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013821 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13822 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013823 # `set' does not quote correctly, so add quotes: double-quote
13824 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013825 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013826 "s/'/'\\\\''/g;
13827 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013828 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013829 *)
13830 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013831 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013832 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013833 esac |
13834 sort
13835) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013836 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013837 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013838 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013839 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013840 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13841 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013842 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13843 :end' >>confcache
13844if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13845 if test -w "$cache_file"; then
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000013846 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013847 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13848$as_echo "$as_me: updating cache $cache_file" >&6;}
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000013849 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013850 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013851 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13852$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013853 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013854fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013855rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013856
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013857test "x$prefix" = xNONE && prefix=$ac_default_prefix
13858# Let make expand exec_prefix.
13859test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013860
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013861DEFS=-DHAVE_CONFIG_H
13862
Skip Montanaro6dead952003-09-25 14:50:04 +000013863ac_libobjs=
13864ac_ltlibobjs=
13865for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13866 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013867 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013868 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013869 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13870 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013871 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13872 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013873done
13874LIBOBJS=$ac_libobjs
13875
13876LTLIBOBJS=$ac_ltlibobjs
13877
13878
Martin v. Löwis11437992002-04-12 09:54:03 +000013879
Matthias Kloseb9621712010-04-24 17:59:49 +000013880
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000013881: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013882ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013883ac_clean_files_save=$ac_clean_files
13884ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013885{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13886$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13887as_write_fail=0
13888cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013889#! $SHELL
13890# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013891# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013892# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013893# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013894
Martin v. Löwis11437992002-04-12 09:54:03 +000013895debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013896ac_cs_recheck=false
13897ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013898
Matthias Kloseb9621712010-04-24 17:59:49 +000013899SHELL=\${CONFIG_SHELL-$SHELL}
13900export SHELL
13901_ASEOF
13902cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13903## -------------------- ##
13904## M4sh Initialization. ##
13905## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013906
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013907# Be more Bourne compatible
13908DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013909if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013910 emulate sh
13911 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013912 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013913 # is contrary to our usage. Disable this feature.
13914 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013915 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013916else
Matthias Kloseb9621712010-04-24 17:59:49 +000013917 case `(set -o) 2>/dev/null` in #(
13918 *posix*) :
13919 set -o posix ;; #(
13920 *) :
13921 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013922esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013923fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013924
13925
Matthias Kloseb9621712010-04-24 17:59:49 +000013926as_nl='
13927'
13928export as_nl
13929# Printing a long string crashes Solaris 7 /usr/bin/printf.
13930as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13931as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13932as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13933# Prefer a ksh shell builtin over an external printf program on Solaris,
13934# but without wasting forks for bash or zsh.
13935if test -z "$BASH_VERSION$ZSH_VERSION" \
13936 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13937 as_echo='print -r --'
13938 as_echo_n='print -rn --'
13939elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13940 as_echo='printf %s\n'
13941 as_echo_n='printf %s'
13942else
13943 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13944 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13945 as_echo_n='/usr/ucb/echo -n'
13946 else
13947 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13948 as_echo_n_body='eval
13949 arg=$1;
13950 case $arg in #(
13951 *"$as_nl"*)
13952 expr "X$arg" : "X\\(.*\\)$as_nl";
13953 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13954 esac;
13955 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13956 '
13957 export as_echo_n_body
13958 as_echo_n='sh -c $as_echo_n_body as_echo'
13959 fi
13960 export as_echo_body
13961 as_echo='sh -c $as_echo_body as_echo'
13962fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013963
13964# The user is always right.
13965if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013966 PATH_SEPARATOR=:
13967 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13968 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13969 PATH_SEPARATOR=';'
13970 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013971fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013972
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013973
13974# IFS
13975# We need space, tab and new line, in precisely that order. Quoting is
13976# there to prevent editors from complaining about space-tab.
13977# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13978# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013979IFS=" "" $as_nl"
13980
13981# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000013982case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013983 *[\\/]* ) as_myself=$0 ;;
13984 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000013985for as_dir in $PATH
13986do
13987 IFS=$as_save_IFS
13988 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000013989 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13990 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013991IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000013992
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013993 ;;
13994esac
13995# We did not find ourselves, most probably we were run as `sh COMMAND'
13996# in which case we are not to be found in the path.
13997if test "x$as_myself" = x; then
13998 as_myself=$0
13999fi
14000if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014001 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14002 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014003fi
14004
Matthias Kloseb9621712010-04-24 17:59:49 +000014005# Unset variables that we do not need and which cause bugs (e.g. in
14006# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14007# suppresses any "Segmentation fault" message there. '((' could
14008# trigger a bug in pdksh 5.2.14.
14009for as_var in BASH_ENV ENV MAIL MAILPATH
14010do eval test x\${$as_var+set} = xset \
14011 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014012done
14013PS1='$ '
14014PS2='> '
14015PS4='+ '
14016
14017# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014018LC_ALL=C
14019export LC_ALL
14020LANGUAGE=C
14021export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014022
Matthias Kloseb9621712010-04-24 17:59:49 +000014023# CDPATH.
14024(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14025
14026
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014027# as_fn_error ERROR [LINENO LOG_FD]
14028# ---------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014029# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14030# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014031# script with status $?, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014032as_fn_error ()
14033{
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014034 as_status=$?; test $as_status -eq 0 && as_status=1
14035 if test "$3"; then
14036 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14037 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
Matthias Kloseb9621712010-04-24 17:59:49 +000014038 fi
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014039 $as_echo "$as_me: error: $1" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014040 as_fn_exit $as_status
14041} # as_fn_error
14042
14043
14044# as_fn_set_status STATUS
14045# -----------------------
14046# Set $? to STATUS, without forking.
14047as_fn_set_status ()
14048{
14049 return $1
14050} # as_fn_set_status
14051
14052# as_fn_exit STATUS
14053# -----------------
14054# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14055as_fn_exit ()
14056{
14057 set +e
14058 as_fn_set_status $1
14059 exit $1
14060} # as_fn_exit
14061
14062# as_fn_unset VAR
14063# ---------------
14064# Portably unset VAR.
14065as_fn_unset ()
14066{
14067 { eval $1=; unset $1;}
14068}
14069as_unset=as_fn_unset
14070# as_fn_append VAR VALUE
14071# ----------------------
14072# Append the text in VALUE to the end of the definition contained in VAR. Take
14073# advantage of any shell optimizations that allow amortized linear growth over
14074# repeated appends, instead of the typical quadratic growth present in naive
14075# implementations.
14076if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14077 eval 'as_fn_append ()
14078 {
14079 eval $1+=\$2
14080 }'
14081else
14082 as_fn_append ()
14083 {
14084 eval $1=\$$1\$2
14085 }
14086fi # as_fn_append
14087
14088# as_fn_arith ARG...
14089# ------------------
14090# Perform arithmetic evaluation on the ARGs, and store the result in the
14091# global $as_val. Take advantage of shells that can avoid forks. The arguments
14092# must be portable across $(()) and expr.
14093if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14094 eval 'as_fn_arith ()
14095 {
14096 as_val=$(( $* ))
14097 }'
14098else
14099 as_fn_arith ()
14100 {
14101 as_val=`expr "$@" || test $? -eq 1`
14102 }
14103fi # as_fn_arith
14104
14105
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014106if expr a : '\(a\)' >/dev/null 2>&1 &&
14107 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14108 as_expr=expr
14109else
14110 as_expr=false
14111fi
14112
14113if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14114 as_basename=basename
14115else
14116 as_basename=false
14117fi
14118
Matthias Kloseb9621712010-04-24 17:59:49 +000014119if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14120 as_dirname=dirname
14121else
14122 as_dirname=false
14123fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014124
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014125as_me=`$as_basename -- "$0" ||
14126$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14127 X"$0" : 'X\(//\)$' \| \
14128 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014129$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014130 sed '/^.*\/\([^/][^/]*\)\/*$/{
14131 s//\1/
14132 q
14133 }
14134 /^X\/\(\/\/\)$/{
14135 s//\1/
14136 q
14137 }
14138 /^X\/\(\/\).*/{
14139 s//\1/
14140 q
14141 }
14142 s/.*/./; q'`
14143
Matthias Kloseb9621712010-04-24 17:59:49 +000014144# Avoid depending upon Character Ranges.
14145as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14146as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14147as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14148as_cr_digits='0123456789'
14149as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014150
14151ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014152case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014153-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014154 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014155 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014156 xy) ECHO_C='\c';;
14157 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14158 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014159 esac;;
14160*)
14161 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014162esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014163
Martin v. Löwis11437992002-04-12 09:54:03 +000014164rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014165if test -d conf$$.dir; then
14166 rm -f conf$$.dir/conf$$.file
14167else
14168 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014169 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014170fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014171if (echo >conf$$.file) 2>/dev/null; then
14172 if ln -s conf$$.file conf$$ 2>/dev/null; then
14173 as_ln_s='ln -s'
14174 # ... but there are two gotchas:
14175 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14176 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14177 # In both cases, we have to default to `cp -p'.
14178 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14179 as_ln_s='cp -p'
14180 elif ln conf$$.file conf$$ 2>/dev/null; then
14181 as_ln_s=ln
14182 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014183 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014184 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014185else
14186 as_ln_s='cp -p'
14187fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014188rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14189rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014190
Matthias Kloseb9621712010-04-24 17:59:49 +000014191
14192# as_fn_mkdir_p
14193# -------------
14194# Create "$as_dir" as a directory, including parents if necessary.
14195as_fn_mkdir_p ()
14196{
14197
14198 case $as_dir in #(
14199 -*) as_dir=./$as_dir;;
14200 esac
14201 test -d "$as_dir" || eval $as_mkdir_p || {
14202 as_dirs=
14203 while :; do
14204 case $as_dir in #(
14205 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14206 *) as_qdir=$as_dir;;
14207 esac
14208 as_dirs="'$as_qdir' $as_dirs"
14209 as_dir=`$as_dirname -- "$as_dir" ||
14210$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14211 X"$as_dir" : 'X\(//\)[^/]' \| \
14212 X"$as_dir" : 'X\(//\)$' \| \
14213 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14214$as_echo X"$as_dir" |
14215 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14216 s//\1/
14217 q
14218 }
14219 /^X\(\/\/\)[^/].*/{
14220 s//\1/
14221 q
14222 }
14223 /^X\(\/\/\)$/{
14224 s//\1/
14225 q
14226 }
14227 /^X\(\/\).*/{
14228 s//\1/
14229 q
14230 }
14231 s/.*/./; q'`
14232 test -d "$as_dir" && break
14233 done
14234 test -z "$as_dirs" || eval "mkdir $as_dirs"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014235 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014236
14237
14238} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014239if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014240 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014241else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014242 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014243 as_mkdir_p=false
14244fi
14245
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014246if test -x / >/dev/null 2>&1; then
14247 as_test_x='test -x'
14248else
14249 if ls -dL / >/dev/null 2>&1; then
14250 as_ls_L_option=L
14251 else
14252 as_ls_L_option=
14253 fi
14254 as_test_x='
14255 eval sh -c '\''
14256 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014257 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014258 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014259 case $1 in #(
14260 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014261 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014262 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014263 ???[sx]*):;;*)false;;esac;fi
14264 '\'' sh
14265 '
14266fi
14267as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014268
14269# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014270as_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 +000014271
14272# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014273as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014274
14275
Martin v. Löwis11437992002-04-12 09:54:03 +000014276exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014277## ----------------------------------- ##
14278## Main body of $CONFIG_STATUS script. ##
14279## ----------------------------------- ##
14280_ASEOF
14281test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014282
Matthias Kloseb9621712010-04-24 17:59:49 +000014283cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14284# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014285# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014286# values after options handling.
14287ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014288This file was extended by python $as_me 3.3, which was
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014289generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014290
14291 CONFIG_FILES = $CONFIG_FILES
14292 CONFIG_HEADERS = $CONFIG_HEADERS
14293 CONFIG_LINKS = $CONFIG_LINKS
14294 CONFIG_COMMANDS = $CONFIG_COMMANDS
14295 $ $0 $@
14296
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014297on `(hostname || uname -n) 2>/dev/null | sed 1q`
14298"
14299
Martin v. Löwis11437992002-04-12 09:54:03 +000014300_ACEOF
14301
Matthias Kloseb9621712010-04-24 17:59:49 +000014302case $ac_config_files in *"
14303"*) set x $ac_config_files; shift; ac_config_files=$*;;
14304esac
14305
14306case $ac_config_headers in *"
14307"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14308esac
14309
14310
14311cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014312# Files that config.status was made for.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014313config_files="$ac_config_files"
14314config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014315
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014316_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014317
Matthias Kloseb9621712010-04-24 17:59:49 +000014318cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014319ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014320\`$as_me' instantiates files and other configuration actions
14321from templates according to the current configuration. Unless the files
14322and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014323
Matthias Kloseb9621712010-04-24 17:59:49 +000014324Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014325
14326 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014327 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014328 --config print configuration, then exit
14329 -q, --quiet, --silent
14330 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014331 -d, --debug don't remove temporary files
14332 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014333 --file=FILE[:TEMPLATE]
14334 instantiate the configuration file FILE
14335 --header=FILE[:TEMPLATE]
14336 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014337
14338Configuration files:
14339$config_files
14340
14341Configuration headers:
14342$config_headers
14343
Matthias Kloseb9621712010-04-24 17:59:49 +000014344Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014345
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014347cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14348ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014349ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014350python config.status 3.3
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014351configured by $0, generated by GNU Autoconf 2.65,
Matthias Kloseb9621712010-04-24 17:59:49 +000014352 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014353
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014354Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014355This config.status script is free software; the Free Software Foundation
14356gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014357
14358ac_pwd='$ac_pwd'
14359srcdir='$srcdir'
14360INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014361test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014362_ACEOF
14363
Matthias Kloseb9621712010-04-24 17:59:49 +000014364cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14365# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014366ac_need_defaults=:
14367while test $# != 0
14368do
14369 case $1 in
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014370 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014371 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14372 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014373 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014374 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014375 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014376 ac_option=$1
14377 ac_optarg=$2
14378 ac_shift=shift
14379 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014380 esac
14381
Skip Montanaro6dead952003-09-25 14:50:04 +000014382 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014383 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014384 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14385 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014386 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014387 $as_echo "$ac_cs_version"; exit ;;
14388 --config | --confi | --conf | --con | --co | --c )
14389 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014390 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014391 debug=: ;;
14392 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014393 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014394 case $ac_optarg in
14395 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14396 esac
14397 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014398 ac_need_defaults=false;;
14399 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014400 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014401 case $ac_optarg in
14402 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14403 esac
14404 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014405 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014406 --he | --h)
14407 # Conflict between --help and --header
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014408 as_fn_error "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014409Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014410 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014411 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014412 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14413 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14414 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014415
14416 # This is an error.
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014417 -*) as_fn_error "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014418Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014419
Matthias Kloseb9621712010-04-24 17:59:49 +000014420 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014421 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014422
14423 esac
14424 shift
14425done
14426
Skip Montanaro6dead952003-09-25 14:50:04 +000014427ac_configure_extra_args=
14428
14429if $ac_cs_silent; then
14430 exec 6>/dev/null
14431 ac_configure_extra_args="$ac_configure_extra_args --silent"
14432fi
14433
14434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014435cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014436if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014437 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14438 shift
14439 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14440 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014441 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014442 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014443fi
14444
Martin v. Löwis11437992002-04-12 09:54:03 +000014445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014446cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014447exec 5>>config.log
14448{
14449 echo
14450 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14451## Running $as_me. ##
14452_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014453 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014454} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014455
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014457cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014458_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014459
Matthias Kloseb9621712010-04-24 17:59:49 +000014460cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014461
14462# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014463for ac_config_target in $ac_config_targets
14464do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014465 case $ac_config_target in
14466 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14467 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14468 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014469 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14470 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014471 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14472 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014473 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014474 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014475
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014476 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014477 esac
14478done
14479
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014480
Martin v. Löwis11437992002-04-12 09:54:03 +000014481# If the user did not use the arguments to specify the items to instantiate,
14482# then the envvar interface is used. Set only those that are not.
14483# We use the long form for the default assignment because of an extremely
14484# bizarre bug on SunOS 4.1.3.
14485if $ac_need_defaults; then
14486 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14487 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14488fi
14489
Skip Montanaro6dead952003-09-25 14:50:04 +000014490# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014491# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014492# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014493# Hook for its removal unless debugging.
14494# Note that there is a small window in which the directory will not be cleaned:
14495# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014496$debug ||
14497{
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014498 tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014499 trap 'exit_status=$?
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014500 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014501' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014502 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014503}
Martin v. Löwis11437992002-04-12 09:54:03 +000014504# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014505
Martin v. Löwis11437992002-04-12 09:54:03 +000014506{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014507 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014508 test -n "$tmp" && test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014509} ||
14510{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014511 tmp=./conf$$-$RANDOM
14512 (umask 077 && mkdir "$tmp")
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014513} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014514
Matthias Kloseb9621712010-04-24 17:59:49 +000014515# Set up the scripts for CONFIG_FILES section.
14516# No need to generate them if there are no CONFIG_FILES.
14517# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014518if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014519
Matthias Kloseb9621712010-04-24 17:59:49 +000014520
14521ac_cr=`echo X | tr X '\015'`
14522# On cygwin, bash can eat \r inside `` if the user requested igncr.
14523# But we know of no other shell where ac_cr would be empty at this
14524# point, so we can use a bashism as a fallback.
14525if test "x$ac_cr" = x; then
14526 eval ac_cr=\$\'\\r\'
14527fi
14528ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14529if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014530 ac_cs_awk_cr='\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014531else
14532 ac_cs_awk_cr=$ac_cr
14533fi
14534
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014535echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014536_ACEOF
14537
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014538
Matthias Kloseb9621712010-04-24 17:59:49 +000014539{
14540 echo "cat >conf$$subs.awk <<_ACEOF" &&
14541 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14542 echo "_ACEOF"
14543} >conf$$subs.sh ||
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014544 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14545ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014546ac_delim='%!_!# '
14547for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014548 . ./conf$$subs.sh ||
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014549 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014550
Matthias Kloseb9621712010-04-24 17:59:49 +000014551 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14552 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014553 break
14554 elif $ac_last_try; then
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014555 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014556 else
14557 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014558 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014559done
Matthias Kloseb9621712010-04-24 17:59:49 +000014560rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014561
Matthias Kloseb9621712010-04-24 17:59:49 +000014562cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014563cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014565sed -n '
14566h
14567s/^/S["/; s/!.*/"]=/
14568p
14569g
14570s/^[^!]*!//
14571:repl
14572t repl
14573s/'"$ac_delim"'$//
14574t delim
14575:nl
14576h
14577s/\(.\{148\}\)..*/\1/
14578t more1
14579s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14580p
14581n
14582b repl
14583:more1
14584s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14585p
14586g
14587s/.\{148\}//
14588t nl
14589:delim
14590h
14591s/\(.\{148\}\)..*/\1/
14592t more2
14593s/["\\]/\\&/g; s/^/"/; s/$/"/
14594p
14595b
14596:more2
14597s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14598p
14599g
14600s/.\{148\}//
14601t delim
14602' <conf$$subs.awk | sed '
14603/^[^""]/{
14604 N
14605 s/\n//
14606}
14607' >>$CONFIG_STATUS || ac_write_fail=1
14608rm -f conf$$subs.awk
14609cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14610_ACAWK
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014611cat >>"\$tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014612 for (key in S) S_is_set[key] = 1
14613 FS = ""
14614
14615}
14616{
14617 line = $ 0
14618 nfields = split(line, field, "@")
14619 substed = 0
14620 len = length(field[1])
14621 for (i = 2; i < nfields; i++) {
14622 key = field[i]
14623 keylen = length(key)
14624 if (S_is_set[key]) {
14625 value = S[key]
14626 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14627 len += length(value) + length(field[++i])
14628 substed = 1
14629 } else
14630 len += 1 + keylen
14631 }
14632
14633 print line
14634}
14635
14636_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014637_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014638cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14639if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14640 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14641else
14642 cat
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014643fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
14644 || as_fn_error "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014645_ACEOF
14646
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014647# VPATH may cause trouble with some makes, so we remove $(srcdir),
14648# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014649# trailing colons and then remove the whole line if VPATH becomes empty
14650# (actually we leave an empty line to preserve line numbers).
14651if test "x$srcdir" = x.; then
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014652 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14653s/:*\$(srcdir):*/:/
14654s/:*\${srcdir}:*/:/
14655s/:*@srcdir@:*/:/
14656s/^\([^=]*=[ ]*\):*/\1/
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014657s/:*$//
14658s/^[^=]*=[ ]*$//
14659}'
14660fi
14661
Matthias Kloseb9621712010-04-24 17:59:49 +000014662cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014663fi # test -n "$CONFIG_FILES"
14664
Matthias Kloseb9621712010-04-24 17:59:49 +000014665# Set up the scripts for CONFIG_HEADERS section.
14666# No need to generate them if there are no CONFIG_HEADERS.
14667# This happens for instance with `./config.status Makefile'.
14668if test -n "$CONFIG_HEADERS"; then
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014669cat >"$tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014670BEGIN {
14671_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014672
Matthias Kloseb9621712010-04-24 17:59:49 +000014673# Transform confdefs.h into an awk script `defines.awk', embedded as
14674# here-document in config.status, that substitutes the proper values into
14675# config.h.in to produce config.h.
14676
14677# Create a delimiter string that does not exist in confdefs.h, to ease
14678# handling of long lines.
14679ac_delim='%!_!# '
14680for ac_last_try in false false :; do
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014681 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14682 if test -z "$ac_t"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014683 break
14684 elif $ac_last_try; then
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014685 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014686 else
14687 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14688 fi
14689done
14690
14691# For the awk script, D is an array of macro values keyed by name,
14692# likewise P contains macro parameters if any. Preserve backslash
14693# newline sequences.
14694
14695ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14696sed -n '
14697s/.\{148\}/&'"$ac_delim"'/g
14698t rset
14699:rset
14700s/^[ ]*#[ ]*define[ ][ ]*/ /
14701t def
14702d
14703:def
14704s/\\$//
14705t bsnl
14706s/["\\]/\\&/g
14707s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14708D["\1"]=" \3"/p
14709s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14710d
14711:bsnl
14712s/["\\]/\\&/g
14713s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14714D["\1"]=" \3\\\\\\n"\\/p
14715t cont
14716s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14717t cont
14718d
14719:cont
14720n
14721s/.\{148\}/&'"$ac_delim"'/g
14722t clear
14723:clear
14724s/\\$//
14725t bsnlc
14726s/["\\]/\\&/g; s/^/"/; s/$/"/p
14727d
14728:bsnlc
14729s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14730b cont
14731' <confdefs.h | sed '
14732s/'"$ac_delim"'/"\\\
14733"/g' >>$CONFIG_STATUS || ac_write_fail=1
14734
14735cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14736 for (key in D) D_is_set[key] = 1
14737 FS = ""
14738}
14739/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14740 line = \$ 0
14741 split(line, arg, " ")
14742 if (arg[1] == "#") {
14743 defundef = arg[2]
14744 mac1 = arg[3]
14745 } else {
14746 defundef = substr(arg[1], 2)
14747 mac1 = arg[2]
14748 }
14749 split(mac1, mac2, "(") #)
14750 macro = mac2[1]
14751 prefix = substr(line, 1, index(line, defundef) - 1)
14752 if (D_is_set[macro]) {
14753 # Preserve the white space surrounding the "#".
14754 print prefix "define", macro P[macro] D[macro]
14755 next
14756 } else {
14757 # Replace #undef with comments. This is necessary, for example,
14758 # in the case of _POSIX_SOURCE, which is predefined and required
14759 # on some systems where configure will not decide to define it.
14760 if (defundef == "undef") {
14761 print "/*", prefix defundef, macro, "*/"
14762 next
14763 }
14764 }
14765}
14766{ print }
14767_ACAWK
14768_ACEOF
14769cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014770 as_fn_error "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014771fi # test -n "$CONFIG_HEADERS"
14772
14773
14774eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14775shift
14776for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014777do
14778 case $ac_tag in
14779 :[FHLC]) ac_mode=$ac_tag; continue;;
14780 esac
14781 case $ac_mode$ac_tag in
14782 :[FHL]*:*);;
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014783 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014784 :[FH]-) ac_tag=-:-;;
14785 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14786 esac
14787 ac_save_IFS=$IFS
14788 IFS=:
14789 set x $ac_tag
14790 IFS=$ac_save_IFS
14791 shift
14792 ac_file=$1
14793 shift
14794
14795 case $ac_mode in
14796 :L) ac_source=$1;;
14797 :[FH])
14798 ac_file_inputs=
14799 for ac_f
14800 do
14801 case $ac_f in
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014802 -) ac_f="$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014803 *) # Look for the file first in the build tree, then in the source tree
14804 # (if the path is not absolute). The absolute path cannot be DOS-style,
14805 # because $ac_f cannot contain `:'.
14806 test -f "$ac_f" ||
14807 case $ac_f in
14808 [\\/$]*) false;;
14809 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14810 esac ||
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014811 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014812 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014813 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14814 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014815 done
14816
14817 # Let's still pretend it is `configure' which instantiates (i.e., don't
14818 # use $as_me), people would be surprised to read:
14819 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014820 configure_input='Generated from '`
14821 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14822 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014823 if test x"$ac_file" != x-; then
14824 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014825 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14826$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014827 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014828 # Neutralize special characters interpreted by sed in replacement strings.
14829 case $configure_input in #(
14830 *\&* | *\|* | *\\* )
14831 ac_sed_conf_input=`$as_echo "$configure_input" |
14832 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14833 *) ac_sed_conf_input=$configure_input;;
14834 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014835
14836 case $ac_tag in
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014837 *:-:* | *:-) cat >"$tmp/stdin" \
14838 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014839 esac
14840 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014841 esac
14842
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014843 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014844$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014845 X"$ac_file" : 'X\(//\)[^/]' \| \
14846 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014847 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014848$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014849 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14850 s//\1/
14851 q
14852 }
14853 /^X\(\/\/\)[^/].*/{
14854 s//\1/
14855 q
14856 }
14857 /^X\(\/\/\)$/{
14858 s//\1/
14859 q
14860 }
14861 /^X\(\/\).*/{
14862 s//\1/
14863 q
14864 }
14865 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014866 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014867 ac_builddir=.
14868
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014869case "$ac_dir" in
14870.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14871*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014872 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014873 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014874 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014875 case $ac_top_builddir_sub in
14876 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14877 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14878 esac ;;
14879esac
14880ac_abs_top_builddir=$ac_pwd
14881ac_abs_builddir=$ac_pwd$ac_dir_suffix
14882# for backward compatibility:
14883ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014884
14885case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014886 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014887 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014888 ac_top_srcdir=$ac_top_builddir_sub
14889 ac_abs_top_srcdir=$ac_pwd ;;
14890 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014891 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014892 ac_top_srcdir=$srcdir
14893 ac_abs_top_srcdir=$srcdir ;;
14894 *) # Relative name.
14895 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14896 ac_top_srcdir=$ac_top_build_prefix$srcdir
14897 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014898esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014899ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014900
Martin v. Löwis11437992002-04-12 09:54:03 +000014901
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014902 case $ac_mode in
14903 :F)
14904 #
14905 # CONFIG_FILE
14906 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014907
14908 case $INSTALL in
14909 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014910 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014911 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014912_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014913
Matthias Kloseb9621712010-04-24 17:59:49 +000014914cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014915# If the template does not know about datarootdir, expand it.
14916# FIXME: This hack should be removed a few years after 2.60.
14917ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014918ac_sed_dataroot='
14919/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014920 p
14921 q
14922}
14923/@datadir@/p
14924/@docdir@/p
14925/@infodir@/p
14926/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014927/@mandir@/p'
14928case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014929*datarootdir*) ac_datarootdir_seen=yes;;
14930*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014931 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14932$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014933_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014934cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014935 ac_datarootdir_hack='
14936 s&@datadir@&$datadir&g
14937 s&@docdir@&$docdir&g
14938 s&@infodir@&$infodir&g
14939 s&@localedir@&$localedir&g
14940 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000014941 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014942esac
14943_ACEOF
14944
14945# Neutralize VPATH when `$srcdir' = `.'.
14946# Shell code in configure.ac might set extrasub.
14947# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000014948cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14949ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014950$extrasub
14951_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014952cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014953:t
14954/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000014955s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014956s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000014957s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014958s&@srcdir@&$ac_srcdir&;t t
14959s&@abs_srcdir@&$ac_abs_srcdir&;t t
14960s&@top_srcdir@&$ac_top_srcdir&;t t
14961s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14962s&@builddir@&$ac_builddir&;t t
14963s&@abs_builddir@&$ac_abs_builddir&;t t
14964s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14965s&@INSTALL@&$ac_INSTALL&;t t
14966$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000014967"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014968eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
14969 || as_fn_error "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014970
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014971test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014972 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14973 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014974 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014975which seems to be undefined. Please make sure it is defined." >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014976$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014977which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014978
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014979 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000014980 case $ac_file in
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014981 -) cat "$tmp/out" && rm -f "$tmp/out";;
14982 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000014983 esac \
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014984 || as_fn_error "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014985 ;;
14986 :H)
14987 #
14988 # CONFIG_HEADER
14989 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014990 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014991 {
14992 $as_echo "/* $configure_input */" \
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000014993 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14994 } >"$tmp/config.h" \
14995 || as_fn_error "could not create $ac_file" "$LINENO" 5
14996 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014997 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14998$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014999 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015000 rm -f "$ac_file"
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000015001 mv "$tmp/config.h" "$ac_file" \
15002 || as_fn_error "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015003 fi
15004 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015005 $as_echo "/* $configure_input */" \
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000015006 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
15007 || as_fn_error "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015008 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015009 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015010
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015011
15012 esac
15013
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015014
15015 case $ac_file$ac_mode in
15016 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15017
15018 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015019done # for ac_tag
15020
Guido van Rossum627b2d71993-12-24 10:39:16 +000015021
Matthias Kloseb9621712010-04-24 17:59:49 +000015022as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015023_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015024ac_clean_files=$ac_clean_files_save
15025
Matthias Kloseb9621712010-04-24 17:59:49 +000015026test $ac_write_fail = 0 ||
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000015027 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015028
Martin v. Löwis11437992002-04-12 09:54:03 +000015029
15030# configure is writing to config.log, and then calls config.status.
15031# config.status does its own redirection, appending to config.log.
15032# Unfortunately, on DOS this fails, as config.log is still kept open
15033# by configure, so config.status won't be able to write to it; its
15034# output is simply discarded. So we exec the FD to /dev/null,
15035# effectively closing config.log, so it can be properly (re)opened and
15036# appended to by config.status. When coming back to configure, we
15037# need to make the FD available again.
15038if test "$no_create" != yes; then
15039 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015040 ac_config_status_args=
15041 test "$silent" = yes &&
15042 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015043 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015044 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015045 exec 5>>config.log
15046 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15047 # would make configure fail if this is the last instruction.
Benjamin Peterson83a0efd2011-02-25 14:01:05 +000015048 $ac_cs_success || as_fn_exit $?
Matthias Kloseb9621712010-04-24 17:59:49 +000015049fi
15050if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15051 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15052$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015053fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015054
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015055
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015056echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015057if test ! -f Modules/Setup
15058then
15059 cp $srcdir/Modules/Setup.dist Modules/Setup
15060fi
15061
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015062echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015063if test ! -f Modules/Setup.local
15064then
15065 echo "# Edit this file for local setup changes" >Modules/Setup.local
15066fi
15067
15068echo "creating Makefile"
15069$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15070 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015071 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015072mv config.c Modules