blob: f9cccf2c7eee631910b0b3df83c6826228e14b86 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002# From configure.in HGVERSION.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05004# 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 Peterson87cdb812011-05-31 18:26:08 -050010# 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 Peterson316e02b2011-05-10 15:01:56 -0500224 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 Peterson87cdb812011-05-31 18:26:08 -0500323 } || 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 Peterson87cdb812011-05-31 18:26:08 -0500363# 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 Peterson87cdb812011-05-31 18:26:08 -0500367# script with status $?, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000368as_fn_error ()
369{
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500370 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 Peterson87cdb812011-05-31 18:26:08 -0500375 $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 Peterson87cdb812011-05-31 18:26:08 -0500537# 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
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500639HAS_PYTHON
640DISABLE_ASDLGEN
Matthias Kloseb9621712010-04-24 17:59:49 +0000641ARFLAGS
642AR
643RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000644USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000645GNULD
646LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000647LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000648RUNSHARED
649INSTSONAME
650LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000651PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000652BLDLIBRARY
653DLLLIBRARY
654LDLIBRARY
655LIBRARY
656BUILDEXEEXT
657EGREP
658GREP
659CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200660NO_AS_NEEDED
Matthias Kloseb9621712010-04-24 17:59:49 +0000661MAINCC
662CXX
663OBJEXT
664EXEEXT
665ac_ct_CC
666CPPFLAGS
667LDFLAGS
668CFLAGS
669CC
670EXPORT_MACOSX_DEPLOYMENT_TARGET
671CONFIGURE_MACOSX_DEPLOYMENT_TARGET
672SGI_ABI
673MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000674FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000675FRAMEWORKUNIXTOOLSPREFIX
676FRAMEWORKALTINSTALLLAST
677FRAMEWORKALTINSTALLFIRST
678FRAMEWORKINSTALLLAST
679FRAMEWORKINSTALLFIRST
680PYTHONFRAMEWORKINSTALLDIR
681PYTHONFRAMEWORKPREFIX
682PYTHONFRAMEWORKDIR
683PYTHONFRAMEWORKIDENTIFIER
684PYTHONFRAMEWORK
685LIPO_32BIT_FLAGS
686ARCH_RUN_32BIT
687UNIVERSALSDK
688CONFIG_ARGS
689SOVERSION
690VERSION
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500691HAS_HG
692HGBRANCH
693HGTAG
694HGVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000695target_alias
696host_alias
697build_alias
698LIBS
699ECHO_T
700ECHO_N
701ECHO_C
702DEFS
703mandir
704localedir
705libdir
706psdir
707pdfdir
708dvidir
709htmldir
710infodir
711docdir
712oldincludedir
713includedir
714localstatedir
715sharedstatedir
716sysconfdir
717datadir
718datarootdir
719libexecdir
720sbindir
721bindir
722program_transform_name
723prefix
724exec_prefix
725PACKAGE_URL
726PACKAGE_BUGREPORT
727PACKAGE_STRING
728PACKAGE_VERSION
729PACKAGE_TARNAME
730PACKAGE_NAME
731PATH_SEPARATOR
732SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000733ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000734ac_user_opts='
735enable_option_checking
736enable_universalsdk
737with_universal_archs
738with_framework_name
739enable_framework
740with_gcc
741with_cxx_main
742with_suffix
743enable_shared
744enable_profiling
745with_pydebug
746with_libs
747with_system_expat
748with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000749enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000750with_dbmliborder
751with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000752with_threads
753with_thread
754enable_ipv6
755with_doc_strings
756with_tsc
757with_pymalloc
758with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000759with_fpectl
760with_libm
761with_libc
762enable_big_digits
763with_wide_unicode
764with_computed_gotos
765'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000766 ac_precious_vars='build_alias
767host_alias
768target_alias
769CC
770CFLAGS
771LDFLAGS
772LIBS
773CPPFLAGS
Ross Lagerwall7807c352011-03-17 20:20:30 +0200774CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000775
Guido van Rossum627b2d71993-12-24 10:39:16 +0000776
Guido van Rossum7f43da71994-08-01 12:15:30 +0000777# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000778ac_init_help=
779ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000780ac_unrecognized_opts=
781ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000782# The variables have the same names as the options, with
783# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000784cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000785exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000786no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000787no_recursion=
788prefix=NONE
789program_prefix=NONE
790program_suffix=NONE
791program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000792silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000793site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000794srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000795verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000796x_includes=NONE
797x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000798
799# Installation directory options.
800# These are left unexpanded so users can "make install exec_prefix=/foo"
801# and all the variables that are supposed to be based on exec_prefix
802# by default will actually change.
803# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000804# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000805bindir='${exec_prefix}/bin'
806sbindir='${exec_prefix}/sbin'
807libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000808datarootdir='${prefix}/share'
809datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000810sysconfdir='${prefix}/etc'
811sharedstatedir='${prefix}/com'
812localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000813includedir='${prefix}/include'
814oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000815docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
816infodir='${datarootdir}/info'
817htmldir='${docdir}'
818dvidir='${docdir}'
819pdfdir='${docdir}'
820psdir='${docdir}'
821libdir='${exec_prefix}/lib'
822localedir='${datarootdir}/locale'
823mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000824
Guido van Rossum7f43da71994-08-01 12:15:30 +0000825ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000826ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000828do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829 # If the previous option needs an argument, assign it.
830 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000831 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000832 ac_prev=
833 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000834 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000835
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000836 case $ac_option in
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500837 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
838 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000839 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000840
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000841 # Accept the important Cygnus configure options, so we can diagnose typos.
842
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000843 case $ac_dashdash$ac_option in
844 --)
845 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000846
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000847 -bindir | --bindir | --bindi | --bind | --bin | --bi)
848 ac_prev=bindir ;;
849 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000850 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000851
852 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000853 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000854 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000855 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000856
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000857 -cache-file | --cache-file | --cache-fil | --cache-fi \
858 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
859 ac_prev=cache_file ;;
860 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
861 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000862 cache_file=$ac_optarg ;;
863
864 --config-cache | -C)
865 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000867 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000868 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000869 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000870 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000871
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000872 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
873 | --dataroo | --dataro | --datar)
874 ac_prev=datarootdir ;;
875 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
876 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
877 datarootdir=$ac_optarg ;;
878
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000880 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000881 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000882 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500883 as_fn_error "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000884 ac_useropt_orig=$ac_useropt
885 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
886 case $ac_user_opts in
887 *"
888"enable_$ac_useropt"
889"*) ;;
890 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
891 ac_unrecognized_sep=', ';;
892 esac
893 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000894
895 -docdir | --docdir | --docdi | --doc | --do)
896 ac_prev=docdir ;;
897 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
898 docdir=$ac_optarg ;;
899
900 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
901 ac_prev=dvidir ;;
902 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
903 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904
905 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000906 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000907 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000908 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500909 as_fn_error "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000910 ac_useropt_orig=$ac_useropt
911 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
912 case $ac_user_opts in
913 *"
914"enable_$ac_useropt"
915"*) ;;
916 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
917 ac_unrecognized_sep=', ';;
918 esac
919 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
922 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
923 | --exec | --exe | --ex)
924 ac_prev=exec_prefix ;;
925 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
926 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
927 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929
930 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000931 # Obsolete; use --with-gas.
932 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933
Martin v. Löwis11437992002-04-12 09:54:03 +0000934 -help | --help | --hel | --he | -h)
935 ac_init_help=long ;;
936 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
937 ac_init_help=recursive ;;
938 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
939 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000940
941 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000943 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000944 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000945
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000946 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
947 ac_prev=htmldir ;;
948 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
949 | --ht=*)
950 htmldir=$ac_optarg ;;
951
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000952 -includedir | --includedir | --includedi | --included | --include \
953 | --includ | --inclu | --incl | --inc)
954 ac_prev=includedir ;;
955 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
956 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000958
959 -infodir | --infodir | --infodi | --infod | --info | --inf)
960 ac_prev=infodir ;;
961 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000962 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000963
964 -libdir | --libdir | --libdi | --libd)
965 ac_prev=libdir ;;
966 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000967 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000968
969 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
970 | --libexe | --libex | --libe)
971 ac_prev=libexecdir ;;
972 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
973 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000975
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000976 -localedir | --localedir | --localedi | --localed | --locale)
977 ac_prev=localedir ;;
978 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
979 localedir=$ac_optarg ;;
980
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000981 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000982 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000983 ac_prev=localstatedir ;;
984 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000985 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000987
988 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
989 ac_prev=mandir ;;
990 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000991 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000992
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000994 # Obsolete; use --without-fp.
995 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996
997 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000998 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999 no_create=yes ;;
1000
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001001 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1002 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1003 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001005 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1006 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1007 | --oldin | --oldi | --old | --ol | --o)
1008 ac_prev=oldincludedir ;;
1009 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1010 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1011 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001012 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001013
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1015 ac_prev=prefix ;;
1016 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001017 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
1019 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1020 | --program-pre | --program-pr | --program-p)
1021 ac_prev=program_prefix ;;
1022 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1023 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025
1026 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1027 | --program-suf | --program-su | --program-s)
1028 ac_prev=program_suffix ;;
1029 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1030 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001032
1033 -program-transform-name | --program-transform-name \
1034 | --program-transform-nam | --program-transform-na \
1035 | --program-transform-n | --program-transform- \
1036 | --program-transform | --program-transfor \
1037 | --program-transfo | --program-transf \
1038 | --program-trans | --program-tran \
1039 | --progr-tra | --program-tr | --program-t)
1040 ac_prev=program_transform_name ;;
1041 -program-transform-name=* | --program-transform-name=* \
1042 | --program-transform-nam=* | --program-transform-na=* \
1043 | --program-transform-n=* | --program-transform-=* \
1044 | --program-transform=* | --program-transfor=* \
1045 | --program-transfo=* | --program-transf=* \
1046 | --program-trans=* | --program-tran=* \
1047 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001050 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1051 ac_prev=pdfdir ;;
1052 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1053 pdfdir=$ac_optarg ;;
1054
1055 -psdir | --psdir | --psdi | --psd | --ps)
1056 ac_prev=psdir ;;
1057 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1058 psdir=$ac_optarg ;;
1059
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1061 | -silent | --silent | --silen | --sile | --sil)
1062 silent=yes ;;
1063
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1065 ac_prev=sbindir ;;
1066 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1067 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069
1070 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1071 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1072 | --sharedst | --shareds | --shared | --share | --shar \
1073 | --sha | --sh)
1074 ac_prev=sharedstatedir ;;
1075 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1076 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1077 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1078 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001080
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001081 -site | --site | --sit)
1082 ac_prev=site ;;
1083 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001085
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1087 ac_prev=srcdir ;;
1088 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001089 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1092 | --syscon | --sysco | --sysc | --sys | --sy)
1093 ac_prev=sysconfdir ;;
1094 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1095 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001097
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102
1103 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1104 verbose=yes ;;
1105
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 -version | --version | --versio | --versi | --vers | -V)
1107 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108
1109 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001110 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001111 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001112 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001113 as_fn_error "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001114 ac_useropt_orig=$ac_useropt
1115 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1116 case $ac_user_opts in
1117 *"
1118"with_$ac_useropt"
1119"*) ;;
1120 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1121 ac_unrecognized_sep=', ';;
1122 esac
1123 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124
1125 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001126 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001127 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001128 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001129 as_fn_error "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001130 ac_useropt_orig=$ac_useropt
1131 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1132 case $ac_user_opts in
1133 *"
1134"with_$ac_useropt"
1135"*) ;;
1136 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1137 ac_unrecognized_sep=', ';;
1138 esac
1139 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001140
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001141 --x)
1142 # Obsolete; use --with-x.
1143 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144
1145 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1146 | --x-incl | --x-inc | --x-in | --x-i)
1147 ac_prev=x_includes ;;
1148 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1149 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001150 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001151
1152 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1153 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1154 ac_prev=x_libraries ;;
1155 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1156 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001157 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001158
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001159 -*) as_fn_error "unrecognized option: \`$ac_option'
1160Try \`$0 --help' for more information."
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161 ;;
1162
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 *=*)
1164 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1165 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001166 case $ac_envvar in #(
1167 '' | [0-9]* | *[!_$as_cr_alnum]* )
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001168 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001169 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001170 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 export $ac_envvar ;;
1172
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001173 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001175 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001177 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001178 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179 ;;
1180
1181 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001182done
1183
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001186 as_fn_error "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187fi
1188
Matthias Kloseb9621712010-04-24 17:59:49 +00001189if test -n "$ac_unrecognized_opts"; then
1190 case $enable_option_checking in
1191 no) ;;
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001192 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001193 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1194 esac
1195fi
1196
1197# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001198for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1199 datadir sysconfdir sharedstatedir localstatedir includedir \
1200 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1201 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001202do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001203 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001204 # Remove trailing slashes.
1205 case $ac_val in
1206 */ )
1207 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1208 eval $ac_var=\$ac_val;;
1209 esac
1210 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001211 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001212 [\\/$]* | ?:[\\/]* ) continue;;
1213 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001214 esac
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001215 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001216done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001217
Martin v. Löwis11437992002-04-12 09:54:03 +00001218# There might be people who depend on the old broken behavior: `$host'
1219# used to hold the argument of --host etc.
1220# FIXME: To remove some day.
1221build=$build_alias
1222host=$host_alias
1223target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001224
Martin v. Löwis11437992002-04-12 09:54:03 +00001225# FIXME: To remove some day.
1226if test "x$host_alias" != x; then
1227 if test "x$build_alias" = x; then
1228 cross_compiling=maybe
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001229 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1230 If a cross compiler is detected then cross compile mode will be used." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001231 elif test "x$build_alias" != "x$host_alias"; then
1232 cross_compiling=yes
1233 fi
1234fi
1235
1236ac_tool_prefix=
1237test -n "$host_alias" && ac_tool_prefix=$host_alias-
1238
1239test "$silent" = yes && exec 6>/dev/null
1240
Guido van Rossum627b2d71993-12-24 10:39:16 +00001241
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001242ac_pwd=`pwd` && test -n "$ac_pwd" &&
1243ac_ls_di=`ls -di .` &&
1244ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001245 as_fn_error "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001246test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001247 as_fn_error "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001248
1249
Guido van Rossum627b2d71993-12-24 10:39:16 +00001250# Find the source files, if location was not specified.
1251if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001252 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001253 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001254 ac_confdir=`$as_dirname -- "$as_myself" ||
1255$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1256 X"$as_myself" : 'X\(//\)[^/]' \| \
1257 X"$as_myself" : 'X\(//\)$' \| \
1258 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1259$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001260 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1261 s//\1/
1262 q
1263 }
1264 /^X\(\/\/\)[^/].*/{
1265 s//\1/
1266 q
1267 }
1268 /^X\(\/\/\)$/{
1269 s//\1/
1270 q
1271 }
1272 /^X\(\/\).*/{
1273 s//\1/
1274 q
1275 }
1276 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001277 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001278 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001279 srcdir=..
1280 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001281else
1282 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001283fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001284if test ! -r "$srcdir/$ac_unique_file"; then
1285 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001286 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1289ac_abs_confdir=`(
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001290 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001291 pwd)`
1292# When building in place, set srcdir=.
1293if test "$ac_abs_confdir" = "$ac_pwd"; then
1294 srcdir=.
1295fi
1296# Remove unnecessary trailing slashes from srcdir.
1297# Double slashes in file names in object file debugging info
1298# mess up M-x gdb in Emacs.
1299case $srcdir in
1300*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1301esac
1302for ac_var in $ac_precious_vars; do
1303 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1304 eval ac_env_${ac_var}_value=\$${ac_var}
1305 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1306 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1307done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001308
Martin v. Löwis11437992002-04-12 09:54:03 +00001309#
1310# Report the --help message.
1311#
1312if test "$ac_init_help" = "long"; then
1313 # Omit some internal or obsolete options to make the list less imposing.
1314 # This message is too long to be a string in the A/UX 3.1 sh.
1315 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001316\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001317
1318Usage: $0 [OPTION]... [VAR=VALUE]...
1319
1320To assign environment variables (e.g., CC, CFLAGS...), specify them as
1321VAR=VALUE. See below for descriptions of some of the useful variables.
1322
1323Defaults for the options are specified in brackets.
1324
1325Configuration:
1326 -h, --help display this help and exit
1327 --help=short display options specific to this package
1328 --help=recursive display the short help of all the included packages
1329 -V, --version display version information and exit
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001330 -q, --quiet, --silent do not print \`checking...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001331 --cache-file=FILE cache test results in FILE [disabled]
1332 -C, --config-cache alias for \`--cache-file=config.cache'
1333 -n, --no-create do not create output files
1334 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1335
Martin v. Löwis11437992002-04-12 09:54:03 +00001336Installation directories:
1337 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001338 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001339 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001340 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001341
1342By default, \`make install' will install all the files in
1343\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1344an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1345for instance \`--prefix=\$HOME'.
1346
1347For better control, use the options below.
1348
1349Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001350 --bindir=DIR user executables [EPREFIX/bin]
1351 --sbindir=DIR system admin executables [EPREFIX/sbin]
1352 --libexecdir=DIR program executables [EPREFIX/libexec]
1353 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1354 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1355 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1356 --libdir=DIR object code libraries [EPREFIX/lib]
1357 --includedir=DIR C header files [PREFIX/include]
1358 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1359 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1360 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1361 --infodir=DIR info documentation [DATAROOTDIR/info]
1362 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1363 --mandir=DIR man documentation [DATAROOTDIR/man]
1364 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1365 --htmldir=DIR html documentation [DOCDIR]
1366 --dvidir=DIR dvi documentation [DOCDIR]
1367 --pdfdir=DIR pdf documentation [DOCDIR]
1368 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001369_ACEOF
1370
1371 cat <<\_ACEOF
1372_ACEOF
1373fi
1374
1375if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001376 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001377 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001378 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001379 cat <<\_ACEOF
1380
1381Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001382 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001383 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1384 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001385 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001386 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001387 --enable-framework[=INSTALLDIR]
1388 Build (MacOSX|Darwin) framework
1389 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001390 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001391 --enable-loadable-sqlite-extensions
1392 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001393 --enable-ipv6 Enable ipv6 (with ipv4) support
1394 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001395 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001396 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001397
1398Optional Packages:
1399 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1400 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001401 --with-universal-archs=ARCH
1402 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001403 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001404 --with-framework-name=FRAMEWORK
1405 specify an alternate name of the framework built
1406 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001407 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001408 --with-cxx-main=<compiler>
1409 compile main() and link python executable with C++
1410 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001411 --with-suffix=.exe set executable suffix
1412 --with-pydebug build with Py_DEBUG defined
1413 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001414 --with-system-expat build pyexpat module using an installed expat
1415 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001416 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001417 --with-dbmliborder=db1:db2:...
1418 order to check db backends for dbm. Valid value is a
1419 colon separated string with the backend names
1420 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001421 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001422 --with(out)-threads[=DIRECTORY]
1423 disable/enable thread support
1424 --with(out)-thread[=DIRECTORY]
1425 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001426 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001427 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001428 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001429 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001430 --with-fpectl enable SIGFPE catching
1431 --with-libm=STRING math library
1432 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001433 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001434 --with(out)-computed-gotos
1435 Use computed gotos in evaluation loop (enabled by
1436 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001437
1438Some influential environment variables:
1439 CC C compiler command
1440 CFLAGS C compiler flags
1441 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1442 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001443 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001444 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001445 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001446 CPP C preprocessor
1447
1448Use these variables to override the choices made by `configure' or to help
1449it to find libraries and programs with nonstandard names/locations.
1450
Georg Brandle2e15612009-05-20 18:25:10 +00001451Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001452_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001453ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001454fi
1455
1456if test "$ac_init_help" = "recursive"; then
1457 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001458 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001459 test -d "$ac_dir" ||
1460 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1461 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001462 ac_builddir=.
1463
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001464case "$ac_dir" in
1465.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1466*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001467 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001468 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001469 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001470 case $ac_top_builddir_sub in
1471 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1472 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1473 esac ;;
1474esac
1475ac_abs_top_builddir=$ac_pwd
1476ac_abs_builddir=$ac_pwd$ac_dir_suffix
1477# for backward compatibility:
1478ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001479
1480case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001481 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001482 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001483 ac_top_srcdir=$ac_top_builddir_sub
1484 ac_abs_top_srcdir=$ac_pwd ;;
1485 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001486 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001487 ac_top_srcdir=$srcdir
1488 ac_abs_top_srcdir=$srcdir ;;
1489 *) # Relative name.
1490 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1491 ac_top_srcdir=$ac_top_build_prefix$srcdir
1492 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001493esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001494ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001495
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001496 cd "$ac_dir" || { ac_status=$?; continue; }
1497 # Check for guested configure.
1498 if test -f "$ac_srcdir/configure.gnu"; then
1499 echo &&
1500 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1501 elif test -f "$ac_srcdir/configure"; then
1502 echo &&
1503 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001504 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001505 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001506 fi || ac_status=$?
1507 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001508 done
1509fi
1510
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001511test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001512if $ac_init_version; then
1513 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001514python configure 3.3
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001515generated by GNU Autoconf 2.65
Martin v. Löwis11437992002-04-12 09:54:03 +00001516
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001517Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001518This configure script is free software; the Free Software Foundation
1519gives unlimited permission to copy, distribute and modify it.
1520_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001521 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001523
1524## ------------------------ ##
1525## Autoconf initialization. ##
1526## ------------------------ ##
1527
1528# ac_fn_c_try_compile LINENO
1529# --------------------------
1530# Try to compile conftest.$ac_ext, and return whether this succeeded.
1531ac_fn_c_try_compile ()
1532{
1533 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1534 rm -f conftest.$ac_objext
1535 if { { ac_try="$ac_compile"
1536case "(($ac_try" in
1537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1538 *) ac_try_echo=$ac_try;;
1539esac
1540eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1541$as_echo "$ac_try_echo"; } >&5
1542 (eval "$ac_compile") 2>conftest.err
1543 ac_status=$?
1544 if test -s conftest.err; then
1545 grep -v '^ *+' conftest.err >conftest.er1
1546 cat conftest.er1 >&5
1547 mv -f conftest.er1 conftest.err
1548 fi
1549 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1550 test $ac_status = 0; } && {
1551 test -z "$ac_c_werror_flag" ||
1552 test ! -s conftest.err
1553 } && test -s conftest.$ac_objext; then :
1554 ac_retval=0
1555else
1556 $as_echo "$as_me: failed program was:" >&5
1557sed 's/^/| /' conftest.$ac_ext >&5
1558
1559 ac_retval=1
1560fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001561 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001562 as_fn_set_status $ac_retval
1563
1564} # ac_fn_c_try_compile
1565
Matthias Kloseb9621712010-04-24 17:59:49 +00001566# ac_fn_c_try_link LINENO
1567# -----------------------
1568# Try to link conftest.$ac_ext, and return whether this succeeded.
1569ac_fn_c_try_link ()
1570{
1571 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1572 rm -f conftest.$ac_objext conftest$ac_exeext
1573 if { { ac_try="$ac_link"
1574case "(($ac_try" in
1575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1576 *) ac_try_echo=$ac_try;;
1577esac
1578eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1579$as_echo "$ac_try_echo"; } >&5
1580 (eval "$ac_link") 2>conftest.err
1581 ac_status=$?
1582 if test -s conftest.err; then
1583 grep -v '^ *+' conftest.err >conftest.er1
1584 cat conftest.er1 >&5
1585 mv -f conftest.er1 conftest.err
1586 fi
1587 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1588 test $ac_status = 0; } && {
1589 test -z "$ac_c_werror_flag" ||
1590 test ! -s conftest.err
1591 } && test -s conftest$ac_exeext && {
1592 test "$cross_compiling" = yes ||
1593 $as_test_x conftest$ac_exeext
1594 }; then :
1595 ac_retval=0
1596else
1597 $as_echo "$as_me: failed program was:" >&5
1598sed 's/^/| /' conftest.$ac_ext >&5
1599
1600 ac_retval=1
1601fi
1602 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1603 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1604 # interfere with the next link command; also delete a directory that is
1605 # left behind by Apple's compiler. We do this before executing the actions.
1606 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001607 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001608 as_fn_set_status $ac_retval
1609
1610} # ac_fn_c_try_link
1611
Matthias Kloseb9621712010-04-24 17:59:49 +00001612# ac_fn_c_try_cpp LINENO
1613# ----------------------
1614# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1615ac_fn_c_try_cpp ()
1616{
1617 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1618 if { { ac_try="$ac_cpp conftest.$ac_ext"
1619case "(($ac_try" in
1620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1621 *) ac_try_echo=$ac_try;;
1622esac
1623eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1624$as_echo "$ac_try_echo"; } >&5
1625 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1626 ac_status=$?
1627 if test -s conftest.err; then
1628 grep -v '^ *+' conftest.err >conftest.er1
1629 cat conftest.er1 >&5
1630 mv -f conftest.er1 conftest.err
1631 fi
1632 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001633 test $ac_status = 0; } >/dev/null && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001634 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1635 test ! -s conftest.err
1636 }; then :
1637 ac_retval=0
1638else
1639 $as_echo "$as_me: failed program was:" >&5
1640sed 's/^/| /' conftest.$ac_ext >&5
1641
1642 ac_retval=1
1643fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001644 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001645 as_fn_set_status $ac_retval
1646
1647} # ac_fn_c_try_cpp
1648
1649# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1650# -------------------------------------------------------
1651# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1652# the include files in INCLUDES and setting the cache variable VAR
1653# accordingly.
1654ac_fn_c_check_header_mongrel ()
1655{
1656 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001657 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1659$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001660if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001661 $as_echo_n "(cached) " >&6
1662fi
1663eval ac_res=\$$3
1664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1665$as_echo "$ac_res" >&6; }
1666else
1667 # Is the header compilable?
1668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1669$as_echo_n "checking $2 usability... " >&6; }
1670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1671/* end confdefs.h. */
1672$4
1673#include <$2>
1674_ACEOF
1675if ac_fn_c_try_compile "$LINENO"; then :
1676 ac_header_compiler=yes
1677else
1678 ac_header_compiler=no
1679fi
1680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1682$as_echo "$ac_header_compiler" >&6; }
1683
1684# Is the header present?
1685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1686$as_echo_n "checking $2 presence... " >&6; }
1687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1688/* end confdefs.h. */
1689#include <$2>
1690_ACEOF
1691if ac_fn_c_try_cpp "$LINENO"; then :
1692 ac_header_preproc=yes
1693else
1694 ac_header_preproc=no
1695fi
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001696rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1698$as_echo "$ac_header_preproc" >&6; }
1699
1700# So? What about this header?
1701case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1702 yes:no: )
1703 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1704$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1705 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1706$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1707 ;;
1708 no:yes:* )
1709 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1710$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1711 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1712$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1713 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1714$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1715 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1716$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1717 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1718$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001719( cat <<\_ASBOX
1720## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001721## Report this to http://bugs.python.org/ ##
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001722## -------------------------------------- ##
1723_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +00001724 ) | sed "s/^/$as_me: WARNING: /" >&2
1725 ;;
1726esac
1727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1728$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001729if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001730 $as_echo_n "(cached) " >&6
1731else
1732 eval "$3=\$ac_header_compiler"
1733fi
1734eval ac_res=\$$3
1735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1736$as_echo "$ac_res" >&6; }
1737fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001738 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001739
1740} # ac_fn_c_check_header_mongrel
1741
1742# ac_fn_c_try_run LINENO
1743# ----------------------
1744# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1745# that executables *can* be run.
1746ac_fn_c_try_run ()
1747{
1748 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1749 if { { ac_try="$ac_link"
1750case "(($ac_try" in
1751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1752 *) ac_try_echo=$ac_try;;
1753esac
1754eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1755$as_echo "$ac_try_echo"; } >&5
1756 (eval "$ac_link") 2>&5
1757 ac_status=$?
1758 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1759 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1760 { { case "(($ac_try" in
1761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1762 *) ac_try_echo=$ac_try;;
1763esac
1764eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1765$as_echo "$ac_try_echo"; } >&5
1766 (eval "$ac_try") 2>&5
1767 ac_status=$?
1768 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1769 test $ac_status = 0; }; }; then :
1770 ac_retval=0
1771else
1772 $as_echo "$as_me: program exited with status $ac_status" >&5
1773 $as_echo "$as_me: failed program was:" >&5
1774sed 's/^/| /' conftest.$ac_ext >&5
1775
1776 ac_retval=$ac_status
1777fi
1778 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001779 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001780 as_fn_set_status $ac_retval
1781
1782} # ac_fn_c_try_run
1783
1784# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1785# -------------------------------------------------------
1786# Tests whether HEADER exists and can be compiled using the include files in
1787# INCLUDES, setting the cache variable VAR accordingly.
1788ac_fn_c_check_header_compile ()
1789{
1790 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1792$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001793if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001794 $as_echo_n "(cached) " >&6
1795else
1796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1797/* end confdefs.h. */
1798$4
1799#include <$2>
1800_ACEOF
1801if ac_fn_c_try_compile "$LINENO"; then :
1802 eval "$3=yes"
1803else
1804 eval "$3=no"
1805fi
1806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1807fi
1808eval ac_res=\$$3
1809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1810$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001811 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001812
1813} # ac_fn_c_check_header_compile
1814
Matthias Kloseb9621712010-04-24 17:59:49 +00001815# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1816# -------------------------------------------
1817# Tests whether TYPE exists after having included INCLUDES, setting cache
1818# variable VAR accordingly.
1819ac_fn_c_check_type ()
1820{
1821 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1823$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001824if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001825 $as_echo_n "(cached) " >&6
1826else
1827 eval "$3=no"
1828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1829/* end confdefs.h. */
1830$4
1831int
1832main ()
1833{
1834if (sizeof ($2))
1835 return 0;
1836 ;
1837 return 0;
1838}
1839_ACEOF
1840if ac_fn_c_try_compile "$LINENO"; then :
1841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1842/* end confdefs.h. */
1843$4
1844int
1845main ()
1846{
1847if (sizeof (($2)))
1848 return 0;
1849 ;
1850 return 0;
1851}
1852_ACEOF
1853if ac_fn_c_try_compile "$LINENO"; then :
1854
1855else
1856 eval "$3=yes"
1857fi
1858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1859fi
1860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1861fi
1862eval ac_res=\$$3
1863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1864$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001865 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001866
1867} # ac_fn_c_check_type
1868
1869# ac_fn_c_find_uintX_t LINENO BITS VAR
1870# ------------------------------------
1871# Finds an unsigned integer type with width BITS, setting cache variable VAR
1872# accordingly.
1873ac_fn_c_find_uintX_t ()
1874{
1875 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1877$as_echo_n "checking for uint$2_t... " >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001878if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001879 $as_echo_n "(cached) " >&6
1880else
1881 eval "$3=no"
1882 # Order is important - never check a type that is potentially smaller
1883 # than half of the expected target width.
1884 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1885 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1887/* end confdefs.h. */
1888$ac_includes_default
1889int
1890main ()
1891{
1892static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1893test_array [0] = 0
1894
1895 ;
1896 return 0;
1897}
1898_ACEOF
1899if ac_fn_c_try_compile "$LINENO"; then :
1900 case $ac_type in #(
1901 uint$2_t) :
1902 eval "$3=yes" ;; #(
1903 *) :
1904 eval "$3=\$ac_type" ;;
1905esac
1906fi
1907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001908 eval as_val=\$$3
1909 if test "x$as_val" = x""no; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001910
1911else
1912 break
1913fi
1914 done
1915fi
1916eval ac_res=\$$3
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1918$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001919 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001920
1921} # ac_fn_c_find_uintX_t
1922
1923# ac_fn_c_find_intX_t LINENO BITS VAR
1924# -----------------------------------
1925# Finds a signed integer type with width BITS, setting cache variable VAR
1926# accordingly.
1927ac_fn_c_find_intX_t ()
1928{
1929 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1931$as_echo_n "checking for int$2_t... " >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001932if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001933 $as_echo_n "(cached) " >&6
1934else
1935 eval "$3=no"
1936 # Order is important - never check a type that is potentially smaller
1937 # than half of the expected target width.
1938 for ac_type in int$2_t 'int' 'long int' \
1939 'long long int' 'short int' 'signed char'; do
1940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1941/* end confdefs.h. */
1942$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001943 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001944int
1945main ()
1946{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001947static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001948test_array [0] = 0
1949
1950 ;
1951 return 0;
1952}
1953_ACEOF
1954if ac_fn_c_try_compile "$LINENO"; then :
1955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1956/* end confdefs.h. */
1957$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001958 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001959int
1960main ()
1961{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001962static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001963 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1964test_array [0] = 0
1965
1966 ;
1967 return 0;
1968}
1969_ACEOF
1970if ac_fn_c_try_compile "$LINENO"; then :
1971
1972else
1973 case $ac_type in #(
1974 int$2_t) :
1975 eval "$3=yes" ;; #(
1976 *) :
1977 eval "$3=\$ac_type" ;;
1978esac
1979fi
1980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1981fi
1982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001983 eval as_val=\$$3
1984 if test "x$as_val" = x""no; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001985
1986else
1987 break
1988fi
1989 done
1990fi
1991eval ac_res=\$$3
1992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1993$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001994 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001995
1996} # ac_fn_c_find_intX_t
1997
1998# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1999# --------------------------------------------
2000# Tries to find the compile-time value of EXPR in a program that includes
2001# INCLUDES, setting VAR accordingly. Returns whether the value could be
2002# computed
2003ac_fn_c_compute_int ()
2004{
2005 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2006 if test "$cross_compiling" = yes; then
2007 # Depending upon the size, compute the lo and hi bounds.
2008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2009/* end confdefs.h. */
2010$4
2011int
2012main ()
2013{
2014static int test_array [1 - 2 * !(($2) >= 0)];
2015test_array [0] = 0
2016
2017 ;
2018 return 0;
2019}
2020_ACEOF
2021if ac_fn_c_try_compile "$LINENO"; then :
2022 ac_lo=0 ac_mid=0
2023 while :; do
2024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2025/* end confdefs.h. */
2026$4
2027int
2028main ()
2029{
2030static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2031test_array [0] = 0
2032
2033 ;
2034 return 0;
2035}
2036_ACEOF
2037if ac_fn_c_try_compile "$LINENO"; then :
2038 ac_hi=$ac_mid; break
2039else
2040 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2041 if test $ac_lo -le $ac_mid; then
2042 ac_lo= ac_hi=
2043 break
2044 fi
2045 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2046fi
2047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2048 done
2049else
2050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2051/* end confdefs.h. */
2052$4
2053int
2054main ()
2055{
2056static int test_array [1 - 2 * !(($2) < 0)];
2057test_array [0] = 0
2058
2059 ;
2060 return 0;
2061}
2062_ACEOF
2063if ac_fn_c_try_compile "$LINENO"; then :
2064 ac_hi=-1 ac_mid=-1
2065 while :; do
2066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2067/* end confdefs.h. */
2068$4
2069int
2070main ()
2071{
2072static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2073test_array [0] = 0
2074
2075 ;
2076 return 0;
2077}
2078_ACEOF
2079if ac_fn_c_try_compile "$LINENO"; then :
2080 ac_lo=$ac_mid; break
2081else
2082 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2083 if test $ac_mid -le $ac_hi; then
2084 ac_lo= ac_hi=
2085 break
2086 fi
2087 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2088fi
2089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2090 done
2091else
2092 ac_lo= ac_hi=
2093fi
2094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2095fi
2096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2097# Binary search between lo and hi bounds.
2098while test "x$ac_lo" != "x$ac_hi"; do
2099 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2101/* end confdefs.h. */
2102$4
2103int
2104main ()
2105{
2106static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2107test_array [0] = 0
2108
2109 ;
2110 return 0;
2111}
2112_ACEOF
2113if ac_fn_c_try_compile "$LINENO"; then :
2114 ac_hi=$ac_mid
2115else
2116 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2117fi
2118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2119done
2120case $ac_lo in #((
2121?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2122'') ac_retval=1 ;;
2123esac
2124 else
2125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2126/* end confdefs.h. */
2127$4
2128static long int longval () { return $2; }
2129static unsigned long int ulongval () { return $2; }
2130#include <stdio.h>
2131#include <stdlib.h>
2132int
2133main ()
2134{
2135
2136 FILE *f = fopen ("conftest.val", "w");
2137 if (! f)
2138 return 1;
2139 if (($2) < 0)
2140 {
2141 long int i = longval ();
2142 if (i != ($2))
2143 return 1;
2144 fprintf (f, "%ld", i);
2145 }
2146 else
2147 {
2148 unsigned long int i = ulongval ();
2149 if (i != ($2))
2150 return 1;
2151 fprintf (f, "%lu", i);
2152 }
2153 /* Do not output a trailing newline, as this causes \r\n confusion
2154 on some platforms. */
2155 return ferror (f) || fclose (f) != 0;
2156
2157 ;
2158 return 0;
2159}
2160_ACEOF
2161if ac_fn_c_try_run "$LINENO"; then :
2162 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2163else
2164 ac_retval=1
2165fi
2166rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2167 conftest.$ac_objext conftest.beam conftest.$ac_ext
2168rm -f conftest.val
2169
2170 fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002171 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002172 as_fn_set_status $ac_retval
2173
2174} # ac_fn_c_compute_int
2175
2176# ac_fn_c_check_func LINENO FUNC VAR
2177# ----------------------------------
2178# Tests whether FUNC exists, setting the cache variable VAR accordingly
2179ac_fn_c_check_func ()
2180{
2181 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2183$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002184if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002185 $as_echo_n "(cached) " >&6
2186else
2187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2188/* end confdefs.h. */
2189/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2190 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2191#define $2 innocuous_$2
2192
2193/* System header to define __stub macros and hopefully few prototypes,
2194 which can conflict with char $2 (); below.
2195 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2196 <limits.h> exists even on freestanding compilers. */
2197
2198#ifdef __STDC__
2199# include <limits.h>
2200#else
2201# include <assert.h>
2202#endif
2203
2204#undef $2
2205
2206/* Override any GCC internal prototype to avoid an error.
2207 Use char because int might match the return type of a GCC
2208 builtin and then its argument prototype would still apply. */
2209#ifdef __cplusplus
2210extern "C"
2211#endif
2212char $2 ();
2213/* The GNU C library defines this for functions which it implements
2214 to always fail with ENOSYS. Some functions are actually named
2215 something starting with __ and the normal name is an alias. */
2216#if defined __stub_$2 || defined __stub___$2
2217choke me
2218#endif
2219
2220int
2221main ()
2222{
2223return $2 ();
2224 ;
2225 return 0;
2226}
2227_ACEOF
2228if ac_fn_c_try_link "$LINENO"; then :
2229 eval "$3=yes"
2230else
2231 eval "$3=no"
2232fi
2233rm -f core conftest.err conftest.$ac_objext \
2234 conftest$ac_exeext conftest.$ac_ext
2235fi
2236eval ac_res=\$$3
2237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2238$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002239 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002240
2241} # ac_fn_c_check_func
2242
2243# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2244# ----------------------------------------------------
2245# Tries to find if the field MEMBER exists in type AGGR, after including
2246# INCLUDES, setting cache variable VAR accordingly.
2247ac_fn_c_check_member ()
2248{
2249 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2251$as_echo_n "checking for $2.$3... " >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002252if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002253 $as_echo_n "(cached) " >&6
2254else
2255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2256/* end confdefs.h. */
2257$5
2258int
2259main ()
2260{
2261static $2 ac_aggr;
2262if (ac_aggr.$3)
2263return 0;
2264 ;
2265 return 0;
2266}
2267_ACEOF
2268if ac_fn_c_try_compile "$LINENO"; then :
2269 eval "$4=yes"
2270else
2271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2272/* end confdefs.h. */
2273$5
2274int
2275main ()
2276{
2277static $2 ac_aggr;
2278if (sizeof ac_aggr.$3)
2279return 0;
2280 ;
2281 return 0;
2282}
2283_ACEOF
2284if ac_fn_c_try_compile "$LINENO"; then :
2285 eval "$4=yes"
2286else
2287 eval "$4=no"
2288fi
2289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2290fi
2291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2292fi
2293eval ac_res=\$$4
2294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2295$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002296 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002297
2298} # ac_fn_c_check_member
2299
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002300# ac_fn_c_check_decl LINENO SYMBOL VAR
2301# ------------------------------------
2302# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002303ac_fn_c_check_decl ()
2304{
2305 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2307$as_echo_n "checking whether $2 is declared... " >&6; }
2308if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002309 $as_echo_n "(cached) " >&6
2310else
2311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2312/* end confdefs.h. */
2313$4
2314int
2315main ()
2316{
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002317#ifndef $2
2318 (void) $2;
Matthias Kloseb9621712010-04-24 17:59:49 +00002319#endif
2320
2321 ;
2322 return 0;
2323}
2324_ACEOF
2325if ac_fn_c_try_compile "$LINENO"; then :
2326 eval "$3=yes"
2327else
2328 eval "$3=no"
2329fi
2330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2331fi
2332eval ac_res=\$$3
2333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2334$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002335 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002336
2337} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002338cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002339This file contains any messages produced by compilers while
2340running configure, to aid debugging if configure makes a mistake.
2341
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002342It was created by python $as_me 3.3, which was
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002343generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002344
2345 $ $0 $@
2346
2347_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002348exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002349{
2350cat <<_ASUNAME
2351## --------- ##
2352## Platform. ##
2353## --------- ##
2354
2355hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2356uname -m = `(uname -m) 2>/dev/null || echo unknown`
2357uname -r = `(uname -r) 2>/dev/null || echo unknown`
2358uname -s = `(uname -s) 2>/dev/null || echo unknown`
2359uname -v = `(uname -v) 2>/dev/null || echo unknown`
2360
2361/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2362/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2363
2364/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2365/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2366/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002367/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002368/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2369/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2370/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2371
2372_ASUNAME
2373
2374as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2375for as_dir in $PATH
2376do
2377 IFS=$as_save_IFS
2378 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002379 $as_echo "PATH: $as_dir"
2380 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002381IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002382
2383} >&5
2384
2385cat >&5 <<_ACEOF
2386
2387
2388## ----------- ##
2389## Core tests. ##
2390## ----------- ##
2391
2392_ACEOF
2393
2394
2395# Keep a trace of the command line.
2396# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002397# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002398# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002399# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002400ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002401ac_configure_args0=
2402ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002403ac_must_keep_next=false
2404for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002405do
Skip Montanaro6dead952003-09-25 14:50:04 +00002406 for ac_arg
2407 do
2408 case $ac_arg in
2409 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2410 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2411 | -silent | --silent | --silen | --sile | --sil)
2412 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002413 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002414 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002415 esac
2416 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002417 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002419 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002420 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002421 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002422 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002423 case $ac_arg in
2424 *=* | --config-cache | -C | -disable-* | --disable-* \
2425 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2426 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2427 | -with-* | --with-* | -without-* | --without-* | --x)
2428 case "$ac_configure_args0 " in
2429 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2430 esac
2431 ;;
2432 -* ) ac_must_keep_next=true ;;
2433 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002434 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002435 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002436 ;;
2437 esac
2438 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002439done
Matthias Kloseb9621712010-04-24 17:59:49 +00002440{ ac_configure_args0=; unset ac_configure_args0;}
2441{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002442
2443# When interrupted or exit'd, cleanup temporary files, and complete
2444# config.log. We remove comments because anyway the quotes in there
2445# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002446# WARNING: Use '\'' to represent an apostrophe within the trap.
2447# 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 +00002448trap 'exit_status=$?
2449 # Save into config.log some information that might help in debugging.
2450 {
2451 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002452
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002453 cat <<\_ASBOX
2454## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002455## Cache variables. ##
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002456## ---------------- ##
2457_ASBOX
Martin v. Löwis11437992002-04-12 09:54:03 +00002458 echo
2459 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002460(
2461 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2462 eval ac_val=\$$ac_var
2463 case $ac_val in #(
2464 *${as_nl}*)
2465 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002466 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2467$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468 esac
2469 case $ac_var in #(
2470 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002471 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2472 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473 esac ;;
2474 esac
2475 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002476 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2478 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002479 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 "s/'\''/'\''\\\\'\'''\''/g;
2481 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2482 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002483 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002484 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002485 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486 esac |
2487 sort
2488)
Martin v. Löwis11437992002-04-12 09:54:03 +00002489 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002490
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002491 cat <<\_ASBOX
2492## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002493## Output variables. ##
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002494## ----------------- ##
2495_ASBOX
Skip Montanaro6dead952003-09-25 14:50:04 +00002496 echo
2497 for ac_var in $ac_subst_vars
2498 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002499 eval ac_val=\$$ac_var
2500 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002501 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002502 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002503 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002504 done | sort
2505 echo
2506
2507 if test -n "$ac_subst_files"; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002508 cat <<\_ASBOX
2509## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510## File substitutions. ##
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002511## ------------------- ##
2512_ASBOX
Skip Montanaro6dead952003-09-25 14:50:04 +00002513 echo
2514 for ac_var in $ac_subst_files
2515 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516 eval ac_val=\$$ac_var
2517 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002518 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002519 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002520 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002521 done | sort
2522 echo
2523 fi
2524
Martin v. Löwis11437992002-04-12 09:54:03 +00002525 if test -s confdefs.h; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002526 cat <<\_ASBOX
2527## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002528## confdefs.h. ##
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002529## ----------- ##
2530_ASBOX
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 echo
2534 fi
2535 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002536 $as_echo "$as_me: caught signal $ac_signal"
2537 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002538 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539 rm -f core *.core core.conftest.* &&
2540 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002541 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002543for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002544 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002545done
2546ac_signal=0
2547
2548# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002549rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002550
Matthias Kloseb9621712010-04-24 17:59:49 +00002551$as_echo "/* confdefs.h */" > confdefs.h
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553# Predefined preprocessor variables.
2554
2555cat >>confdefs.h <<_ACEOF
2556#define PACKAGE_NAME "$PACKAGE_NAME"
2557_ACEOF
2558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2561_ACEOF
2562
Martin v. Löwis11437992002-04-12 09:54:03 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_VERSION "$PACKAGE_VERSION"
2565_ACEOF
2566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567cat >>confdefs.h <<_ACEOF
2568#define PACKAGE_STRING "$PACKAGE_STRING"
2569_ACEOF
2570
Martin v. Löwis11437992002-04-12 09:54:03 +00002571cat >>confdefs.h <<_ACEOF
2572#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2573_ACEOF
2574
Matthias Kloseb9621712010-04-24 17:59:49 +00002575cat >>confdefs.h <<_ACEOF
2576#define PACKAGE_URL "$PACKAGE_URL"
2577_ACEOF
2578
Martin v. Löwis11437992002-04-12 09:54:03 +00002579
2580# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002581# Prefer an explicitly selected file to automatically selected ones.
2582ac_site_file1=NONE
2583ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584if test -n "$CONFIG_SITE"; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002585 ac_site_file1=$CONFIG_SITE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002587 ac_site_file1=$prefix/share/config.site
2588 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589else
Matthias Kloseb9621712010-04-24 17:59:49 +00002590 ac_site_file1=$ac_default_prefix/share/config.site
2591 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002592fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002593for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594do
Matthias Kloseb9621712010-04-24 17:59:49 +00002595 test "x$ac_site_file" = xNONE && continue
2596 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2597 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2598$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002599 sed 's/^/| /' "$ac_site_file" >&5
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002600 . "$ac_site_file"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002601 fi
2602done
2603
2604if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002605 # Some versions of bash will fail to source /dev/null (special files
2606 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2607 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2608 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2609$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002611 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2612 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 esac
2614 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002615else
Matthias Kloseb9621712010-04-24 17:59:49 +00002616 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2617$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002618 >$cache_file
2619fi
2620
2621# Check that the precious variables saved in the cache have kept the same
2622# value.
2623ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002624for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2626 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002627 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2628 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 case $ac_old_set,$ac_new_set in
2630 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002631 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2632$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 +00002633 ac_cache_corrupted=: ;;
2634 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002635 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2636$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 ac_cache_corrupted=: ;;
2638 ,);;
2639 *)
2640 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002641 # differences in whitespace do not lead to failure.
2642 ac_old_val_w=`echo x $ac_old_val`
2643 ac_new_val_w=`echo x $ac_new_val`
2644 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2645 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2646$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2647 ac_cache_corrupted=:
2648 else
2649 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2650$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2651 eval $ac_var=\$ac_old_val
2652 fi
2653 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2654$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2656$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002657 fi;;
2658 esac
2659 # Pass precious variables to config.status.
2660 if test "$ac_new_set" = set; then
2661 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002662 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002663 *) ac_arg=$ac_var=$ac_new_val ;;
2664 esac
2665 case " $ac_configure_args " in
2666 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002667 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002668 esac
2669 fi
2670done
2671if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002672 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2673$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2674 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2675$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002676 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002677fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002678## -------------------- ##
2679## Main body of script. ##
2680## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002681
Guido van Rossum7f43da71994-08-01 12:15:30 +00002682ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002683ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002684ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2685ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2686ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002687
Guido van Rossum627b2d71993-12-24 10:39:16 +00002688
Michael W. Hudson54241132001-12-07 15:38:26 +00002689
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002690
2691
2692
2693
2694if test -e $srcdir/.hg/00changelog.i
2695then
2696# Extract the first word of "hg", so it can be a program name with args.
2697set dummy hg; ac_word=$2
2698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2699$as_echo_n "checking for $ac_word... " >&6; }
2700if test "${ac_cv_prog_HAS_HG+set}" = set; then :
2701 $as_echo_n "(cached) " >&6
2702else
2703 if test -n "$HAS_HG"; then
2704 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2705else
2706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2707for as_dir in $PATH
2708do
2709 IFS=$as_save_IFS
2710 test -z "$as_dir" && as_dir=.
2711 for ac_exec_ext in '' $ac_executable_extensions; do
2712 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2713 ac_cv_prog_HAS_HG="found"
2714 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2715 break 2
2716 fi
2717done
2718 done
2719IFS=$as_save_IFS
2720
2721 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2722fi
2723fi
2724HAS_HG=$ac_cv_prog_HAS_HG
2725if test -n "$HAS_HG"; then
2726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2727$as_echo "$HAS_HG" >&6; }
2728else
2729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2730$as_echo "no" >&6; }
2731fi
2732
2733
2734else
2735HAS_HG=no-repository
2736fi
2737if test $HAS_HG = found
2738then
2739 HGVERSION="hg id -i \$(srcdir)"
2740 HGTAG="hg id -t \$(srcdir)"
2741 HGBRANCH="hg id -b \$(srcdir)"
2742else
2743 HGVERSION=""
2744 HGTAG=""
2745 HGBRANCH=""
2746fi
2747
2748
2749
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002750ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002751
2752
Martin v. Löwis11437992002-04-12 09:54:03 +00002753
Benjamin Petersond23f8222009-04-05 19:13:16 +00002754if test "$prefix" != "/"; then
2755 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2756fi
2757
2758
Martin v. Löwis11437992002-04-12 09:54:03 +00002759
2760
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002761# We don't use PACKAGE_ variables, and they cause conflicts
2762# with other autoconf-based packages that include Python.h
2763grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2764rm confdefs.h
2765mv confdefs.h.new confdefs.h
2766
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002767
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002768VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002769
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002770# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002771
2772SOVERSION=1.0
2773
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002774# The later defininition of _XOPEN_SOURCE disables certain features
2775# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2776
Matthias Kloseb9621712010-04-24 17:59:49 +00002777$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002778
2779
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002780# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2781# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2782# them.
2783
Matthias Kloseb9621712010-04-24 17:59:49 +00002784$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002785
2786
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002787# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2788# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2789# them.
2790
Matthias Kloseb9621712010-04-24 17:59:49 +00002791$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002792
2793
Martin v. Löwisd6320502004-08-12 13:45:08 +00002794# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2795# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2796
Matthias Kloseb9621712010-04-24 17:59:49 +00002797$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002798
2799
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002800# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2801# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2802# them.
2803
Matthias Kloseb9621712010-04-24 17:59:49 +00002804$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002805
2806
2807
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002808define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002809
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002810# Arguments passed to configure.
2811
2812CONFIG_ARGS="$ac_configure_args"
2813
Matthias Kloseb9621712010-04-24 17:59:49 +00002814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2815$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002816# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002817if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002818 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002819 case $enableval in
2820 yes)
2821 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002822 if test ! -d "${enableval}"
2823 then
2824 enableval=/
2825 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002826 ;;
2827 esac
2828 case $enableval in
2829 no)
2830 UNIVERSALSDK=
2831 enable_universalsdk=
2832 ;;
2833 *)
2834 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002835 if test ! -d "${UNIVERSALSDK}"
2836 then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002837 as_fn_error "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002838 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002839 ;;
2840 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002841
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002842
Thomas Wouters477c8d52006-05-27 19:21:47 +00002843else
2844
2845 UNIVERSALSDK=
2846 enable_universalsdk=
2847
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002848fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002849
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002850if test -n "${UNIVERSALSDK}"
2851then
Matthias Kloseb9621712010-04-24 17:59:49 +00002852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2853$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002854else
Matthias Kloseb9621712010-04-24 17:59:49 +00002855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2856$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002857fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002858
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002859
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002860
2861
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002862UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002863
Matthias Kloseb9621712010-04-24 17:59:49 +00002864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2865$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002866
2867# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002868if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002869 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2871$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002872 UNIVERSAL_ARCHS="$withval"
2873
2874else
2875
Matthias Kloseb9621712010-04-24 17:59:49 +00002876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2877$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002878
2879fi
2880
2881
2882
2883
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002884
2885# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002886if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002887 withval=$with_framework_name;
2888 PYTHONFRAMEWORK=${withval}
2889 PYTHONFRAMEWORKDIR=${withval}.framework
2890 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2891
2892else
2893
2894 PYTHONFRAMEWORK=Python
2895 PYTHONFRAMEWORKDIR=Python.framework
2896 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2897
2898fi
2899
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002900# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002901if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002902 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002903 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002904 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002905 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002906 esac
2907 case $enableval in
2908 no)
2909 PYTHONFRAMEWORK=
2910 PYTHONFRAMEWORKDIR=no-framework
2911 PYTHONFRAMEWORKPREFIX=
2912 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002913 FRAMEWORKINSTALLFIRST=
2914 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002915 FRAMEWORKALTINSTALLFIRST=
2916 FRAMEWORKALTINSTALLLAST=
2917 if test "x${prefix}" = "xNONE"; then
2918 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2919 else
2920 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2921 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002922 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002923 ;;
2924 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002925 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002926 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002927 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002928 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002929 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2930 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002931 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002932
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002933 if test "x${prefix}" = "xNONE" ; then
2934 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002935
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002936 else
2937 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2938 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002939
2940 case "${enableval}" in
2941 /System*)
2942 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2943 if test "${prefix}" = "NONE" ; then
2944 # See below
2945 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2946 fi
2947 ;;
2948
2949 /Library*)
2950 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2951 ;;
2952
2953 */Library/Frameworks)
2954 MDIR="`dirname "${enableval}"`"
2955 MDIR="`dirname "${MDIR}"`"
2956 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2957
2958 if test "${prefix}" = "NONE"; then
2959 # User hasn't specified the
2960 # --prefix option, but wants to install
2961 # the framework in a non-default location,
2962 # ensure that the compatibility links get
2963 # installed relative to that prefix as well
2964 # instead of in /usr/local.
2965 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2966 fi
2967 ;;
2968
2969 *)
2970 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2971 ;;
2972 esac
2973
Jack Jansen127e56e2001-09-11 14:41:54 +00002974 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002975
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002976 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002977 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002978 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002979
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002980 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002981
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002982 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2983
2984 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2985
Jack Jansene578a632001-08-15 01:27:14 +00002986 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002987
Guido van Rossum563e7081996-09-10 18:20:48 +00002988else
Martin v. Löwis11437992002-04-12 09:54:03 +00002989
Jack Jansene578a632001-08-15 01:27:14 +00002990 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002991 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002992 PYTHONFRAMEWORKPREFIX=
2993 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002994 FRAMEWORKINSTALLFIRST=
2995 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002996 FRAMEWORKALTINSTALLFIRST=
2997 FRAMEWORKALTINSTALLLAST=
2998 if test "x${prefix}" = "xNONE" ; then
2999 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3000 else
3001 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3002 fi
Jack Jansene578a632001-08-15 01:27:14 +00003003 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003004
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003005
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003006fi
3007
Thomas Wouters477c8d52006-05-27 19:21:47 +00003008
3009
Michael W. Hudson54241132001-12-07 15:38:26 +00003010
3011
3012
3013
Jack Jansene578a632001-08-15 01:27:14 +00003014
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003015
3016
3017
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003018
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003019
Jack Jansene578a632001-08-15 01:27:14 +00003020##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003021## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003022## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003023##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003024# Set name for machine-dependent library files
3025
Matthias Kloseb9621712010-04-24 17:59:49 +00003026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3027$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003028if test -z "$MACHDEP"
3029then
Guido van Rossum563e7081996-09-10 18:20:48 +00003030 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003031 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003032 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003033 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003034 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003035 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003036 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00003037 ac_md_system=`echo $ac_sys_system |
3038 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3039 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00003040 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00003041 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003042
Guido van Rossum07397971997-04-29 21:49:50 +00003043 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003044 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003045 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003046 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003047 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003048 esac
3049fi
Guido van Rossum91922671997-10-09 20:24:13 +00003050
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003051# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3052# disable features if it is defined, without any means to access these
3053# features as extensions. For these systems, we skip the definition of
3054# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3055# some feature, make sure there is no alternative way to access this
3056# feature. Also, when using wildcards, make sure you have verified the
3057# need for not defining _XOPEN_SOURCE on all systems matching the
3058# wildcard, and that the wildcard does not include future systems
3059# (which may remove their limitations).
3060case $ac_sys_system/$ac_sys_release in
3061 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3062 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003063 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003064 # In addition, Stefan Krah confirms that issue #1244610 exists through
3065 # OpenBSD 4.6, but is fixed in 4.7.
3066 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003067 define_xopen_source=no
3068 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3069 # also defined. This can be overridden by defining _BSD_SOURCE
3070 # As this has a different meaning on Linux, only define it on OpenBSD
3071
Matthias Kloseb9621712010-04-24 17:59:49 +00003072$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003073
3074 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003075 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003076 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3077 # also defined. This can be overridden by defining _BSD_SOURCE
3078 # As this has a different meaning on Linux, only define it on OpenBSD
3079
Matthias Kloseb9621712010-04-24 17:59:49 +00003080$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003081
3082 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003083 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3084 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3085 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003086 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 +00003087 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003088 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3089 # request to enable features supported by the standard as a request
3090 # to disable features not supported by the standard. The best way
3091 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3092 # entirely and define __EXTENSIONS__ instead.
3093 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003094 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003095 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3096 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003097 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003098 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003099 define_xopen_source=no;;
3100 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003101 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003102 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003103 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003104 # On FreeBSD 4, the math functions C89 does not cover are never defined
3105 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3106 FreeBSD/4.*)
3107 define_xopen_source=no;;
3108 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3109 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3110 # identifies itself as Darwin/7.*
3111 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3112 # disables platform specific features beyond repair.
3113 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3114 # has no effect, don't bother defining them
3115 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003116 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003117 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003118 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003119 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3120 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3121 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003122 AIX/4)
3123 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003124 AIX/5)
3125 if test `uname -r` -eq 1; then
3126 define_xopen_source=no
3127 fi
3128 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003129 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3130 # defining NI_NUMERICHOST.
3131 QNX/6.3.2)
3132 define_xopen_source=no
3133 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003134
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003135esac
3136
3137if test $define_xopen_source = yes
3138then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003139
Matthias Kloseb9621712010-04-24 17:59:49 +00003140$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003141
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003142
3143 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3144 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3145 # several APIs are not declared. Since this is also needed in some
3146 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003147
Matthias Kloseb9621712010-04-24 17:59:49 +00003148$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003149
3150
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003151
Matthias Kloseb9621712010-04-24 17:59:49 +00003152$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003153
3154
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003155fi
3156
Guido van Rossum91922671997-10-09 20:24:13 +00003157#
3158# SGI compilers allow the specification of the both the ABI and the
3159# ISA on the command line. Depending on the values of these switches,
3160# different and often incompatable code will be generated.
3161#
3162# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3163# thus supply support for various ABI/ISA combinations. The MACHDEP
3164# variable is also adjusted.
3165#
3166
3167if test ! -z "$SGI_ABI"
3168then
3169 CC="cc $SGI_ABI"
3170 LDFLAGS="$SGI_ABI $LDFLAGS"
3171 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3172fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3174$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003175
Jack Jansen6b08a402004-06-03 12:41:45 +00003176# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3177# it may influence the way we can build extensions, so distutils
3178# needs to check it
3179
Thomas Wouters477c8d52006-05-27 19:21:47 +00003180
Jack Jansen6b08a402004-06-03 12:41:45 +00003181CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003182EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003183
Matthias Kloseb9621712010-04-24 17:59:49 +00003184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3185$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003186ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3188$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003189
Guido van Rossum627b2d71993-12-24 10:39:16 +00003190# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003191
3192# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3193# for debug/optimization stuff. BASECFLAGS is for flags that are required
3194# just to get things to compile and link. Users are free to override OPT
3195# when running configure or make. The build should not break if they do.
3196# BASECFLAGS should generally not be messed with, however.
3197
3198# XXX shouldn't some/most/all of this code be merged with the stuff later
3199# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3201$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003202
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003203# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003204if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003205 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003206 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003207 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003208 without_gcc=yes;;
3209 yes) CC=gcc
3210 without_gcc=no;;
3211 *) CC=$withval
3212 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003213 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003214else
Martin v. Löwis11437992002-04-12 09:54:03 +00003215
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003216 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003217 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003218 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003219 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003220 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003221fi
3222
Matthias Kloseb9621712010-04-24 17:59:49 +00003223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3224$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003225
Guido van Rossum8b131c51995-03-09 14:10:13 +00003226# If the user switches compilers, we can't believe the cache
3227if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3228then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05003229 as_fn_error "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003230(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003231fi
3232
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003233# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3234# when the compiler supports them, but we don't always want -O2, and
3235# we set -g later.
3236if test -z "$CFLAGS"; then
3237 CFLAGS=
3238fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003239ac_ext=c
3240ac_cpp='$CPP $CPPFLAGS'
3241ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3242ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3243ac_compiler_gnu=$ac_cv_c_compiler_gnu
3244if test -n "$ac_tool_prefix"; then
3245 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3246set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3248$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003249if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003250 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003251else
3252 if test -n "$CC"; then
3253 ac_cv_prog_CC="$CC" # Let the user override the test.
3254else
Martin v. Löwis11437992002-04-12 09:54:03 +00003255as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3256for as_dir in $PATH
3257do
3258 IFS=$as_save_IFS
3259 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003260 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003261 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 +00003262 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003263 $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 +00003264 break 2
3265 fi
3266done
Matthias Kloseb9621712010-04-24 17:59:49 +00003267 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003268IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003269
Jack Jansendd19cf82001-12-06 22:36:17 +00003270fi
3271fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003272CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003273if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3275$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003276else
Matthias Kloseb9621712010-04-24 17:59:49 +00003277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3278$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003279fi
3280
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003281
Martin v. Löwis11437992002-04-12 09:54:03 +00003282fi
3283if test -z "$ac_cv_prog_CC"; then
3284 ac_ct_CC=$CC
3285 # Extract the first word of "gcc", so it can be a program name with args.
3286set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3288$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003289if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003290 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003291else
3292 if test -n "$ac_ct_CC"; then
3293 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3294else
3295as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3296for as_dir in $PATH
3297do
3298 IFS=$as_save_IFS
3299 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003300 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003301 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 +00003302 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003303 $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 +00003304 break 2
3305 fi
3306done
Matthias Kloseb9621712010-04-24 17:59:49 +00003307 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003308IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003309
3310fi
3311fi
3312ac_ct_CC=$ac_cv_prog_ac_ct_CC
3313if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3315$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003316else
Matthias Kloseb9621712010-04-24 17:59:49 +00003317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3318$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003319fi
3320
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003321 if test "x$ac_ct_CC" = x; then
3322 CC=""
3323 else
3324 case $cross_compiling:$ac_tool_warned in
3325yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003326{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3327$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003328ac_tool_warned=yes ;;
3329esac
3330 CC=$ac_ct_CC
3331 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003332else
3333 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003334fi
3335
Jack Jansendd19cf82001-12-06 22:36:17 +00003336if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003337 if test -n "$ac_tool_prefix"; then
3338 # 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 +00003339set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3341$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003342if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003343 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003344else
3345 if test -n "$CC"; then
3346 ac_cv_prog_CC="$CC" # Let the user override the test.
3347else
Martin v. Löwis11437992002-04-12 09:54:03 +00003348as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3349for as_dir in $PATH
3350do
3351 IFS=$as_save_IFS
3352 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003353 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003354 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 +00003355 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003356 $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 +00003357 break 2
3358 fi
3359done
Matthias Kloseb9621712010-04-24 17:59:49 +00003360 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003361IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003362
3363fi
3364fi
3365CC=$ac_cv_prog_CC
3366if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3368$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003369else
Matthias Kloseb9621712010-04-24 17:59:49 +00003370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3371$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003372fi
3373
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003374
Martin v. Löwis11437992002-04-12 09:54:03 +00003375 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003376fi
3377if test -z "$CC"; then
3378 # Extract the first word of "cc", so it can be a program name with args.
3379set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3381$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003382if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003383 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003384else
3385 if test -n "$CC"; then
3386 ac_cv_prog_CC="$CC" # Let the user override the test.
3387else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003388 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003389as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3390for as_dir in $PATH
3391do
3392 IFS=$as_save_IFS
3393 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003394 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003395 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 +00003396 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3397 ac_prog_rejected=yes
3398 continue
3399 fi
3400 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003401 $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 +00003402 break 2
3403 fi
3404done
Matthias Kloseb9621712010-04-24 17:59:49 +00003405 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003406IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003407
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003408if test $ac_prog_rejected = yes; then
3409 # We found a bogon in the path, so make sure we never use it.
3410 set dummy $ac_cv_prog_CC
3411 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003412 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003413 # We chose a different compiler from the bogus one.
3414 # However, it has the same basename, so the bogon will be chosen
3415 # first if we set CC to just the basename; use the full file name.
3416 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003417 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003418 fi
3419fi
3420fi
3421fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003422CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003423if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3425$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003426else
Matthias Kloseb9621712010-04-24 17:59:49 +00003427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3428$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003429fi
3430
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003431
Martin v. Löwis11437992002-04-12 09:54:03 +00003432fi
3433if test -z "$CC"; then
3434 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003435 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003436 do
3437 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3438set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3440$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003441if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003442 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003443else
3444 if test -n "$CC"; then
3445 ac_cv_prog_CC="$CC" # Let the user override the test.
3446else
Martin v. Löwis11437992002-04-12 09:54:03 +00003447as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3448for as_dir in $PATH
3449do
3450 IFS=$as_save_IFS
3451 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003452 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003453 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 +00003454 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003455 $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 +00003456 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003457 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003458done
Matthias Kloseb9621712010-04-24 17:59:49 +00003459 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003460IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003461
3462fi
3463fi
3464CC=$ac_cv_prog_CC
3465if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3467$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003468else
Matthias Kloseb9621712010-04-24 17:59:49 +00003469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3470$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003471fi
3472
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003473
Martin v. Löwis11437992002-04-12 09:54:03 +00003474 test -n "$CC" && break
3475 done
3476fi
3477if test -z "$CC"; then
3478 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003479 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003480do
3481 # Extract the first word of "$ac_prog", so it can be a program name with args.
3482set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3484$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003485if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003486 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003487else
3488 if test -n "$ac_ct_CC"; then
3489 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3490else
3491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3492for as_dir in $PATH
3493do
3494 IFS=$as_save_IFS
3495 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003496 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003497 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 +00003498 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003499 $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 +00003500 break 2
3501 fi
3502done
Matthias Kloseb9621712010-04-24 17:59:49 +00003503 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003504IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003505
Martin v. Löwis11437992002-04-12 09:54:03 +00003506fi
3507fi
3508ac_ct_CC=$ac_cv_prog_ac_ct_CC
3509if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3511$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003512else
Matthias Kloseb9621712010-04-24 17:59:49 +00003513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3514$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003515fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003516
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003517
Martin v. Löwis11437992002-04-12 09:54:03 +00003518 test -n "$ac_ct_CC" && break
3519done
Michael W. Hudson54241132001-12-07 15:38:26 +00003520
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003521 if test "x$ac_ct_CC" = x; then
3522 CC=""
3523 else
3524 case $cross_compiling:$ac_tool_warned in
3525yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003526{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3527$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003528ac_tool_warned=yes ;;
3529esac
3530 CC=$ac_ct_CC
3531 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003532fi
3533
3534fi
3535
3536
Matthias Kloseb9621712010-04-24 17:59:49 +00003537test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3538$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05003539as_fn_error "no acceptable C compiler found in \$PATH
3540See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003541
3542# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003543$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3544set X $ac_compile
3545ac_compiler=$2
3546for ac_option in --version -v -V -qversion; do
3547 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003548case "(($ac_try" in
3549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3550 *) ac_try_echo=$ac_try;;
3551esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003552eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3553$as_echo "$ac_try_echo"; } >&5
3554 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003555 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003556 if test -s conftest.err; then
3557 sed '10a\
3558... rest of stderr output deleted ...
3559 10q' conftest.err >conftest.er1
3560 cat conftest.er1 >&5
3561 fi
3562 rm -f conftest.er1 conftest.err
3563 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3564 test $ac_status = 0; }
3565done
Martin v. Löwis11437992002-04-12 09:54:03 +00003566
Matthias Kloseb9621712010-04-24 17:59:49 +00003567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003568/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003569
Martin v. Löwis11437992002-04-12 09:54:03 +00003570int
3571main ()
3572{
3573
3574 ;
3575 return 0;
3576}
3577_ACEOF
3578ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003579ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003580# Try to create an executable without -o first, disregard a.out.
3581# It will help us diagnose broken compilers, and finding out an intuition
3582# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3584$as_echo_n "checking whether the C compiler works... " >&6; }
3585ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3586
3587# The possible output files:
3588ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3589
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003590ac_rmfiles=
3591for ac_file in $ac_files
3592do
3593 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003594 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003595 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3596 esac
3597done
3598rm -f $ac_rmfiles
3599
Matthias Kloseb9621712010-04-24 17:59:49 +00003600if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003601case "(($ac_try" in
3602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3603 *) ac_try_echo=$ac_try;;
3604esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003605eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3606$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003607 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003608 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003609 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3610 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003611 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3612# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3613# in a Makefile. We should not override ac_cv_exeext if it was cached,
3614# so that the user can short-circuit this test for compilers unknown to
3615# Autoconf.
3616for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003617do
3618 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003619 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003620 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003621 ;;
3622 [ab].out )
3623 # We found the default executable, but exeext='' is most
3624 # certainly right.
3625 break;;
3626 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003627 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003628 then :; else
3629 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3630 fi
3631 # We set ac_cv_exeext here because the later test for it is not
3632 # safe: cross compilers may not add the suffix if given an `-o'
3633 # argument, so we may need to know it at that point already.
3634 # Even if this section looks crufty: it has the advantage of
3635 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003636 break;;
3637 * )
3638 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003639 esac
3640done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003641test "$ac_cv_exeext" = no && ac_cv_exeext=
3642
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003643else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003644 ac_file=''
3645fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003646if test -z "$ac_file"; then :
3647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3648$as_echo "no" >&6; }
3649$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003650sed 's/^/| /' conftest.$ac_ext >&5
3651
Matthias Kloseb9621712010-04-24 17:59:49 +00003652{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3653$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05003654{ as_fn_set_status 77
3655as_fn_error "C compiler cannot create executables
3656See \`config.log' for more details." "$LINENO" 5; }; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003657else
3658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3659$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003660fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3662$as_echo_n "checking for C compiler default output file name... " >&6; }
3663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3664$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003665ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003666
Matthias Kloseb9621712010-04-24 17:59:49 +00003667rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003668ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3670$as_echo_n "checking for suffix of executables... " >&6; }
3671if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672case "(($ac_try" in
3673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3674 *) ac_try_echo=$ac_try;;
3675esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003676eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3677$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003678 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003679 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003680 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3681 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003682 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3683# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3684# work properly (i.e., refer to `conftest.exe'), while it won't with
3685# `rm'.
3686for ac_file in conftest.exe conftest conftest.*; do
3687 test -f "$ac_file" || continue
3688 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003689 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003690 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3691 break;;
3692 * ) break;;
3693 esac
3694done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003695else
Matthias Kloseb9621712010-04-24 17:59:49 +00003696 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3697$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05003698as_fn_error "cannot compute suffix of executables: cannot compile and link
3699See \`config.log' for more details." "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003701rm -f conftest conftest$ac_cv_exeext
3702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3703$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003704
3705rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003706EXEEXT=$ac_cv_exeext
3707ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3709/* end confdefs.h. */
3710#include <stdio.h>
3711int
3712main ()
3713{
3714FILE *f = fopen ("conftest.out", "w");
3715 return ferror (f) || fclose (f) != 0;
3716
3717 ;
3718 return 0;
3719}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003720_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003721ac_clean_files="$ac_clean_files conftest.out"
3722# Check that the compiler produces executables we can run. If not, either
3723# the compiler is broken, or we cross compile.
3724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3725$as_echo_n "checking whether we are cross compiling... " >&6; }
3726if test "$cross_compiling" != yes; then
3727 { { ac_try="$ac_link"
3728case "(($ac_try" in
3729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3730 *) ac_try_echo=$ac_try;;
3731esac
3732eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3733$as_echo "$ac_try_echo"; } >&5
3734 (eval "$ac_link") 2>&5
3735 ac_status=$?
3736 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3737 test $ac_status = 0; }
3738 if { ac_try='./conftest$ac_cv_exeext'
3739 { { case "(($ac_try" in
3740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3741 *) ac_try_echo=$ac_try;;
3742esac
3743eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3744$as_echo "$ac_try_echo"; } >&5
3745 (eval "$ac_try") 2>&5
3746 ac_status=$?
3747 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3748 test $ac_status = 0; }; }; then
3749 cross_compiling=no
3750 else
3751 if test "$cross_compiling" = maybe; then
3752 cross_compiling=yes
3753 else
3754 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3755$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05003756as_fn_error "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003757If you meant to cross compile, use \`--host'.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05003758See \`config.log' for more details." "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 fi
3760 fi
3761fi
3762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3763$as_echo "$cross_compiling" >&6; }
3764
3765rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3766ac_clean_files=$ac_clean_files_save
3767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3768$as_echo_n "checking for suffix of object files... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003769if test "${ac_cv_objext+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003770 $as_echo_n "(cached) " >&6
3771else
3772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003773/* end confdefs.h. */
3774
3775int
3776main ()
3777{
3778
3779 ;
3780 return 0;
3781}
3782_ACEOF
3783rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003784if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003785case "(($ac_try" in
3786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3787 *) ac_try_echo=$ac_try;;
3788esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003789eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3790$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003791 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003792 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003793 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3794 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003795 for ac_file in conftest.o conftest.obj conftest.*; do
3796 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003797 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003799 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3800 break;;
3801 esac
3802done
3803else
Matthias Kloseb9621712010-04-24 17:59:49 +00003804 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003805sed 's/^/| /' conftest.$ac_ext >&5
3806
Matthias Kloseb9621712010-04-24 17:59:49 +00003807{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3808$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05003809as_fn_error "cannot compute suffix of object files: cannot compile
3810See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003811fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003812rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003813fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3815$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003816OBJEXT=$ac_cv_objext
3817ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3819$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003820if test "${ac_cv_c_compiler_gnu+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003821 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003822else
Matthias Kloseb9621712010-04-24 17:59:49 +00003823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003824/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003825
Martin v. Löwis11437992002-04-12 09:54:03 +00003826int
3827main ()
3828{
3829#ifndef __GNUC__
3830 choke me
3831#endif
3832
3833 ;
3834 return 0;
3835}
3836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003837if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003838 ac_compiler_gnu=yes
3839else
Matthias Kloseb9621712010-04-24 17:59:49 +00003840 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003843ac_cv_c_compiler_gnu=$ac_compiler_gnu
3844
3845fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3847$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3848if test $ac_compiler_gnu = yes; then
3849 GCC=yes
3850else
3851 GCC=
3852fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003853ac_test_CFLAGS=${CFLAGS+set}
3854ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3856$as_echo_n "checking whether $CC accepts -g... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003857if test "${ac_cv_prog_cc_g+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003858 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003859else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003860 ac_save_c_werror_flag=$ac_c_werror_flag
3861 ac_c_werror_flag=yes
3862 ac_cv_prog_cc_g=no
3863 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003865/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003866
Martin v. Löwis11437992002-04-12 09:54:03 +00003867int
3868main ()
3869{
3870
3871 ;
3872 return 0;
3873}
3874_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003875if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003876 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003877else
Matthias Kloseb9621712010-04-24 17:59:49 +00003878 CFLAGS=""
3879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003880/* end confdefs.h. */
3881
3882int
3883main ()
3884{
3885
3886 ;
3887 return 0;
3888}
3889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003890if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003891
Matthias Kloseb9621712010-04-24 17:59:49 +00003892else
3893 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003894 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003896/* end confdefs.h. */
3897
3898int
3899main ()
3900{
3901
3902 ;
3903 return 0;
3904}
3905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003906if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003907 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003908fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003910fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3912fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3914 ac_c_werror_flag=$ac_save_c_werror_flag
3915fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3917$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003918if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003919 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003920elif test $ac_cv_prog_cc_g = yes; then
3921 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003922 CFLAGS="-g -O2"
3923 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003924 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003925 fi
3926else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003927 if test "$GCC" = yes; then
3928 CFLAGS="-O2"
3929 else
3930 CFLAGS=
3931 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3934$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003935if test "${ac_cv_prog_cc_c89+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003936 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003937else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003938 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003939ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003941/* end confdefs.h. */
3942#include <stdarg.h>
3943#include <stdio.h>
3944#include <sys/types.h>
3945#include <sys/stat.h>
3946/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3947struct buf { int x; };
3948FILE * (*rcsopen) (struct buf *, struct stat *, int);
3949static char *e (p, i)
3950 char **p;
3951 int i;
3952{
3953 return p[i];
3954}
3955static char *f (char * (*g) (char **, int), char **p, ...)
3956{
3957 char *s;
3958 va_list v;
3959 va_start (v,p);
3960 s = g (p, va_arg (v,int));
3961 va_end (v);
3962 return s;
3963}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003964
3965/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3966 function prototypes and stuff, but not '\xHH' hex character constants.
3967 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003968 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003969 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3970 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003971 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003972int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3973
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003974/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3975 inside strings and character constants. */
3976#define FOO(x) 'x'
3977int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3978
Skip Montanaro6dead952003-09-25 14:50:04 +00003979int test (int i, double x);
3980struct s1 {int (*f) (int a);};
3981struct s2 {int (*f) (double a);};
3982int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3983int argc;
3984char **argv;
3985int
3986main ()
3987{
3988return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3989 ;
3990 return 0;
3991}
3992_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003993for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3994 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003995do
3996 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003997 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003998 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003999fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004000rm -f core conftest.err conftest.$ac_objext
4001 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004002done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004003rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004004CC=$ac_save_CC
4005
4006fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004007# AC_CACHE_VAL
4008case "x$ac_cv_prog_cc_c89" in
4009 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4011$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004012 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4014$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004015 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004016 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4018$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004019esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004020if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004021
Matthias Kloseb9621712010-04-24 17:59:49 +00004022fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004023
Martin v. Löwis11437992002-04-12 09:54:03 +00004024ac_ext=c
4025ac_cpp='$CPP $CPPFLAGS'
4026ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4027ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4028ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004029
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004030
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004031
4032
Matthias Kloseb9621712010-04-24 17:59:49 +00004033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4034$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004035
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004036# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004037if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004038 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004039
4040 case $withval in
4041 no) with_cxx_main=no
4042 MAINCC='$(CC)';;
4043 yes) with_cxx_main=yes
4044 MAINCC='$(CXX)';;
4045 *) with_cxx_main=yes
4046 MAINCC=$withval
4047 if test -z "$CXX"
4048 then
4049 CXX=$withval
4050 fi;;
4051 esac
4052else
4053
4054 with_cxx_main=no
4055 MAINCC='$(CC)'
4056
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004057fi
4058
Matthias Kloseb9621712010-04-24 17:59:49 +00004059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4060$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004061
4062preset_cxx="$CXX"
4063if test -z "$CXX"
4064then
4065 case "$CC" in
4066 gcc) # Extract the first word of "g++", so it can be a program name with args.
4067set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4069$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004070if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004071 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004072else
4073 case $CXX in
4074 [\\/]* | ?:[\\/]*)
4075 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4076 ;;
4077 *)
4078 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4079for as_dir in notfound
4080do
4081 IFS=$as_save_IFS
4082 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004083 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004084 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 +00004085 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004086 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004087 break 2
4088 fi
4089done
Matthias Kloseb9621712010-04-24 17:59:49 +00004090 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004091IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004092
4093 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4094 ;;
4095esac
4096fi
4097CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004098if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4100$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004101else
Matthias Kloseb9621712010-04-24 17:59:49 +00004102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4103$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004105
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004106 ;;
4107 cc) # Extract the first word of "c++", so it can be a program name with args.
4108set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4110$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004111if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004112 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004113else
4114 case $CXX in
4115 [\\/]* | ?:[\\/]*)
4116 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4117 ;;
4118 *)
4119 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4120for as_dir in notfound
4121do
4122 IFS=$as_save_IFS
4123 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004124 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004125 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 +00004126 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004127 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004128 break 2
4129 fi
4130done
Matthias Kloseb9621712010-04-24 17:59:49 +00004131 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004132IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004133
4134 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4135 ;;
4136esac
4137fi
4138CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004139if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4141$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004142else
Matthias Kloseb9621712010-04-24 17:59:49 +00004143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4144$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004145fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004146
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004147 ;;
4148 esac
4149 if test "$CXX" = "notfound"
4150 then
4151 CXX=""
4152 fi
4153fi
4154if test -z "$CXX"
4155then
4156 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4157do
4158 # Extract the first word of "$ac_prog", so it can be a program name with args.
4159set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4161$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004162if test "${ac_cv_prog_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004163 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004164else
4165 if test -n "$CXX"; then
4166 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4167else
4168as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4169for as_dir in $PATH
4170do
4171 IFS=$as_save_IFS
4172 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004173 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004174 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 +00004175 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004176 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004177 break 2
4178 fi
4179done
Matthias Kloseb9621712010-04-24 17:59:49 +00004180 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004181IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004182
4183fi
4184fi
4185CXX=$ac_cv_prog_CXX
4186if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4188$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004189else
Matthias Kloseb9621712010-04-24 17:59:49 +00004190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4191$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004192fi
4193
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004194
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004195 test -n "$CXX" && break
4196done
4197test -n "$CXX" || CXX="notfound"
4198
4199 if test "$CXX" = "notfound"
4200 then
4201 CXX=""
4202 fi
4203fi
4204if test "$preset_cxx" != "$CXX"
4205then
Matthias Kloseb9621712010-04-24 17:59:49 +00004206 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004207
4208 By default, distutils will build C++ extension modules with \"$CXX\".
4209 If this is not intended, then set CXX on the configure command line.
4210 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004211$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004212
4213 By default, distutils will build C++ extension modules with \"$CXX\".
4214 If this is not intended, then set CXX on the configure command line.
4215 " >&2;}
4216fi
4217
4218
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4220$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4221save_LDFLAGS="$LDFLAGS"
4222LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004223
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4225/* end confdefs.h. */
4226
4227int
4228main ()
4229{
4230
4231 ;
4232 return 0;
4233}
4234_ACEOF
4235if ac_fn_c_try_link "$LINENO"; then :
4236 NO_AS_NEEDED="-Wl,--no-as-needed"
4237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4238$as_echo "yes" >&6; }
4239else
4240 NO_AS_NEEDED=""
4241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4242$as_echo "no" >&6; }
4243fi
4244rm -f core conftest.err conftest.$ac_objext \
4245 conftest$ac_exeext conftest.$ac_ext
4246LDFLAGS="$save_LDFLAGS"
4247
4248
4249
4250# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004251ac_ext=c
4252ac_cpp='$CPP $CPPFLAGS'
4253ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4254ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4255ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4257$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004258# On Suns, sometimes $CPP names a directory.
4259if test -n "$CPP" && test -d "$CPP"; then
4260 CPP=
4261fi
4262if test -z "$CPP"; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004263 if test "${ac_cv_prog_CPP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004264 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004265else
Martin v. Löwis11437992002-04-12 09:54:03 +00004266 # Double quotes because CPP needs to be expanded
4267 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4268 do
4269 ac_preproc_ok=false
4270for ac_c_preproc_warn_flag in '' yes
4271do
4272 # Use a header file that comes with gcc, so configuring glibc
4273 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004274 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4275 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004276 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004277 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004279/* end confdefs.h. */
4280#ifdef __STDC__
4281# include <limits.h>
4282#else
4283# include <assert.h>
4284#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004285 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004287if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004288
Matthias Kloseb9621712010-04-24 17:59:49 +00004289else
Martin v. Löwis11437992002-04-12 09:54:03 +00004290 # Broken: fails on valid input.
4291continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004292fi
Benjamin Peterson87cdb812011-05-31 18:26:08 -05004293rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004294
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004295 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004296 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004298/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004299#include <ac_nonexistent.h>
4300_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004301if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004302 # Broken: success on invalid input.
4303continue
4304else
Martin v. Löwis11437992002-04-12 09:54:03 +00004305 # Passes both tests.
4306ac_preproc_ok=:
4307break
4308fi
Benjamin Peterson87cdb812011-05-31 18:26:08 -05004309rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004310
4311done
4312# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05004313rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004314if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004315 break
4316fi
4317
4318 done
4319 ac_cv_prog_CPP=$CPP
4320
4321fi
4322 CPP=$ac_cv_prog_CPP
4323else
4324 ac_cv_prog_CPP=$CPP
4325fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4327$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004328ac_preproc_ok=false
4329for ac_c_preproc_warn_flag in '' yes
4330do
4331 # Use a header file that comes with gcc, so configuring glibc
4332 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004333 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4334 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004335 # On the NeXT, cc -E runs the code through the compiler's parser,
4336 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004338/* end confdefs.h. */
4339#ifdef __STDC__
4340# include <limits.h>
4341#else
4342# include <assert.h>
4343#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004344 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004346if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004347
Matthias Kloseb9621712010-04-24 17:59:49 +00004348else
Martin v. Löwis11437992002-04-12 09:54:03 +00004349 # Broken: fails on valid input.
4350continue
4351fi
Benjamin Peterson87cdb812011-05-31 18:26:08 -05004352rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004353
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004354 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004355 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004357/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004358#include <ac_nonexistent.h>
4359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004360if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004361 # Broken: success on invalid input.
4362continue
4363else
Martin v. Löwis11437992002-04-12 09:54:03 +00004364 # Passes both tests.
4365ac_preproc_ok=:
4366break
4367fi
Benjamin Peterson87cdb812011-05-31 18:26:08 -05004368rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004369
4370done
4371# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05004372rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004373if $ac_preproc_ok; then :
4374
Martin v. Löwis11437992002-04-12 09:54:03 +00004375else
Matthias Kloseb9621712010-04-24 17:59:49 +00004376 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4377$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05004378as_fn_error "C preprocessor \"$CPP\" fails sanity check
4379See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004380fi
4381
4382ac_ext=c
4383ac_cpp='$CPP $CPPFLAGS'
4384ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4385ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4386ac_compiler_gnu=$ac_cv_c_compiler_gnu
4387
4388
Matthias Kloseb9621712010-04-24 17:59:49 +00004389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4390$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004391if test "${ac_cv_path_GREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004392 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004393else
Matthias Kloseb9621712010-04-24 17:59:49 +00004394 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004395 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004396 # Loop through the user's path and test for each of PROGNAME-LIST
4397 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004398for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4399do
4400 IFS=$as_save_IFS
4401 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004402 for ac_prog in grep ggrep; do
4403 for ac_exec_ext in '' $ac_executable_extensions; do
4404 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4405 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4406# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004407 # Check for GNU $ac_path_GREP
4408case `"$ac_path_GREP" --version 2>&1` in
4409*GNU*)
4410 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4411*)
4412 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004413 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004414 while :
4415 do
4416 cat "conftest.in" "conftest.in" >"conftest.tmp"
4417 mv "conftest.tmp" "conftest.in"
4418 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004419 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004420 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4421 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004422 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004423 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4424 # Best one so far, save it but keep looking for a better one
4425 ac_cv_path_GREP="$ac_path_GREP"
4426 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004427 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004428 # 10*(2^10) chars as input seems more than enough
4429 test $ac_count -gt 10 && break
4430 done
4431 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4432esac
4433
Matthias Kloseb9621712010-04-24 17:59:49 +00004434 $ac_path_GREP_found && break 3
4435 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004436 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004437 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004438IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004439 if test -z "$ac_cv_path_GREP"; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05004440 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 +00004441 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004442else
4443 ac_cv_path_GREP=$GREP
4444fi
4445
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004446fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4448$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004449 GREP="$ac_cv_path_GREP"
4450
4451
Matthias Kloseb9621712010-04-24 17:59:49 +00004452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4453$as_echo_n "checking for egrep... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004454if test "${ac_cv_path_EGREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004455 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004456else
4457 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4458 then ac_cv_path_EGREP="$GREP -E"
4459 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004460 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004461 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004462 # Loop through the user's path and test for each of PROGNAME-LIST
4463 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004464for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4465do
4466 IFS=$as_save_IFS
4467 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004468 for ac_prog in egrep; do
4469 for ac_exec_ext in '' $ac_executable_extensions; do
4470 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4471 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4472# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004473 # Check for GNU $ac_path_EGREP
4474case `"$ac_path_EGREP" --version 2>&1` in
4475*GNU*)
4476 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4477*)
4478 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004479 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004480 while :
4481 do
4482 cat "conftest.in" "conftest.in" >"conftest.tmp"
4483 mv "conftest.tmp" "conftest.in"
4484 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004485 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004486 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4487 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004488 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004489 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4490 # Best one so far, save it but keep looking for a better one
4491 ac_cv_path_EGREP="$ac_path_EGREP"
4492 ac_path_EGREP_max=$ac_count
4493 fi
4494 # 10*(2^10) chars as input seems more than enough
4495 test $ac_count -gt 10 && break
4496 done
4497 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4498esac
4499
Matthias Kloseb9621712010-04-24 17:59:49 +00004500 $ac_path_EGREP_found && break 3
4501 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004502 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004503 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004504IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004505 if test -z "$ac_cv_path_EGREP"; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05004506 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 +00004507 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004508else
4509 ac_cv_path_EGREP=$EGREP
4510fi
4511
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004512 fi
4513fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4515$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004516 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004517
4518
Matthias Kloseb9621712010-04-24 17:59:49 +00004519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4520$as_echo_n "checking for ANSI C header files... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004521if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004522 $as_echo_n "(cached) " >&6
4523else
4524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004525/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004526#include <stdlib.h>
4527#include <stdarg.h>
4528#include <string.h>
4529#include <float.h>
4530
4531int
4532main ()
4533{
4534
4535 ;
4536 return 0;
4537}
4538_ACEOF
4539if ac_fn_c_try_compile "$LINENO"; then :
4540 ac_cv_header_stdc=yes
4541else
4542 ac_cv_header_stdc=no
4543fi
4544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4545
4546if test $ac_cv_header_stdc = yes; then
4547 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4549/* end confdefs.h. */
4550#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004551
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004552_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004553if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004554 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004555
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004556else
Matthias Kloseb9621712010-04-24 17:59:49 +00004557 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004558fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004559rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004560
Matthias Kloseb9621712010-04-24 17:59:49 +00004561fi
4562
4563if test $ac_cv_header_stdc = yes; then
4564 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4566/* end confdefs.h. */
4567#include <stdlib.h>
4568
4569_ACEOF
4570if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4571 $EGREP "free" >/dev/null 2>&1; then :
4572
4573else
4574 ac_cv_header_stdc=no
4575fi
4576rm -f conftest*
4577
4578fi
4579
4580if test $ac_cv_header_stdc = yes; then
4581 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4582 if test "$cross_compiling" = yes; then :
4583 :
4584else
4585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4586/* end confdefs.h. */
4587#include <ctype.h>
4588#include <stdlib.h>
4589#if ((' ' & 0x0FF) == 0x020)
4590# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4591# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4592#else
4593# define ISLOWER(c) \
4594 (('a' <= (c) && (c) <= 'i') \
4595 || ('j' <= (c) && (c) <= 'r') \
4596 || ('s' <= (c) && (c) <= 'z'))
4597# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4598#endif
4599
4600#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4601int
4602main ()
4603{
4604 int i;
4605 for (i = 0; i < 256; i++)
4606 if (XOR (islower (i), ISLOWER (i))
4607 || toupper (i) != TOUPPER (i))
4608 return 2;
4609 return 0;
4610}
4611_ACEOF
4612if ac_fn_c_try_run "$LINENO"; then :
4613
4614else
4615 ac_cv_header_stdc=no
4616fi
4617rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4618 conftest.$ac_objext conftest.beam conftest.$ac_ext
4619fi
4620
4621fi
4622fi
4623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4624$as_echo "$ac_cv_header_stdc" >&6; }
4625if test $ac_cv_header_stdc = yes; then
4626
4627$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4628
4629fi
4630
4631# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4632for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4633 inttypes.h stdint.h unistd.h
4634do :
4635 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4636ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4637"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05004638eval as_val=\$$as_ac_Header
4639 if test "x$as_val" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004640 cat >>confdefs.h <<_ACEOF
4641#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4642_ACEOF
4643
4644fi
4645
4646done
4647
4648
4649
4650 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004651if test "x$ac_cv_header_minix_config_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004652 MINIX=yes
4653else
4654 MINIX=
4655fi
4656
4657
4658 if test "$MINIX" = yes; then
4659
4660$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4661
4662
4663$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4664
4665
4666$as_echo "#define _MINIX 1" >>confdefs.h
4667
4668 fi
4669
4670
4671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4672$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004673if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004674 $as_echo_n "(cached) " >&6
4675else
4676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4677/* end confdefs.h. */
4678
4679# define __EXTENSIONS__ 1
4680 $ac_includes_default
4681int
4682main ()
4683{
4684
4685 ;
4686 return 0;
4687}
4688_ACEOF
4689if ac_fn_c_try_compile "$LINENO"; then :
4690 ac_cv_safe_to_define___extensions__=yes
4691else
4692 ac_cv_safe_to_define___extensions__=no
4693fi
4694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4695fi
4696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4697$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4698 test $ac_cv_safe_to_define___extensions__ = yes &&
4699 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4700
4701 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4702
4703 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4704
4705 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4706
4707 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4708
4709
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004710
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004711# Check for unsupported systems
4712case $ac_sys_system/$ac_sys_release in
4713atheos*|Linux*/1*)
4714 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4715 echo See README for details.
4716 exit 1;;
4717esac
4718
4719
Matthias Kloseb9621712010-04-24 17:59:49 +00004720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4721$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004722
4723# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004724if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004725 withval=$with_suffix;
4726 case $withval in
4727 no) EXEEXT=;;
4728 yes) EXEEXT=.exe;;
4729 *) EXEEXT=$withval;;
4730 esac
4731fi
4732
Matthias Kloseb9621712010-04-24 17:59:49 +00004733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4734$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004735
4736# Test whether we're running on a non-case-sensitive system, in which
4737# case we give a warning if no ext is given
4738
Matthias Kloseb9621712010-04-24 17:59:49 +00004739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4740$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004741if test ! -d CaseSensitiveTestDir; then
4742mkdir CaseSensitiveTestDir
4743fi
4744
4745if test -d casesensitivetestdir
4746then
Matthias Kloseb9621712010-04-24 17:59:49 +00004747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4748$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004749 BUILDEXEEXT=.exe
4750else
Matthias Kloseb9621712010-04-24 17:59:49 +00004751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4752$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004753 BUILDEXEEXT=$EXEEXT
4754fi
4755rmdir CaseSensitiveTestDir
4756
4757case $MACHDEP in
4758bsdos*)
4759 case $CC in
4760 gcc) CC="$CC -D_HAVE_BSDI";;
4761 esac;;
4762esac
4763
4764case $ac_sys_system in
4765hp*|HP*)
4766 case $CC in
4767 cc|*/cc) CC="$CC -Ae";;
4768 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004769esac
4770
4771
4772
Matthias Kloseb9621712010-04-24 17:59:49 +00004773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4774$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004775if test -z "$LIBRARY"
4776then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004777 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4780$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004781
4782# LDLIBRARY is the name of the library to link against (as opposed to the
4783# name of the library into which to insert object files). BLDLIBRARY is also
4784# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4785# is blank as the main program is not linked directly against LDLIBRARY.
4786# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4787# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4788# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4789# DLLLIBRARY is the shared (i.e., DLL) library.
4790#
4791# RUNSHARED is used to run shared python without installed libraries
4792#
4793# INSTSONAME is the name of the shared library that will be use to install
4794# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004795#
4796# LDVERSION is the shared library version number, normally the Python version
4797# with the ABI build flags appended.
4798
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004799
4800
4801
4802
4803
4804
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004805
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004806LDLIBRARY="$LIBRARY"
4807BLDLIBRARY='$(LDLIBRARY)'
4808INSTSONAME='$(LDLIBRARY)'
4809DLLLIBRARY=''
4810LDLIBRARYDIR=''
4811RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004812LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004813
4814# LINKCC is the command that links the python executable -- default is $(CC).
4815# If CXX is set, and if it is needed to link a main function that was
4816# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4817# python might then depend on the C++ runtime
4818# This is altered for AIX in order to build the export list before
4819# linking.
4820
Matthias Kloseb9621712010-04-24 17:59:49 +00004821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4822$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004823if test -z "$LINKCC"
4824then
4825 LINKCC='$(PURIFY) $(MAINCC)'
4826 case $ac_sys_system in
4827 AIX*)
4828 exp_extra="\"\""
4829 if test $ac_sys_release -ge 5 -o \
4830 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4831 exp_extra="."
4832 fi
4833 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004834 QNX*)
4835 # qcc must be used because the other compilers do not
4836 # support -N.
4837 LINKCC=qcc;;
4838 esac
4839fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4841$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004842
4843# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4844# make sure we default having it set to "no": this is used by
4845# distutils.unixccompiler to know if it should add --enable-new-dtags
4846# to linker command lines, and failing to detect GNU ld simply results
4847# in the same bahaviour as before.
4848
Matthias Kloseb9621712010-04-24 17:59:49 +00004849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4850$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004851ac_prog=ld
4852if test "$GCC" = yes; then
4853 ac_prog=`$CC -print-prog-name=ld`
4854fi
4855case `"$ac_prog" -V 2>&1 < /dev/null` in
4856 *GNU*)
4857 GNULD=yes;;
4858 *)
4859 GNULD=no;;
4860esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4862$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004863
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4865$as_echo_n "checking for inline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004866if test "${ac_cv_c_inline+set}" = set; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004867 $as_echo_n "(cached) " >&6
4868else
4869 ac_cv_c_inline=no
4870for ac_kw in inline __inline__ __inline; do
4871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4872/* end confdefs.h. */
4873#ifndef __cplusplus
4874typedef int foo_t;
4875static $ac_kw foo_t static_foo () {return 0; }
4876$ac_kw foo_t foo () {return 0; }
4877#endif
4878
4879_ACEOF
4880if ac_fn_c_try_compile "$LINENO"; then :
4881 ac_cv_c_inline=$ac_kw
4882fi
4883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4884 test "$ac_cv_c_inline" != no && break
4885done
4886
4887fi
4888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4889$as_echo "$ac_cv_c_inline" >&6; }
4890
4891case $ac_cv_c_inline in
4892 inline | yes) ;;
4893 *)
4894 case $ac_cv_c_inline in
4895 no) ac_val=;;
4896 *) ac_val=$ac_cv_c_inline;;
4897 esac
4898 cat >>confdefs.h <<_ACEOF
4899#ifndef __cplusplus
4900#define inline $ac_val
4901#endif
4902_ACEOF
4903 ;;
4904esac
4905
4906if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004907
4908$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004909
4910
4911fi
4912
4913
Matthias Kloseb9621712010-04-24 17:59:49 +00004914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4915$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004916# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004917if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004918 enableval=$enable_shared;
4919fi
4920
4921
4922if test -z "$enable_shared"
4923then
4924 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004925 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004926 enable_shared="yes";;
4927 *)
4928 enable_shared="no";;
4929 esac
4930fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4932$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004933
Matthias Kloseb9621712010-04-24 17:59:49 +00004934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4935$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004936# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004937if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004938 enableval=$enable_profiling; ac_save_cc="$CC"
4939 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004940 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004941 ac_enable_profiling="no"
4942else
Matthias Kloseb9621712010-04-24 17:59:49 +00004943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004944/* end confdefs.h. */
4945int main() { return 0; }
4946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004947if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004948 ac_enable_profiling="yes"
4949else
Matthias Kloseb9621712010-04-24 17:59:49 +00004950 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004951fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004952rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4953 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004954fi
4955
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004956 CC="$ac_save_cc"
4957fi
4958
Matthias Kloseb9621712010-04-24 17:59:49 +00004959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4960$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004961
4962case "$ac_enable_profiling" in
4963 "yes")
4964 BASECFLAGS="-pg $BASECFLAGS"
4965 LDFLAGS="-pg $LDFLAGS"
4966 ;;
4967esac
4968
Matthias Kloseb9621712010-04-24 17:59:49 +00004969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4970$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004971
4972# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4973# library that we build, but we do not want to link against it (we
4974# will find it with a -framework option). For this reason there is an
4975# extra variable BLDLIBRARY against which Python and the extension
4976# modules are linked, BLDLIBRARY. This is normally the same as
4977# LDLIBRARY, but empty for MacOSX framework builds.
4978if test "$enable_framework"
4979then
4980 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4981 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4982 BLDLIBRARY=''
4983else
4984 BLDLIBRARY='$(LDLIBRARY)'
4985fi
4986
4987# Other platforms follow
4988if test $enable_shared = "yes"; then
4989
Matthias Kloseb9621712010-04-24 17:59:49 +00004990$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004991
4992 case $ac_sys_system in
4993 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004994 LDLIBRARY='libpython$(LDVERSION).dll.a'
4995 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004996 ;;
4997 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004998 LDLIBRARY='libpython$(LDVERSION).so'
4999 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005000 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5001 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005002 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005003 then
5004 PY3LIBRARY=libpython3.so
5005 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005006 ;;
5007 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005008 LDLIBRARY='libpython$(LDVERSION).so'
5009 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005010 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5011 case $ac_sys_system in
5012 FreeBSD*)
5013 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5014 ;;
5015 esac
5016 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005017 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005018 then
5019 PY3LIBRARY=libpython3.so
5020 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005021 ;;
5022 hp*|HP*)
5023 case `uname -m` in
5024 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005025 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005026 ;;
5027 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005028 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005029 ;;
5030 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005031 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005032 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5033 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005034 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005035 LDLIBRARY='libpython$(LDVERSION).dylib'
5036 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005037 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5038 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005039 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005040 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005041 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5042 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005043
5044 esac
5045else # shared is disabled
5046 case $ac_sys_system in
5047 CYGWIN*)
5048 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005049 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005050 ;;
5051 esac
5052fi
5053
Matthias Kloseb9621712010-04-24 17:59:49 +00005054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5055$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005056
5057if test -n "$ac_tool_prefix"; then
5058 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5059set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5061$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005062if test "${ac_cv_prog_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005063 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005064else
5065 if test -n "$RANLIB"; then
5066 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5067else
5068as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5069for as_dir in $PATH
5070do
5071 IFS=$as_save_IFS
5072 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005073 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005074 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5075 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005076 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005077 break 2
5078 fi
5079done
Matthias Kloseb9621712010-04-24 17:59:49 +00005080 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005081IFS=$as_save_IFS
5082
5083fi
5084fi
5085RANLIB=$ac_cv_prog_RANLIB
5086if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5088$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005089else
Matthias Kloseb9621712010-04-24 17:59:49 +00005090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5091$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005092fi
5093
5094
5095fi
5096if test -z "$ac_cv_prog_RANLIB"; then
5097 ac_ct_RANLIB=$RANLIB
5098 # Extract the first word of "ranlib", so it can be a program name with args.
5099set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5101$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005102if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005103 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005104else
5105 if test -n "$ac_ct_RANLIB"; then
5106 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5107else
5108as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5109for as_dir in $PATH
5110do
5111 IFS=$as_save_IFS
5112 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005113 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005114 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5115 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005116 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005117 break 2
5118 fi
5119done
Matthias Kloseb9621712010-04-24 17:59:49 +00005120 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005121IFS=$as_save_IFS
5122
5123fi
5124fi
5125ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5126if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5128$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005129else
Matthias Kloseb9621712010-04-24 17:59:49 +00005130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5131$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005132fi
5133
5134 if test "x$ac_ct_RANLIB" = x; then
5135 RANLIB=":"
5136 else
5137 case $cross_compiling:$ac_tool_warned in
5138yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005139{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5140$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005141ac_tool_warned=yes ;;
5142esac
5143 RANLIB=$ac_ct_RANLIB
5144 fi
5145else
5146 RANLIB="$ac_cv_prog_RANLIB"
5147fi
5148
5149
5150for ac_prog in ar aal
5151do
5152 # Extract the first word of "$ac_prog", so it can be a program name with args.
5153set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5155$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005156if test "${ac_cv_prog_AR+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005157 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005158else
5159 if test -n "$AR"; then
5160 ac_cv_prog_AR="$AR" # Let the user override the test.
5161else
5162as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5163for as_dir in $PATH
5164do
5165 IFS=$as_save_IFS
5166 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005167 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005168 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5169 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005170 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005171 break 2
5172 fi
5173done
Matthias Kloseb9621712010-04-24 17:59:49 +00005174 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005175IFS=$as_save_IFS
5176
5177fi
5178fi
5179AR=$ac_cv_prog_AR
5180if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5182$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005183else
Matthias Kloseb9621712010-04-24 17:59:49 +00005184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5185$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005186fi
5187
5188
5189 test -n "$AR" && break
5190done
5191test -n "$AR" || AR="ar"
5192
5193
5194# tweak ARFLAGS only if the user didn't set it on the command line
5195
5196if test -z "$ARFLAGS"
5197then
5198 ARFLAGS="rc"
5199fi
5200
5201
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005202DISABLE_ASDLGEN=""
5203# Extract the first word of "python", so it can be a program name with args.
5204set dummy python; ac_word=$2
5205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5206$as_echo_n "checking for $ac_word... " >&6; }
5207if test "${ac_cv_prog_HAS_PYTHON+set}" = set; then :
5208 $as_echo_n "(cached) " >&6
5209else
5210 if test -n "$HAS_PYTHON"; then
5211 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5212else
5213as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5214for as_dir in $PATH
5215do
5216 IFS=$as_save_IFS
5217 test -z "$as_dir" && as_dir=.
5218 for ac_exec_ext in '' $ac_executable_extensions; do
5219 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5220 ac_cv_prog_HAS_PYTHON="found"
5221 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5222 break 2
5223 fi
5224done
5225 done
5226IFS=$as_save_IFS
5227
5228 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5229fi
5230fi
5231HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5232if test -n "$HAS_PYTHON"; then
5233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5234$as_echo "$HAS_PYTHON" >&6; }
5235else
5236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5237$as_echo "no" >&6; }
5238fi
5239
5240
5241if test $HAS_HG != found -o $HAS_PYTHON != found
5242then
5243 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5244fi
5245
5246
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005247case $MACHDEP in
5248bsdos*|hp*|HP*)
5249 # install -d does not work on BSDI or HP-UX
5250 if test -z "$INSTALL"
5251 then
5252 INSTALL="${srcdir}/install-sh -c"
5253 fi
5254esac
5255ac_aux_dir=
5256for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005257 for ac_t in install-sh install.sh shtool; do
5258 if test -f "$ac_dir/$ac_t"; then
5259 ac_aux_dir=$ac_dir
5260 ac_install_sh="$ac_aux_dir/$ac_t -c"
5261 break 2
5262 fi
5263 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005264done
5265if test -z "$ac_aux_dir"; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005266 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005267fi
5268
5269# These three variables are undocumented and unsupported,
5270# and are intended to be withdrawn in a future Autoconf release.
5271# They can cause serious problems if a builder's source tree is in a directory
5272# whose full name contains unusual characters.
5273ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5274ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5275ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5276
5277
5278# Find a good install program. We prefer a C program (faster),
5279# so one script is as good as another. But avoid the broken or
5280# incompatible versions:
5281# SysV /etc/install, /usr/sbin/install
5282# SunOS /usr/etc/install
5283# IRIX /sbin/install
5284# AIX /bin/install
5285# AmigaOS /C/install, which installs bootblocks on floppy discs
5286# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5287# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5288# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5289# OS/2's system install, which has a completely different semantic
5290# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005291# Reject install programs that cannot install multiple files.
5292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5293$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005294if test -z "$INSTALL"; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005295if test "${ac_cv_path_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005296 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005297else
5298 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5299for as_dir in $PATH
5300do
5301 IFS=$as_save_IFS
5302 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005303 # Account for people who put trailing slashes in PATH elements.
5304case $as_dir/ in #((
5305 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005306 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005307 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005308 /usr/ucb/* ) ;;
5309 *)
5310 # OSF1 and SCO ODT 3.0 have their own names for install.
5311 # Don't use installbsd from OSF since it installs stuff as root
5312 # by default.
5313 for ac_prog in ginstall scoinst install; do
5314 for ac_exec_ext in '' $ac_executable_extensions; do
5315 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5316 if test $ac_prog = install &&
5317 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5318 # AIX install. It has an incompatible calling convention.
5319 :
5320 elif test $ac_prog = install &&
5321 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5322 # program-specific install script used by HP pwplus--don't use.
5323 :
5324 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005325 rm -rf conftest.one conftest.two conftest.dir
5326 echo one > conftest.one
5327 echo two > conftest.two
5328 mkdir conftest.dir
5329 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5330 test -s conftest.one && test -s conftest.two &&
5331 test -s conftest.dir/conftest.one &&
5332 test -s conftest.dir/conftest.two
5333 then
5334 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5335 break 3
5336 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005337 fi
5338 fi
5339 done
5340 done
5341 ;;
5342esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005343
5344 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005345IFS=$as_save_IFS
5346
Matthias Kloseb9621712010-04-24 17:59:49 +00005347rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005348
5349fi
5350 if test "${ac_cv_path_install+set}" = set; then
5351 INSTALL=$ac_cv_path_install
5352 else
5353 # As a last resort, use the slow shell script. Don't cache a
5354 # value for INSTALL within a source directory, because that will
5355 # break other packages using the cache if that directory is
5356 # removed, or if the value is a relative name.
5357 INSTALL=$ac_install_sh
5358 fi
5359fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5361$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005362
5363# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5364# It thinks the first close brace ends the variable substitution.
5365test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5366
5367test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5368
5369test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5370
5371
5372# Not every filesystem supports hard links
5373
5374if test -z "$LN" ; then
5375 case $ac_sys_system in
5376 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005377 *) LN=ln;;
5378 esac
5379fi
5380
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005381# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005382
5383ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005384
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005385# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5387$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005388
5389# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005390if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005391 withval=$with_pydebug;
5392if test "$withval" != no
5393then
5394
Matthias Kloseb9621712010-04-24 17:59:49 +00005395$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005396
Matthias Kloseb9621712010-04-24 17:59:49 +00005397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5398$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005399 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005400 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005401else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5402$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005403fi
5404else
Matthias Kloseb9621712010-04-24 17:59:49 +00005405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5406$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005407fi
5408
5409
5410# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5411# merged with this chunk of code?
5412
5413# Optimizer/debugger flags
5414# ------------------------
5415# (The following bit of code is complicated enough - please keep things
5416# indented properly. Just pretend you're editing Python code. ;-)
5417
5418# There are two parallel sets of case statements below, one that checks to
5419# see if OPT was set and one that does BASECFLAGS setting based upon
5420# compiler and platform. BASECFLAGS tweaks need to be made even if the
5421# user set OPT.
5422
5423# tweak OPT based on compiler and platform, only if the user didn't set
5424# it on the command line
5425
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005426if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005427then
5428 case $GCC in
5429 yes)
5430 if test "$CC" != 'g++' ; then
5431 STRICT_PROTO="-Wstrict-prototypes"
5432 fi
5433 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5434 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5435 WRAP="-fwrapv"
5436 fi
5437 case $ac_cv_prog_cc_g in
5438 yes)
5439 if test "$Py_DEBUG" = 'true' ; then
5440 # Optimization messes up debuggers, so turn it off for
5441 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005442 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005443 else
5444 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5445 fi
5446 ;;
5447 *)
5448 OPT="-O3 -Wall $STRICT_PROTO"
5449 ;;
5450 esac
5451 case $ac_sys_system in
5452 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5453 ;;
5454 esac
5455 ;;
5456
5457 *)
5458 OPT="-O"
5459 ;;
5460 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005461fi
5462
5463
5464
5465# The -arch flags for universal builds on OSX
5466UNIVERSAL_ARCH_FLAGS=
5467
5468
5469# tweak BASECFLAGS based on compiler and platform
5470case $GCC in
5471yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005472 # Python doesn't violate C99 aliasing rules, but older versions of
5473 # GCC produce warnings for legal Python code. Enable
5474 # -fno-strict-aliasing on versions of GCC that support but produce
5475 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5477$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005478 ac_save_cc="$CC"
5479 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005480 save_CFLAGS="$CFLAGS"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005481 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005482 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005483else
Matthias Kloseb9621712010-04-24 17:59:49 +00005484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005485/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005486
Matthias Kloseb159a552010-04-25 21:00:44 +00005487
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005488int
5489main ()
5490{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005491
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005492 ;
5493 return 0;
5494}
Matthias Kloseb159a552010-04-25 21:00:44 +00005495
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005496_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005497if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005498
5499 CC="$ac_save_cc -fstrict-aliasing"
5500 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005502/* end confdefs.h. */
5503
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005504 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005505int
5506main ()
5507{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005508double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005509 ;
5510 return 0;
5511}
Matthias Kloseb159a552010-04-25 21:00:44 +00005512
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005514if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005515
5516 ac_cv_no_strict_aliasing=no
5517
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005518else
Matthias Kloseb159a552010-04-25 21:00:44 +00005519
5520 ac_cv_no_strict_aliasing=yes
5521
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005522fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005524
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005525else
Matthias Kloseb159a552010-04-25 21:00:44 +00005526
5527 ac_cv_no_strict_aliasing=no
5528
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005529fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005531fi
5532
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005533 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005534 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5536$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005537 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005538 then
5539 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5540 fi
5541
5542 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5543 # support. Without this, treatment of subnormals doesn't follow
5544 # the standard.
5545 case $ac_sys_machine in
5546 alpha*)
5547 BASECFLAGS="$BASECFLAGS -mieee"
5548 ;;
5549 esac
5550
5551 case $ac_sys_system in
5552 SCO_SV*)
5553 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5554 ;;
5555 # is there any other compiler on Darwin besides gcc?
5556 Darwin*)
5557 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5558 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005559 if test "${CC}" = gcc
5560 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5562$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005563 case "${UNIVERSALSDK}" in
5564 */MacOSX10.4u.sdk)
5565 # Build using 10.4 SDK, force usage of gcc when the
5566 # compiler is gcc, otherwise the user will get very
5567 # confusing error messages when building on OSX 10.6
5568 CC=gcc-4.0
5569 CPP=cpp-4.0
5570 ;;
5571 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5573$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005574 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005575
5576
5577 if test "${enable_universalsdk}"; then
5578 UNIVERSAL_ARCH_FLAGS=""
5579 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5580 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5581 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005582 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005583 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5584 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005585 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005586 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005587
5588 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5589 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005590 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005591 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005592
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005593 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5594 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005595 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005596 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005597
5598 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5599 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005600 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005601 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005602
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005603 else
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005604 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 +00005605
5606 fi
5607
5608
Ronald Oussoren666028b2010-04-18 19:07:43 +00005609 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5610 if test "${UNIVERSALSDK}" != "/"
5611 then
5612 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5613 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005614 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005615 fi
5616 fi
5617
5618 # Calculate the right deployment target for this build.
5619 #
5620 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5621 if test ${cur_target} '>' 10.2; then
5622 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005623 if test ${enable_universalsdk}; then
5624 if test "${UNIVERSAL_ARCHS}" = "all"; then
5625 # Ensure that the default platform for a
5626 # 4-way universal build is OSX 10.5,
5627 # that's the first OS release where
5628 # 4-way builds make sense.
5629 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005630
5631 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5632 cur_target='10.5'
5633
5634 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5635 cur_target='10.5'
5636
5637 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5638 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005639 fi
5640 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005641 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005642 # On Intel macs default to a deployment
5643 # target of 10.4, that's the first OSX
5644 # release with Intel support.
5645 cur_target="10.4"
5646 fi
5647 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005648 fi
5649 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5650
5651 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5652 # environment with a value that is the same as what we'll use
5653 # in the Makefile to ensure that we'll get the same compiler
5654 # environment during configure and build time.
5655 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5656 export MACOSX_DEPLOYMENT_TARGET
5657 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5658
5659 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005660 esac
5661 ;;
5662
5663*)
5664 case $ac_sys_system in
5665 OpenUNIX*|UnixWare*)
5666 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5667 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005668 SCO_SV*)
5669 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5670 ;;
5671 esac
5672 ;;
5673esac
5674
5675if test "$Py_DEBUG" = 'true'; then
5676 :
5677else
5678 OPT="-DNDEBUG $OPT"
5679fi
5680
5681if test "$ac_arch_flags"
5682then
5683 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5684fi
5685
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005686# Check whether GCC supports PyArg_ParseTuple format
5687if test "$GCC" = "yes"
5688then
Matthias Kloseb9621712010-04-24 17:59:49 +00005689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5690$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005691 save_CFLAGS=$CFLAGS
5692 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005694/* end confdefs.h. */
5695
5696 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697int
5698main ()
5699{
5700
5701 ;
5702 return 0;
5703}
Matthias Kloseb159a552010-04-25 21:00:44 +00005704
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005706if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707
Matthias Kloseb159a552010-04-25 21:00:44 +00005708
Matthias Kloseb9621712010-04-24 17:59:49 +00005709$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710
Matthias Kloseb159a552010-04-25 21:00:44 +00005711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005712$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005713
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714else
Matthias Kloseb159a552010-04-25 21:00:44 +00005715
5716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005717$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718
5719fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5721 CFLAGS=$save_CFLAGS
5722fi
5723
5724# On some compilers, pthreads are available without further options
5725# (e.g. MacOS X). On some of these systems, the compiler will not
5726# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5727# So we have to see first whether pthreads are available without
5728# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5730$as_echo_n "checking whether pthreads are available without options... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005731if test "${ac_cv_pthread_is_default+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005732 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733else
Matthias Kloseb9621712010-04-24 17:59:49 +00005734 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735 ac_cv_pthread_is_default=no
5736else
Matthias Kloseb9621712010-04-24 17:59:49 +00005737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005738/* end confdefs.h. */
5739
5740#include <pthread.h>
5741
5742void* routine(void* p){return NULL;}
5743
5744int main(){
5745 pthread_t p;
5746 if(pthread_create(&p,NULL,routine,NULL)!=0)
5747 return 1;
5748 (void)pthread_detach(p);
5749 return 0;
5750}
5751
5752_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005753if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754
5755 ac_cv_pthread_is_default=yes
5756 ac_cv_kthread=no
5757 ac_cv_pthread=no
5758
5759else
Matthias Kloseb9621712010-04-24 17:59:49 +00005760 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005762rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5763 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005764fi
5765
5766
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005767fi
5768
Matthias Kloseb9621712010-04-24 17:59:49 +00005769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5770$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005771
5772
5773if test $ac_cv_pthread_is_default = yes
5774then
5775 ac_cv_kpthread=no
5776else
5777# -Kpthread, if available, provides the right #defines
5778# and linker options to make pthread_create available
5779# Some compilers won't report that they do not support -Kpthread,
5780# so we need to run a program to see whether it really made the
5781# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5783$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005784if test "${ac_cv_kpthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005785 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005786else
5787 ac_save_cc="$CC"
5788CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005789if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790 ac_cv_kpthread=no
5791else
Matthias Kloseb9621712010-04-24 17:59:49 +00005792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005793/* end confdefs.h. */
5794
5795#include <pthread.h>
5796
5797void* routine(void* p){return NULL;}
5798
5799int main(){
5800 pthread_t p;
5801 if(pthread_create(&p,NULL,routine,NULL)!=0)
5802 return 1;
5803 (void)pthread_detach(p);
5804 return 0;
5805}
5806
5807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005808if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809 ac_cv_kpthread=yes
5810else
Matthias Kloseb9621712010-04-24 17:59:49 +00005811 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005813rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5814 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005815fi
5816
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817CC="$ac_save_cc"
5818fi
5819
Matthias Kloseb9621712010-04-24 17:59:49 +00005820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5821$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822fi
5823
5824if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5825then
5826# -Kthread, if available, provides the right #defines
5827# and linker options to make pthread_create available
5828# Some compilers won't report that they do not support -Kthread,
5829# so we need to run a program to see whether it really made the
5830# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5832$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005833if test "${ac_cv_kthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005834 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835else
5836 ac_save_cc="$CC"
5837CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005838if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005839 ac_cv_kthread=no
5840else
Matthias Kloseb9621712010-04-24 17:59:49 +00005841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005842/* end confdefs.h. */
5843
5844#include <pthread.h>
5845
5846void* routine(void* p){return NULL;}
5847
5848int main(){
5849 pthread_t p;
5850 if(pthread_create(&p,NULL,routine,NULL)!=0)
5851 return 1;
5852 (void)pthread_detach(p);
5853 return 0;
5854}
5855
5856_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005857if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858 ac_cv_kthread=yes
5859else
Matthias Kloseb9621712010-04-24 17:59:49 +00005860 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005861fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005862rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5863 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864fi
5865
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005866CC="$ac_save_cc"
5867fi
5868
Matthias Kloseb9621712010-04-24 17:59:49 +00005869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5870$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005871fi
5872
5873if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5874then
5875# -pthread, if available, provides the right #defines
5876# and linker options to make pthread_create available
5877# Some compilers won't report that they do not support -pthread,
5878# so we need to run a program to see whether it really made the
5879# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5881$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005882if test "${ac_cv_thread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005883 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884else
5885 ac_save_cc="$CC"
5886CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005887if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005888 ac_cv_pthread=no
5889else
Matthias Kloseb9621712010-04-24 17:59:49 +00005890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891/* end confdefs.h. */
5892
5893#include <pthread.h>
5894
5895void* routine(void* p){return NULL;}
5896
5897int main(){
5898 pthread_t p;
5899 if(pthread_create(&p,NULL,routine,NULL)!=0)
5900 return 1;
5901 (void)pthread_detach(p);
5902 return 0;
5903}
5904
5905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005906if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907 ac_cv_pthread=yes
5908else
Matthias Kloseb9621712010-04-24 17:59:49 +00005909 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005911rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5912 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913fi
5914
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915CC="$ac_save_cc"
5916fi
5917
Matthias Kloseb9621712010-04-24 17:59:49 +00005918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5919$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005920fi
5921
5922# If we have set a CC compiler flag for thread support then
5923# check if it works for CXX, too.
5924ac_cv_cxx_thread=no
5925if test ! -z "$CXX"
5926then
Matthias Kloseb9621712010-04-24 17:59:49 +00005927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5928$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929ac_save_cxx="$CXX"
5930
5931if test "$ac_cv_kpthread" = "yes"
5932then
5933 CXX="$CXX -Kpthread"
5934 ac_cv_cxx_thread=yes
5935elif test "$ac_cv_kthread" = "yes"
5936then
5937 CXX="$CXX -Kthread"
5938 ac_cv_cxx_thread=yes
5939elif test "$ac_cv_pthread" = "yes"
5940then
5941 CXX="$CXX -pthread"
5942 ac_cv_cxx_thread=yes
5943fi
5944
5945if test $ac_cv_cxx_thread = yes
5946then
5947 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5948 $CXX -c conftest.$ac_ext 2>&5
5949 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5950 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5951 then
5952 ac_cv_cxx_thread=yes
5953 else
5954 ac_cv_cxx_thread=no
5955 fi
5956 rm -fr conftest*
5957fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5959$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005960fi
5961CXX="$ac_save_cxx"
5962
5963
5964# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5966$as_echo_n "checking for ANSI C header files... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005967if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005968 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005969else
Matthias Kloseb9621712010-04-24 17:59:49 +00005970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971/* end confdefs.h. */
5972#include <stdlib.h>
5973#include <stdarg.h>
5974#include <string.h>
5975#include <float.h>
5976
5977int
5978main ()
5979{
5980
5981 ;
5982 return 0;
5983}
5984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005985if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005986 ac_cv_header_stdc=yes
5987else
Matthias Kloseb9621712010-04-24 17:59:49 +00005988 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005989fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5991
5992if test $ac_cv_header_stdc = yes; then
5993 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005995/* end confdefs.h. */
5996#include <string.h>
5997
5998_ACEOF
5999if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006000 $EGREP "memchr" >/dev/null 2>&1; then :
6001
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006002else
6003 ac_cv_header_stdc=no
6004fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006005rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006006
6007fi
6008
6009if test $ac_cv_header_stdc = yes; then
6010 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006012/* end confdefs.h. */
6013#include <stdlib.h>
6014
6015_ACEOF
6016if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006017 $EGREP "free" >/dev/null 2>&1; then :
6018
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006019else
6020 ac_cv_header_stdc=no
6021fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006022rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006023
6024fi
6025
6026if test $ac_cv_header_stdc = yes; then
6027 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006028 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006029 :
6030else
Matthias Kloseb9621712010-04-24 17:59:49 +00006031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006032/* end confdefs.h. */
6033#include <ctype.h>
6034#include <stdlib.h>
6035#if ((' ' & 0x0FF) == 0x020)
6036# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6037# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6038#else
6039# define ISLOWER(c) \
6040 (('a' <= (c) && (c) <= 'i') \
6041 || ('j' <= (c) && (c) <= 'r') \
6042 || ('s' <= (c) && (c) <= 'z'))
6043# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6044#endif
6045
6046#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6047int
6048main ()
6049{
6050 int i;
6051 for (i = 0; i < 256; i++)
6052 if (XOR (islower (i), ISLOWER (i))
6053 || toupper (i) != TOUPPER (i))
6054 return 2;
6055 return 0;
6056}
6057_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006058if ac_fn_c_try_run "$LINENO"; then :
6059
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006060else
Matthias Kloseb9621712010-04-24 17:59:49 +00006061 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006062fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006063rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6064 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006065fi
6066
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006067fi
6068fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6070$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006071if test $ac_cv_header_stdc = yes; then
6072
Matthias Kloseb9621712010-04-24 17:59:49 +00006073$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006074
6075fi
6076
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006077for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6078fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006079ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006080shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006081unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006082sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6083sys/lock.h sys/mkdev.h sys/modem.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006084sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
6085sys/stat.h sys/termio.h sys/time.h \
6086sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006087libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006088bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006089do :
6090 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6091ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006092eval as_val=\$$as_ac_Header
6093 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006094 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006095#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006096_ACEOF
6097
6098fi
6099
Guido van Rossum627b2d71993-12-24 10:39:16 +00006100done
6101
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006102ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006103for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006104 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6106$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006107if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006108 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006109else
Matthias Kloseb9621712010-04-24 17:59:49 +00006110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006111/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006112#include <sys/types.h>
6113#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006114
Martin v. Löwis11437992002-04-12 09:54:03 +00006115int
6116main ()
6117{
6118if ((DIR *) 0)
6119return 0;
6120 ;
6121 return 0;
6122}
6123_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006124if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006125 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006126else
Matthias Kloseb9621712010-04-24 17:59:49 +00006127 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006128fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006130fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006131eval ac_res=\$$as_ac_Header
6132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6133$as_echo "$ac_res" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006134eval as_val=\$$as_ac_Header
6135 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006136 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006137#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006138_ACEOF
6139
6140ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006141fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006142
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006143done
6144# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6145if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6147$as_echo_n "checking for library containing opendir... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006148if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006149 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006150else
Martin v. Löwis11437992002-04-12 09:54:03 +00006151 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006152cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006154
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006155/* Override any GCC internal prototype to avoid an error.
6156 Use char because int might match the return type of a GCC
6157 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006158#ifdef __cplusplus
6159extern "C"
6160#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006161char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006162int
6163main ()
6164{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006165return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006166 ;
6167 return 0;
6168}
6169_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006170for ac_lib in '' dir; do
6171 if test -z "$ac_lib"; then
6172 ac_res="none required"
6173 else
6174 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006175 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006176 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006177 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006178 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006179fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006180rm -f core conftest.err conftest.$ac_objext \
6181 conftest$ac_exeext
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006182 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006183 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006184fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006185done
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006186if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006187
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006188else
6189 ac_cv_search_opendir=no
6190fi
6191rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006192LIBS=$ac_func_search_save_LIBS
6193fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6195$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006196ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006197if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006198 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006199
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006200fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006201
Michael W. Hudson54241132001-12-07 15:38:26 +00006202else
Matthias Kloseb9621712010-04-24 17:59:49 +00006203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6204$as_echo_n "checking for library containing opendir... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006205if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006206 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006207else
6208 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006210/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006211
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006212/* Override any GCC internal prototype to avoid an error.
6213 Use char because int might match the return type of a GCC
6214 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006215#ifdef __cplusplus
6216extern "C"
6217#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006218char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006219int
6220main ()
6221{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006222return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006223 ;
6224 return 0;
6225}
6226_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006227for ac_lib in '' x; do
6228 if test -z "$ac_lib"; then
6229 ac_res="none required"
6230 else
6231 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006232 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006233 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006234 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006235 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006236fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006237rm -f core conftest.err conftest.$ac_objext \
6238 conftest$ac_exeext
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006239 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006240 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006242done
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006243if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006244
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006245else
6246 ac_cv_search_opendir=no
6247fi
6248rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006249LIBS=$ac_func_search_save_LIBS
6250fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6252$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006253ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006254if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006255 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006256
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006257fi
6258
6259fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006260
Matthias Kloseb9621712010-04-24 17:59:49 +00006261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6262$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006263if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006264 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006265else
Matthias Kloseb9621712010-04-24 17:59:49 +00006266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006267/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006268#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006269int
6270main ()
6271{
6272return makedev(0, 0);
6273 ;
6274 return 0;
6275}
6276_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006277if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006278 ac_cv_header_sys_types_h_makedev=yes
6279else
Matthias Kloseb9621712010-04-24 17:59:49 +00006280 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006281fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006282rm -f core conftest.err conftest.$ac_objext \
6283 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006284
6285fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6287$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006288
6289if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006290ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006291if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006292
Matthias Kloseb9621712010-04-24 17:59:49 +00006293$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006294
6295fi
6296
6297
6298
6299 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006300 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006301if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006302
Matthias Kloseb9621712010-04-24 17:59:49 +00006303$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006304
6305fi
6306
6307
6308 fi
6309fi
6310
Michael W. Hudson54241132001-12-07 15:38:26 +00006311
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006312# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
6313for ac_header in net/if.h
6314do :
6315 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
6316#ifdef STDC_HEADERS
6317# include <stdlib.h>
6318# include <stddef.h>
6319#else
6320# ifdef HAVE_STDLIB_H
6321# include <stdlib.h>
6322# endif
6323#endif
6324#ifdef HAVE_SYS_SOCKET_H
6325# include <sys/socket.h>
6326#endif
6327
6328"
6329if test "x$ac_cv_header_net_if_h" = x""yes; then :
6330 cat >>confdefs.h <<_ACEOF
6331#define HAVE_NET_IF_H 1
6332_ACEOF
6333
6334fi
6335
6336done
6337
6338
6339
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006340# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006341for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006342do :
6343 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006344#ifdef HAVE_CURSES_H
6345#include <curses.h>
6346#endif
6347
Matthias Kloseb9621712010-04-24 17:59:49 +00006348"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006349if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006350 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006351#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006352_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006353
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006354fi
6355
6356done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006357
6358
Martin v. Löwis11017b12006-01-14 18:12:57 +00006359# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006360for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006361do :
6362 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 +00006363#ifdef HAVE_ASM_TYPES_H
6364#include <asm/types.h>
6365#endif
6366#ifdef HAVE_SYS_SOCKET_H
6367#include <sys/socket.h>
6368#endif
6369
Matthias Kloseb9621712010-04-24 17:59:49 +00006370"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006371if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006372 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006373#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006374_ACEOF
6375
6376fi
6377
6378done
6379
6380
Guido van Rossum627b2d71993-12-24 10:39:16 +00006381# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006382was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6384$as_echo_n "checking for clock_t in time.h... " >&6; }
6385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006386/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006387#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006388
6389_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006390if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006391 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006392 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006393else
Martin v. Löwis11437992002-04-12 09:54:03 +00006394
6395
Matthias Kloseb9621712010-04-24 17:59:49 +00006396$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006397
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006398
Guido van Rossum627b2d71993-12-24 10:39:16 +00006399fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006400rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006401
Matthias Kloseb9621712010-04-24 17:59:49 +00006402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6403$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006404
Matthias Kloseb9621712010-04-24 17:59:49 +00006405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6406$as_echo_n "checking for makedev... " >&6; }
6407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006408/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006409
Jesus Cea740f53a2010-04-28 11:35:30 +00006410#if defined(MAJOR_IN_MKDEV)
6411#include <sys/mkdev.h>
6412#elif defined(MAJOR_IN_SYSMACROS)
6413#include <sys/sysmacros.h>
6414#else
6415#include <sys/types.h>
6416#endif
6417
Neal Norwitz11690112002-07-30 01:08:28 +00006418int
6419main ()
6420{
Jesus Cea740f53a2010-04-28 11:35:30 +00006421
6422 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006423 ;
6424 return 0;
6425}
Matthias Kloseb159a552010-04-25 21:00:44 +00006426
Neal Norwitz11690112002-07-30 01:08:28 +00006427_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006428if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006429 ac_cv_has_makedev=yes
6430else
Matthias Kloseb9621712010-04-24 17:59:49 +00006431 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006432fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006433rm -f core conftest.err conftest.$ac_objext \
6434 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6436$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006437if test "$ac_cv_has_makedev" = "yes"; then
6438
Matthias Kloseb9621712010-04-24 17:59:49 +00006439$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006440
6441fi
6442
Martin v. Löwis399a6892002-10-04 10:22:02 +00006443# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6444# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6445# defined, but the compiler does not support pragma redefine_extname,
6446# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6447# structures (such as rlimit64) without declaring them. As a
6448# work-around, disable LFS on such configurations
6449
6450use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6452$as_echo_n "checking Solaris LFS bug... " >&6; }
6453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006454/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006455
6456#define _LARGEFILE_SOURCE 1
6457#define _FILE_OFFSET_BITS 64
6458#include <sys/resource.h>
6459
Martin v. Löwis399a6892002-10-04 10:22:02 +00006460int
6461main ()
6462{
6463struct rlimit foo;
6464 ;
6465 return 0;
6466}
6467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006468if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006469 sol_lfs_bug=no
6470else
Matthias Kloseb9621712010-04-24 17:59:49 +00006471 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006472fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6475$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006476if test "$sol_lfs_bug" = "yes"; then
6477 use_lfs=no
6478fi
6479
6480if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006481# Two defines needed to enable largefile support on various platforms
6482# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006483case $ac_sys_system/$ac_sys_release in
6484AIX*)
6485
6486$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6487
6488 ;;
6489esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006490
Matthias Kloseb9621712010-04-24 17:59:49 +00006491$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006492
6493
Matthias Kloseb9621712010-04-24 17:59:49 +00006494$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006495
Martin v. Löwis399a6892002-10-04 10:22:02 +00006496fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006497
Guido van Rossum84e7b241996-08-19 21:59:00 +00006498# Add some code to confdefs.h so that the test for off_t works on SCO
6499cat >> confdefs.h <<\EOF
6500#if defined(SCO_DS)
6501#undef _OFF_T
6502#endif
6503EOF
6504
Guido van Rossumef2255b2000-03-10 22:30:29 +00006505# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006506ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006507if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006508
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006509else
Martin v. Löwis11437992002-04-12 09:54:03 +00006510
6511cat >>confdefs.h <<_ACEOF
6512#define mode_t int
6513_ACEOF
6514
6515fi
6516
Matthias Kloseb9621712010-04-24 17:59:49 +00006517ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006518if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006519
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006520else
Martin v. Löwis11437992002-04-12 09:54:03 +00006521
6522cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006523#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006524_ACEOF
6525
6526fi
6527
Matthias Kloseb9621712010-04-24 17:59:49 +00006528ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006529if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006530
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006531else
Martin v. Löwis11437992002-04-12 09:54:03 +00006532
6533cat >>confdefs.h <<_ACEOF
6534#define pid_t int
6535_ACEOF
6536
6537fi
6538
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006539
Martin v. Löwis11437992002-04-12 09:54:03 +00006540cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006541#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006542_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006543
Matthias Kloseb9621712010-04-24 17:59:49 +00006544ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006545if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006546
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006547else
Martin v. Löwis11437992002-04-12 09:54:03 +00006548
6549cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006550#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006551_ACEOF
6552
6553fi
6554
Matthias Kloseb9621712010-04-24 17:59:49 +00006555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6556$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006557if test "${ac_cv_type_uid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006558 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006559else
Matthias Kloseb9621712010-04-24 17:59:49 +00006560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006561/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006562#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006563
6564_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006565if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006566 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006567 ac_cv_type_uid_t=yes
6568else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006569 ac_cv_type_uid_t=no
6570fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006571rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006572
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6575$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006576if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006577
Matthias Kloseb9621712010-04-24 17:59:49 +00006578$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006579
6580
Matthias Kloseb9621712010-04-24 17:59:49 +00006581$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006582
6583fi
6584
Matthias Kloseb9621712010-04-24 17:59:49 +00006585ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6586case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006587 no|yes) ;; #(
6588 *)
6589
Matthias Kloseb9621712010-04-24 17:59:49 +00006590$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006591
6592
6593cat >>confdefs.h <<_ACEOF
6594#define uint32_t $ac_cv_c_uint32_t
6595_ACEOF
6596;;
6597 esac
6598
Matthias Kloseb9621712010-04-24 17:59:49 +00006599ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6600case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006601 no|yes) ;; #(
6602 *)
6603
Matthias Kloseb9621712010-04-24 17:59:49 +00006604$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006605
6606
6607cat >>confdefs.h <<_ACEOF
6608#define uint64_t $ac_cv_c_uint64_t
6609_ACEOF
6610;;
6611 esac
6612
Matthias Kloseb9621712010-04-24 17:59:49 +00006613ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6614case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006615 no|yes) ;; #(
6616 *)
6617
6618cat >>confdefs.h <<_ACEOF
6619#define int32_t $ac_cv_c_int32_t
6620_ACEOF
6621;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006622esac
6623
Matthias Kloseb9621712010-04-24 17:59:49 +00006624ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6625case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006626 no|yes) ;; #(
6627 *)
6628
6629cat >>confdefs.h <<_ACEOF
6630#define int64_t $ac_cv_c_int64_t
6631_ACEOF
6632;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006633esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006634
Matthias Kloseb9621712010-04-24 17:59:49 +00006635ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006636if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006637
Matthias Kloseb9621712010-04-24 17:59:49 +00006638$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006639
6640fi
6641
Jack Jansendd19cf82001-12-06 22:36:17 +00006642
Michael W. Hudson54241132001-12-07 15:38:26 +00006643# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006644# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006645# The cast to long int works around a bug in the HP C Compiler
6646# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6647# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6648# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6650$as_echo_n "checking size of int... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006651if test "${ac_cv_sizeof_int+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006652 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006653else
Matthias Kloseb9621712010-04-24 17:59:49 +00006654 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 +00006655
Martin v. Löwis11437992002-04-12 09:54:03 +00006656else
Matthias Kloseb9621712010-04-24 17:59:49 +00006657 if test "$ac_cv_type_int" = yes; then
6658 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6659$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006660{ as_fn_set_status 77
6661as_fn_error "cannot compute sizeof (int)
6662See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006663 else
6664 ac_cv_sizeof_int=0
6665 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006666fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006667
Martin v. Löwis11437992002-04-12 09:54:03 +00006668fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6670$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006671
6672
6673
Martin v. Löwis11437992002-04-12 09:54:03 +00006674cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006675#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006676_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006677
6678
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006679# The cast to long int works around a bug in the HP C Compiler
6680# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6681# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6682# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6684$as_echo_n "checking size of long... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006685if test "${ac_cv_sizeof_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006686 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006687else
Matthias Kloseb9621712010-04-24 17:59:49 +00006688 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 +00006689
Martin v. Löwis11437992002-04-12 09:54:03 +00006690else
Matthias Kloseb9621712010-04-24 17:59:49 +00006691 if test "$ac_cv_type_long" = yes; then
6692 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6693$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006694{ as_fn_set_status 77
6695as_fn_error "cannot compute sizeof (long)
6696See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006697 else
6698 ac_cv_sizeof_long=0
6699 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006701
Martin v. Löwis11437992002-04-12 09:54:03 +00006702fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6704$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006705
6706
6707
Martin v. Löwis11437992002-04-12 09:54:03 +00006708cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006709#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006710_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006711
6712
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006713# The cast to long int works around a bug in the HP C Compiler
6714# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6715# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6716# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6718$as_echo_n "checking size of void *... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006719if test "${ac_cv_sizeof_void_p+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006720 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006721else
Matthias Kloseb9621712010-04-24 17:59:49 +00006722 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 +00006723
Martin v. Löwis11437992002-04-12 09:54:03 +00006724else
Matthias Kloseb9621712010-04-24 17:59:49 +00006725 if test "$ac_cv_type_void_p" = yes; then
6726 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6727$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006728{ as_fn_set_status 77
6729as_fn_error "cannot compute sizeof (void *)
6730See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006731 else
6732 ac_cv_sizeof_void_p=0
6733 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006734fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006735
Martin v. Löwis11437992002-04-12 09:54:03 +00006736fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6738$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006739
6740
6741
Martin v. Löwis11437992002-04-12 09:54:03 +00006742cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006743#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006744_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006745
6746
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006747# The cast to long int works around a bug in the HP C Compiler
6748# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6749# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6750# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6752$as_echo_n "checking size of short... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006753if test "${ac_cv_sizeof_short+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006754 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006755else
Matthias Kloseb9621712010-04-24 17:59:49 +00006756 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 +00006757
Martin v. Löwis11437992002-04-12 09:54:03 +00006758else
Matthias Kloseb9621712010-04-24 17:59:49 +00006759 if test "$ac_cv_type_short" = yes; then
6760 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6761$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006762{ as_fn_set_status 77
6763as_fn_error "cannot compute sizeof (short)
6764See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006765 else
6766 ac_cv_sizeof_short=0
6767 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006768fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006769
Martin v. Löwis11437992002-04-12 09:54:03 +00006770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6772$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006773
6774
6775
Martin v. Löwis11437992002-04-12 09:54:03 +00006776cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006777#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006778_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006779
6780
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006781# The cast to long int works around a bug in the HP C Compiler
6782# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6783# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6784# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6786$as_echo_n "checking size of float... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006787if test "${ac_cv_sizeof_float+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006788 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006789else
Matthias Kloseb9621712010-04-24 17:59:49 +00006790 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 +00006791
Martin v. Löwis11437992002-04-12 09:54:03 +00006792else
Matthias Kloseb9621712010-04-24 17:59:49 +00006793 if test "$ac_cv_type_float" = yes; then
6794 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6795$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006796{ as_fn_set_status 77
6797as_fn_error "cannot compute sizeof (float)
6798See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006799 else
6800 ac_cv_sizeof_float=0
6801 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006802fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006803
Martin v. Löwis11437992002-04-12 09:54:03 +00006804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6806$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006807
6808
6809
Martin v. Löwis11437992002-04-12 09:54:03 +00006810cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006811#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006812_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006813
6814
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006815# The cast to long int works around a bug in the HP C Compiler
6816# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6817# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6818# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6820$as_echo_n "checking size of double... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006821if test "${ac_cv_sizeof_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006822 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006823else
Matthias Kloseb9621712010-04-24 17:59:49 +00006824 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 +00006825
Martin v. Löwis11437992002-04-12 09:54:03 +00006826else
Matthias Kloseb9621712010-04-24 17:59:49 +00006827 if test "$ac_cv_type_double" = yes; then
6828 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6829$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006830{ as_fn_set_status 77
6831as_fn_error "cannot compute sizeof (double)
6832See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006833 else
6834 ac_cv_sizeof_double=0
6835 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006836fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006837
Martin v. Löwis11437992002-04-12 09:54:03 +00006838fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6840$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006841
6842
6843
Martin v. Löwis11437992002-04-12 09:54:03 +00006844cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006845#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006846_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006847
6848
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006849# The cast to long int works around a bug in the HP C Compiler
6850# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6851# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6852# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6854$as_echo_n "checking size of fpos_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006855if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006856 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006857else
Matthias Kloseb9621712010-04-24 17:59:49 +00006858 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 +00006859
Martin v. Löwis11437992002-04-12 09:54:03 +00006860else
Matthias Kloseb9621712010-04-24 17:59:49 +00006861 if test "$ac_cv_type_fpos_t" = yes; then
6862 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6863$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006864{ as_fn_set_status 77
6865as_fn_error "cannot compute sizeof (fpos_t)
6866See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006867 else
6868 ac_cv_sizeof_fpos_t=0
6869 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006870fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006871
Martin v. Löwis11437992002-04-12 09:54:03 +00006872fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6874$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006875
6876
6877
Martin v. Löwis11437992002-04-12 09:54:03 +00006878cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006879#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006880_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006881
Michael W. Hudson54241132001-12-07 15:38:26 +00006882
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006883# The cast to long int works around a bug in the HP C Compiler
6884# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6885# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6886# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6888$as_echo_n "checking size of size_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006889if test "${ac_cv_sizeof_size_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006890 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006891else
Matthias Kloseb9621712010-04-24 17:59:49 +00006892 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 +00006893
Martin v. Löwis18e16552006-02-15 17:27:45 +00006894else
Matthias Kloseb9621712010-04-24 17:59:49 +00006895 if test "$ac_cv_type_size_t" = yes; then
6896 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6897$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006898{ as_fn_set_status 77
6899as_fn_error "cannot compute sizeof (size_t)
6900See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006901 else
6902 ac_cv_sizeof_size_t=0
6903 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006905
Martin v. Löwis18e16552006-02-15 17:27:45 +00006906fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6908$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006909
6910
6911
Martin v. Löwis18e16552006-02-15 17:27:45 +00006912cat >>confdefs.h <<_ACEOF
6913#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6914_ACEOF
6915
6916
Christian Heimes400adb02008-02-01 08:12:03 +00006917# The cast to long int works around a bug in the HP C Compiler
6918# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6919# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6920# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6922$as_echo_n "checking size of pid_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006923if test "${ac_cv_sizeof_pid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006924 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006925else
Matthias Kloseb9621712010-04-24 17:59:49 +00006926 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 +00006927
Christian Heimes400adb02008-02-01 08:12:03 +00006928else
Matthias Kloseb9621712010-04-24 17:59:49 +00006929 if test "$ac_cv_type_pid_t" = yes; then
6930 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6931$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006932{ as_fn_set_status 77
6933as_fn_error "cannot compute sizeof (pid_t)
6934See \`config.log' for more details." "$LINENO" 5; }; }
Christian Heimes400adb02008-02-01 08:12:03 +00006935 else
6936 ac_cv_sizeof_pid_t=0
6937 fi
6938fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006939
Christian Heimes400adb02008-02-01 08:12:03 +00006940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6942$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006943
6944
6945
6946cat >>confdefs.h <<_ACEOF
6947#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6948_ACEOF
6949
6950
Michael W. Hudson54241132001-12-07 15:38:26 +00006951
Matthias Kloseb9621712010-04-24 17:59:49 +00006952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6953$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006954have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006956/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006957
Martin v. Löwis11437992002-04-12 09:54:03 +00006958int
6959main ()
6960{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006961long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006962 ;
6963 return 0;
6964}
6965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006966if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006967
6968
Matthias Kloseb9621712010-04-24 17:59:49 +00006969$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006970
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006971 have_long_long=yes
6972
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006973fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6976$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006977if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006978# The cast to long int works around a bug in the HP C Compiler
6979# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6980# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6981# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6983$as_echo_n "checking size of long long... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006984if test "${ac_cv_sizeof_long_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006985 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006986else
Matthias Kloseb9621712010-04-24 17:59:49 +00006987 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 +00006988
Martin v. Löwis11437992002-04-12 09:54:03 +00006989else
Matthias Kloseb9621712010-04-24 17:59:49 +00006990 if test "$ac_cv_type_long_long" = yes; then
6991 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6992$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006993{ as_fn_set_status 77
6994as_fn_error "cannot compute sizeof (long long)
6995See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006996 else
6997 ac_cv_sizeof_long_long=0
6998 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006999fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007000
Martin v. Löwis11437992002-04-12 09:54:03 +00007001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7003$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007004
7005
7006
Martin v. Löwis11437992002-04-12 09:54:03 +00007007cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007008#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007009_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007010
Michael W. Hudson54241132001-12-07 15:38:26 +00007011
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007012fi
7013
Matthias Kloseb9621712010-04-24 17:59:49 +00007014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7015$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007016have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007017cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007018/* end confdefs.h. */
7019
7020int
7021main ()
7022{
7023long double x; x = (long double)0;
7024 ;
7025 return 0;
7026}
7027_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007028if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007029
7030
Matthias Kloseb9621712010-04-24 17:59:49 +00007031$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007032
7033 have_long_double=yes
7034
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007035fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7038$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007039if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007040# The cast to long int works around a bug in the HP C Compiler
7041# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7042# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7043# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7045$as_echo_n "checking size of long double... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007046if test "${ac_cv_sizeof_long_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007047 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007048else
Matthias Kloseb9621712010-04-24 17:59:49 +00007049 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 +00007050
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007051else
Matthias Kloseb9621712010-04-24 17:59:49 +00007052 if test "$ac_cv_type_long_double" = yes; then
7053 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7054$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05007055{ as_fn_set_status 77
7056as_fn_error "cannot compute sizeof (long double)
7057See \`config.log' for more details." "$LINENO" 5; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007058 else
7059 ac_cv_sizeof_long_double=0
7060 fi
7061fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007062
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007063fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7065$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007066
7067
7068
7069cat >>confdefs.h <<_ACEOF
7070#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7071_ACEOF
7072
7073
7074fi
7075
7076
Matthias Kloseb9621712010-04-24 17:59:49 +00007077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7078$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007079have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007081/* end confdefs.h. */
7082
7083int
7084main ()
7085{
7086_Bool x; x = (_Bool)0;
7087 ;
7088 return 0;
7089}
7090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007091if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007092
7093
Matthias Kloseb9621712010-04-24 17:59:49 +00007094$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007095
7096 have_c99_bool=yes
7097
Thomas Woutersb2137042007-02-01 18:02:27 +00007098fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7101$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007102if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007103# The cast to long int works around a bug in the HP C Compiler
7104# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7105# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7106# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7108$as_echo_n "checking size of _Bool... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007109if test "${ac_cv_sizeof__Bool+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007110 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007111else
Matthias Kloseb9621712010-04-24 17:59:49 +00007112 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 +00007113
Thomas Woutersb2137042007-02-01 18:02:27 +00007114else
Matthias Kloseb9621712010-04-24 17:59:49 +00007115 if test "$ac_cv_type__Bool" = yes; then
7116 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7117$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05007118{ as_fn_set_status 77
7119as_fn_error "cannot compute sizeof (_Bool)
7120See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007121 else
7122 ac_cv_sizeof__Bool=0
7123 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007124fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007125
Thomas Woutersb2137042007-02-01 18:02:27 +00007126fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7128$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007129
7130
7131
Thomas Woutersb2137042007-02-01 18:02:27 +00007132cat >>confdefs.h <<_ACEOF
7133#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7134_ACEOF
7135
7136
7137fi
7138
Matthias Kloseb9621712010-04-24 17:59:49 +00007139ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007140 #include <stdint.h>
7141 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007142 #ifdef HAVE_INTTYPES_H
7143 #include <inttypes.h>
7144 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007145"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007146if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007147
7148cat >>confdefs.h <<_ACEOF
7149#define HAVE_UINTPTR_T 1
7150_ACEOF
7151
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007152# The cast to long int works around a bug in the HP C Compiler
7153# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7154# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7155# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7157$as_echo_n "checking size of uintptr_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007158if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007159 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007160else
Matthias Kloseb9621712010-04-24 17:59:49 +00007161 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 +00007162
Martin v. Löwis11437992002-04-12 09:54:03 +00007163else
Matthias Kloseb9621712010-04-24 17:59:49 +00007164 if test "$ac_cv_type_uintptr_t" = yes; then
7165 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7166$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05007167{ as_fn_set_status 77
7168as_fn_error "cannot compute sizeof (uintptr_t)
7169See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007170 else
7171 ac_cv_sizeof_uintptr_t=0
7172 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007173fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007174
Martin v. Löwis11437992002-04-12 09:54:03 +00007175fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7177$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007178
7179
7180
Martin v. Löwis11437992002-04-12 09:54:03 +00007181cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007182#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007183_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007184
Michael W. Hudson54241132001-12-07 15:38:26 +00007185
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007186fi
7187
Thomas Wouters89f507f2006-12-13 04:49:30 +00007188
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007189# The cast to long int works around a bug in the HP C Compiler
7190# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7191# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7192# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7194$as_echo_n "checking size of off_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007195if test "${ac_cv_sizeof_off_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007196 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007197else
Matthias Kloseb9621712010-04-24 17:59:49 +00007198 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007199#ifdef HAVE_SYS_TYPES_H
7200#include <sys/types.h>
7201#endif
7202
Matthias Kloseb9621712010-04-24 17:59:49 +00007203"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007204
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007205else
Matthias Kloseb9621712010-04-24 17:59:49 +00007206 if test "$ac_cv_type_off_t" = yes; then
7207 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7208$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05007209{ as_fn_set_status 77
7210as_fn_error "cannot compute sizeof (off_t)
7211See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007212 else
7213 ac_cv_sizeof_off_t=0
7214 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007215fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007216
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007217fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7219$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007220
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007221
7222
Martin v. Löwis11437992002-04-12 09:54:03 +00007223cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007224#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007225_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007226
Michael W. Hudson54241132001-12-07 15:38:26 +00007227
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007228
Matthias Kloseb9621712010-04-24 17:59:49 +00007229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7230$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007231if test "$have_long_long" = yes
7232then
7233if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007234 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007235
Matthias Kloseb9621712010-04-24 17:59:49 +00007236$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007237
Matthias Kloseb9621712010-04-24 17:59:49 +00007238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7239$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007240else
Matthias Kloseb9621712010-04-24 17:59:49 +00007241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7242$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007243fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007244else
Matthias Kloseb9621712010-04-24 17:59:49 +00007245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7246$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007247fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007248
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007249# The cast to long int works around a bug in the HP C Compiler
7250# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7251# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7252# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7254$as_echo_n "checking size of time_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007255if test "${ac_cv_sizeof_time_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007256 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007257else
Matthias Kloseb9621712010-04-24 17:59:49 +00007258 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007259#ifdef HAVE_SYS_TYPES_H
7260#include <sys/types.h>
7261#endif
7262#ifdef HAVE_TIME_H
7263#include <time.h>
7264#endif
7265
Matthias Kloseb9621712010-04-24 17:59:49 +00007266"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007267
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007268else
Matthias Kloseb9621712010-04-24 17:59:49 +00007269 if test "$ac_cv_type_time_t" = yes; then
7270 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7271$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05007272{ as_fn_set_status 77
7273as_fn_error "cannot compute sizeof (time_t)
7274See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007275 else
7276 ac_cv_sizeof_time_t=0
7277 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007279
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007280fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7282$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007283
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007284
7285
Martin v. Löwis11437992002-04-12 09:54:03 +00007286cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007287#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007288_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007289
Michael W. Hudson54241132001-12-07 15:38:26 +00007290
7291
Trent Mick635f6fb2000-08-23 21:33:05 +00007292# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007293ac_save_cc="$CC"
7294if test "$ac_cv_kpthread" = "yes"
7295then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007296elif test "$ac_cv_kthread" = "yes"
7297then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007298elif test "$ac_cv_pthread" = "yes"
7299then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007300fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007301
Matthias Kloseb9621712010-04-24 17:59:49 +00007302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7303$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007304have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007306/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007307
7308 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007309int
7310main ()
7311{
Guido van Rossum12580492000-09-24 16:47:19 +00007312pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007313 ;
7314 return 0;
7315}
Matthias Kloseb159a552010-04-25 21:00:44 +00007316
Martin v. Löwis11437992002-04-12 09:54:03 +00007317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007318if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007319 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007320fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7323$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007324if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007325 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007326# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7327# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7328# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7330$as_echo_n "checking size of pthread_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007331if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007332 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007333else
Matthias Kloseb9621712010-04-24 17:59:49 +00007334 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007335#ifdef HAVE_PTHREAD_H
7336#include <pthread.h>
7337#endif
7338
Matthias Kloseb9621712010-04-24 17:59:49 +00007339"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007340
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007341else
Matthias Kloseb9621712010-04-24 17:59:49 +00007342 if test "$ac_cv_type_pthread_t" = yes; then
7343 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7344$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05007345{ as_fn_set_status 77
7346as_fn_error "cannot compute sizeof (pthread_t)
7347See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007348 else
7349 ac_cv_sizeof_pthread_t=0
7350 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007351fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007352
Trent Mick635f6fb2000-08-23 21:33:05 +00007353fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7355$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007356
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007357
7358
Martin v. Löwis11437992002-04-12 09:54:03 +00007359cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007360#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007361_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007362
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007363
Trent Mick635f6fb2000-08-23 21:33:05 +00007364fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007365CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007366
Michael W. Hudson54241132001-12-07 15:38:26 +00007367
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007368case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007369 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007370 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7371 ;;
7372 Darwin/*)
7373 OTHER_LIBTOOL_OPT=""
7374 ;;
7375esac
7376
7377
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007378ARCH_RUN_32BIT=""
7379
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007380case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007381 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007382 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7383 if test "${enable_universalsdk}"; then
7384 :
7385 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007386 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007387 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007388 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007389 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007390 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007391 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007392 if test ${gcc_version} '<' 4.0
7393 then
7394 LIBTOOL_CRUFT="-lcc_dynamic"
7395 else
7396 LIBTOOL_CRUFT=""
7397 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007398 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007399 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007400else
Matthias Kloseb9621712010-04-24 17:59:49 +00007401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007402/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007403
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007404 #include <unistd.h>
7405 int main(int argc, char*argv[])
7406 {
7407 if (sizeof(long) == 4) {
7408 return 0;
7409 } else {
7410 return 1;
7411 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007412 }
7413
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007414_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007415if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007416 ac_osx_32bit=yes
7417else
Matthias Kloseb9621712010-04-24 17:59:49 +00007418 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007419fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007420rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7421 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007422fi
7423
7424
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007425 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007426 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007427 i386)
7428 MACOSX_DEFAULT_ARCH="i386"
7429 ;;
7430 ppc)
7431 MACOSX_DEFAULT_ARCH="ppc"
7432 ;;
7433 *)
Benjamin Peterson87cdb812011-05-31 18:26:08 -05007434 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007435 ;;
7436 esac
7437 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007438 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007439 i386)
7440 MACOSX_DEFAULT_ARCH="x86_64"
7441 ;;
7442 ppc)
7443 MACOSX_DEFAULT_ARCH="ppc64"
7444 ;;
7445 *)
Benjamin Peterson87cdb812011-05-31 18:26:08 -05007446 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007447 ;;
7448 esac
7449
7450 #ARCH_RUN_32BIT="true"
7451 fi
7452
7453 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007454 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007455 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007456esac
7457
Matthias Kloseb9621712010-04-24 17:59:49 +00007458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7459$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007460if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007461then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007462 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007463 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007464 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007465
Matthias Kloseb9621712010-04-24 17:59:49 +00007466$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007467
Matthias Kloseb9621712010-04-24 17:59:49 +00007468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7469$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007470 if test $enable_shared = "yes"
7471 then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05007472 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 +00007473 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007474else
Matthias Kloseb9621712010-04-24 17:59:49 +00007475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7476$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007477fi
7478
Matthias Kloseb9621712010-04-24 17:59:49 +00007479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7480$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007481case $ac_sys_system/$ac_sys_release in
7482 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007483
Matthias Kloseb9621712010-04-24 17:59:49 +00007484$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007485
Matthias Kloseb9621712010-04-24 17:59:49 +00007486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7487$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007488 ;;
7489 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7491$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007492 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007493esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007494
Guido van Rossum0a516c91994-09-12 10:58:40 +00007495# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007496
Michael W. Hudson54241132001-12-07 15:38:26 +00007497
7498
7499
7500
Benjamin Peterson99f03762010-04-11 22:15:28 +00007501
Thomas Wouters477c8d52006-05-27 19:21:47 +00007502
Georg Brandlb1441c72009-01-03 22:33:39 +00007503
Thomas Wouters477c8d52006-05-27 19:21:47 +00007504cat >>confdefs.h <<_ACEOF
7505#define SHLIB_EXT "$SO"
7506_ACEOF
7507
Guido van Rossum0a516c91994-09-12 10:58:40 +00007508# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007509# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007510# (Shared libraries in this instance are shared modules to be loaded into
7511# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7513$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007514if test -z "$LDSHARED"
7515then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007516 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007517 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007518 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007519 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007520 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007521 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007522 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007523 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007524 if test "$GCC" = "yes" ; then
7525 LDSHARED='$(CC) -shared'
7526 LDCXXSHARED='$(CXX) -shared'
7527 else
7528 LDSHARED='$(CC) -G'
7529 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007530 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007531 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007532 if test "$GCC" = "yes" ; then
7533 LDSHARED='$(CC) -shared'
7534 LDCXXSHARED='$(CXX) -shared'
7535 else
7536 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007537 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00007538 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007539 LDSHARED='$(CC) -bundle'
7540 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007541 if test "$enable_framework" ; then
7542 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007543 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7544 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007545 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007546 else
7547 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007548 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007549 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007550 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007551 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007552 LDSHARED='$(CC) -bundle'
7553 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007554 if test "$enable_framework" ; then
7555 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007556 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7557 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007558 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007559 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007560 # No framework, use the Python app as bundle-loader
7561 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007562 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007563 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007564 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007565 Darwin/*)
7566 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7567 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007568
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007569 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007570 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007571 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007572 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007573 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007574 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7575 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007576 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007577 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007578 LDSHARED='$(CC) -bundle'
7579 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007580 if test "$enable_framework" ; then
7581 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007582 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7583 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007584 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007585 else
7586 # No framework, use the Python app as bundle-loader
7587 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7588 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007589 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007590 fi
7591 fi
7592 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007593 Linux*|GNU*|QNX*)
7594 LDSHARED='$(CC) -shared'
7595 LDCXXSHARED='$(CXX) -shared';;
7596 BSD/OS*/4*)
7597 LDSHARED="gcc -shared"
7598 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007599 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007600 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007601 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007602 LDSHARED='$(CC) -shared'
7603 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007604 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007605 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007606 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007607 OpenBSD*)
7608 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7609 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007610 LDSHARED='$(CC) -shared $(CCSHARED)'
7611 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007612 else
7613 case `uname -r` in
7614 [01].* | 2.[0-7] | 2.[0-7].*)
7615 LDSHARED="ld -Bshareable ${LDFLAGS}"
7616 ;;
7617 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007618 LDSHARED='$(CC) -shared $(CCSHARED)'
7619 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007620 ;;
7621 esac
7622 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007623 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007624 LDSHARED='$(CC) -shared'
7625 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007626 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007627 if test "$GCC" = "yes" ; then
7628 LDSHARED='$(CC) -shared'
7629 LDCXXSHARED='$(CXX) -shared'
7630 else
7631 LDSHARED='$(CC) -G'
7632 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007633 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007634 SCO_SV*)
7635 LDSHARED='$(CC) -Wl,-G,-Bexport'
7636 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7637 CYGWIN*)
7638 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7639 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007640 *) LDSHARED="ld";;
7641 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7644$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007645LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007646BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007647# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007648# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7650$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007651if test -z "$CCSHARED"
7652then
Guido van Rossum07397971997-04-29 21:49:50 +00007653 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007654 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007655 then CCSHARED="-fPIC";
7656 elif test `uname -p` = sparc;
7657 then CCSHARED="-xcode=pic32";
7658 else CCSHARED="-Kpic";
7659 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007660 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007661 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007662 else CCSHARED="+z";
7663 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007664 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007665 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007666 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007667 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007668 if test "$GCC" = "yes"
7669 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007670 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007671 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007672 SCO_SV*)
7673 if test "$GCC" = "yes"
7674 then CCSHARED="-fPIC"
7675 else CCSHARED="-Kpic -belf"
7676 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007677 IRIX*/6*) case $CC in
7678 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007679 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007680 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007681 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007682fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7684$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007685# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007686# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7688$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007689if test -z "$LINKFORSHARED"
7690then
Guido van Rossum07397971997-04-29 21:49:50 +00007691 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007692 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007693 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007694 LINKFORSHARED="-Wl,-E -Wl,+s";;
7695# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007696 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007697 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007698 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007699 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007700 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007701 if test "$enable_framework"
7702 then
Jack Jansenda49e192005-01-07 13:08:22 +00007703 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007704 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007705 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007706 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007707 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007708 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007709 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007710 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7711 then
7712 LINKFORSHARED="-Wl,--export-dynamic"
7713 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007714 SunOS/5*) case $CC in
7715 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007716 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007717 then
7718 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007719 fi;;
7720 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007721 CYGWIN*)
7722 if test $enable_shared = "no"
7723 then
7724 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7725 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007726 QNX*)
7727 # -Wl,-E causes the symbols to be added to the dynamic
7728 # symbol table so that they can be found when a module
7729 # is loaded. -N 2048K causes the stack size to be set
7730 # to 2048 kilobytes so that the stack doesn't overflow
7731 # when running test_compile.py.
7732 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007733 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007734fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7736$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007737
Michael W. Hudson54241132001-12-07 15:38:26 +00007738
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007739
Matthias Kloseb9621712010-04-24 17:59:49 +00007740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7741$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007742if test ! "$LIBRARY" = "$LDLIBRARY"
7743then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007744 case $ac_sys_system in
7745 CYGWIN*)
7746 # Cygwin needs CCSHARED when building extension DLLs
7747 # but not when building the interpreter DLL.
7748 CFLAGSFORSHARED='';;
7749 *)
7750 CFLAGSFORSHARED='$(CCSHARED)'
7751 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7754$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007755
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007756# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7757# library (with --enable-shared).
7758# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007759# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7760# if it is not required, since it creates a dependency of the shared library
7761# to LIBS. This, in turn, means that applications linking the shared libpython
7762# don't need to link LIBS explicitly. The default should be only changed
7763# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007764
Matthias Kloseb9621712010-04-24 17:59:49 +00007765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7766$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007767case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007768 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007769 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007770esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7772$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007773
7774
Guido van Rossum627b2d71993-12-24 10:39:16 +00007775# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00007776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
7777$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007778if test "${ac_cv_lib_sendfile_sendfile+set}" = set; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007779 $as_echo_n "(cached) " >&6
7780else
7781 ac_check_lib_save_LIBS=$LIBS
7782LIBS="-lsendfile $LIBS"
7783cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7784/* end confdefs.h. */
7785
7786/* Override any GCC internal prototype to avoid an error.
7787 Use char because int might match the return type of a GCC
7788 builtin and then its argument prototype would still apply. */
7789#ifdef __cplusplus
7790extern "C"
7791#endif
7792char sendfile ();
7793int
7794main ()
7795{
7796return sendfile ();
7797 ;
7798 return 0;
7799}
7800_ACEOF
7801if ac_fn_c_try_link "$LINENO"; then :
7802 ac_cv_lib_sendfile_sendfile=yes
7803else
7804 ac_cv_lib_sendfile_sendfile=no
7805fi
7806rm -f core conftest.err conftest.$ac_objext \
7807 conftest$ac_exeext conftest.$ac_ext
7808LIBS=$ac_check_lib_save_LIBS
7809fi
7810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
7811$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007812if test "x$ac_cv_lib_sendfile_sendfile" = x""yes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007813 cat >>confdefs.h <<_ACEOF
7814#define HAVE_LIBSENDFILE 1
7815_ACEOF
7816
7817 LIBS="-lsendfile $LIBS"
7818
7819fi
7820
Matthias Kloseb9621712010-04-24 17:59:49 +00007821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7822$as_echo_n "checking for dlopen in -ldl... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007823if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007824 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007825else
Martin v. Löwis11437992002-04-12 09:54:03 +00007826 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007827LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007830
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007831/* Override any GCC internal prototype to avoid an error.
7832 Use char because int might match the return type of a GCC
7833 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007834#ifdef __cplusplus
7835extern "C"
7836#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007837char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007838int
7839main ()
7840{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007841return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007842 ;
7843 return 0;
7844}
7845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007846if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007847 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007848else
Matthias Kloseb9621712010-04-24 17:59:49 +00007849 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007850fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007851rm -f core conftest.err conftest.$ac_objext \
7852 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007853LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7856$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007857if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007858 cat >>confdefs.h <<_ACEOF
7859#define HAVE_LIBDL 1
7860_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007861
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007862 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007863
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007864fi
7865 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7867$as_echo_n "checking for shl_load in -ldld... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007868if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007869 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007870else
Martin v. Löwis11437992002-04-12 09:54:03 +00007871 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007872LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007874/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007875
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007876/* Override any GCC internal prototype to avoid an error.
7877 Use char because int might match the return type of a GCC
7878 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007879#ifdef __cplusplus
7880extern "C"
7881#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007882char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007883int
7884main ()
7885{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007886return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007887 ;
7888 return 0;
7889}
7890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007891if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007892 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007893else
Matthias Kloseb9621712010-04-24 17:59:49 +00007894 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007895fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007896rm -f core conftest.err conftest.$ac_objext \
7897 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007898LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7901$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007902if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007903 cat >>confdefs.h <<_ACEOF
7904#define HAVE_LIBDLD 1
7905_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007906
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007907 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007908
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007909fi
7910 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007911
Georg Brandlb1441c72009-01-03 22:33:39 +00007912# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007913if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7915$as_echo_n "checking for library containing sem_init... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007916if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007917 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007918else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007919 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007921/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007922
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007923/* Override any GCC internal prototype to avoid an error.
7924 Use char because int might match the return type of a GCC
7925 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007926#ifdef __cplusplus
7927extern "C"
7928#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007929char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007930int
7931main ()
7932{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007933return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007934 ;
7935 return 0;
7936}
7937_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007938for ac_lib in '' pthread rt posix4; do
7939 if test -z "$ac_lib"; then
7940 ac_res="none required"
7941 else
7942 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007943 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007944 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007945 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007946 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007947fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007948rm -f core conftest.err conftest.$ac_objext \
7949 conftest$ac_exeext
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007950 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007951 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007952fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007953done
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007954if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007955
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007956else
7957 ac_cv_search_sem_init=no
7958fi
7959rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007960LIBS=$ac_func_search_save_LIBS
7961fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7963$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007964ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007965if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007966 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007967
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007968fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007969 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007970 # posix4 on Solaris 2.6
7971 # pthread (first!) on Linux
7972fi
7973
Martin v. Löwis19d17342003-06-14 21:03:05 +00007974# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7976$as_echo_n "checking for textdomain in -lintl... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007977if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007978 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007979else
7980 ac_check_lib_save_LIBS=$LIBS
7981LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007983/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007984
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007985/* Override any GCC internal prototype to avoid an error.
7986 Use char because int might match the return type of a GCC
7987 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007988#ifdef __cplusplus
7989extern "C"
7990#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007991char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007992int
7993main ()
7994{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007995return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007996 ;
7997 return 0;
7998}
7999_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008000if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008001 ac_cv_lib_intl_textdomain=yes
8002else
Matthias Kloseb9621712010-04-24 17:59:49 +00008003 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008004fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008005rm -f core conftest.err conftest.$ac_objext \
8006 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008007LIBS=$ac_check_lib_save_LIBS
8008fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8010$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008011if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008012
Matthias Kloseb9621712010-04-24 17:59:49 +00008013$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008014
Brett Cannonc6d936e2009-06-07 20:09:53 +00008015 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008016fi
8017
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008018
8019# checks for system dependent C++ extensions support
8020case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008021 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8022$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008024/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008025
Georg Brandl59e87bd2011-02-15 19:48:59 +00008026 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008027int
8028main ()
8029{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008030loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008031 ;
8032 return 0;
8033}
Matthias Kloseb159a552010-04-25 21:00:44 +00008034
Martin v. Löwis11437992002-04-12 09:54:03 +00008035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008036if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008037
Matthias Kloseb159a552010-04-25 21:00:44 +00008038
Matthias Kloseb9621712010-04-24 17:59:49 +00008039$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008040
Matthias Kloseb159a552010-04-25 21:00:44 +00008041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008042$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008043
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008044else
Matthias Kloseb159a552010-04-25 21:00:44 +00008045
8046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008047$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008048
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008049fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008050rm -f core conftest.err conftest.$ac_objext \
8051 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008052 *) ;;
8053esac
8054
Guido van Rossum70c7f481998-03-26 18:44:10 +00008055# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8057$as_echo_n "checking for t_open in -lnsl... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008058if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008059 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008060else
Martin v. Löwis11437992002-04-12 09:54:03 +00008061 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008062LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008064/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008065
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008066/* Override any GCC internal prototype to avoid an error.
8067 Use char because int might match the return type of a GCC
8068 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008069#ifdef __cplusplus
8070extern "C"
8071#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008072char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008073int
8074main ()
8075{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008076return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008077 ;
8078 return 0;
8079}
8080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008081if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008082 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008083else
Matthias Kloseb9621712010-04-24 17:59:49 +00008084 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008085fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008086rm -f core conftest.err conftest.$ac_objext \
8087 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008088LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008089fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8091$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008092if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008093 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008094fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008095 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8097$as_echo_n "checking for socket in -lsocket... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008098if test "${ac_cv_lib_socket_socket+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008099 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008100else
Martin v. Löwis11437992002-04-12 09:54:03 +00008101 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008102LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008104/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008105
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008106/* Override any GCC internal prototype to avoid an error.
8107 Use char because int might match the return type of a GCC
8108 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008109#ifdef __cplusplus
8110extern "C"
8111#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008112char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008113int
8114main ()
8115{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008116return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008117 ;
8118 return 0;
8119}
8120_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008121if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008122 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008123else
Matthias Kloseb9621712010-04-24 17:59:49 +00008124 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008125fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008126rm -f core conftest.err conftest.$ac_objext \
8127 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008128LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008129fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8131$as_echo "$ac_cv_lib_socket_socket" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008132if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008133 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008134fi
8135 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008136
Matthias Kloseb9621712010-04-24 17:59:49 +00008137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8138$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008139
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008140# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008141if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008142 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8144$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008145LIBS="$withval $LIBS"
8146
8147else
Matthias Kloseb9621712010-04-24 17:59:49 +00008148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8149$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008150fi
8151
Guido van Rossum7f43da71994-08-01 12:15:30 +00008152
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008153if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008154 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8155set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8157$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008158if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008159 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008160else
8161 case $PKG_CONFIG in
8162 [\\/]* | ?:[\\/]*)
8163 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8164 ;;
8165 *)
8166 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8167for as_dir in $PATH
8168do
8169 IFS=$as_save_IFS
8170 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008171 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008172 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8173 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008174 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008175 break 2
8176 fi
8177done
Matthias Kloseb9621712010-04-24 17:59:49 +00008178 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008179IFS=$as_save_IFS
8180
8181 ;;
8182esac
8183fi
8184PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8185if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8187$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008188else
Matthias Kloseb9621712010-04-24 17:59:49 +00008189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8190$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008191fi
8192
8193
8194fi
8195if test -z "$ac_cv_path_PKG_CONFIG"; then
8196 ac_pt_PKG_CONFIG=$PKG_CONFIG
8197 # Extract the first word of "pkg-config", so it can be a program name with args.
8198set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8200$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008201if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008202 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008203else
8204 case $ac_pt_PKG_CONFIG in
8205 [\\/]* | ?:[\\/]*)
8206 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8207 ;;
8208 *)
8209 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8210for as_dir in $PATH
8211do
8212 IFS=$as_save_IFS
8213 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008214 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008215 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8216 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008217 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008218 break 2
8219 fi
8220done
Matthias Kloseb9621712010-04-24 17:59:49 +00008221 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008222IFS=$as_save_IFS
8223
8224 ;;
8225esac
8226fi
8227ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8228if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8230$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008231else
Matthias Kloseb9621712010-04-24 17:59:49 +00008232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8233$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008234fi
8235
8236 if test "x$ac_pt_PKG_CONFIG" = x; then
8237 PKG_CONFIG=""
8238 else
8239 case $cross_compiling:$ac_tool_warned in
8240yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008241{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8242$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008243ac_tool_warned=yes ;;
8244esac
8245 PKG_CONFIG=$ac_pt_PKG_CONFIG
8246 fi
8247else
8248 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8249fi
8250
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008251
8252# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8254$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008255
8256# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008257if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008258 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008259else
8260 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008261fi
8262
8263
Matthias Kloseb9621712010-04-24 17:59:49 +00008264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8265$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008266
8267# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8269$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008270
8271# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008272if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008273 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008274else
8275 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008276fi
8277
8278
8279if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008280 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8281else
8282 LIBFFI_INCLUDEDIR=""
8283fi
8284
8285
Matthias Kloseb9621712010-04-24 17:59:49 +00008286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8287$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008288
Benjamin Peterson076ed002010-10-31 17:11:02 +00008289# Check for support for loadable sqlite extensions
8290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8291$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8292# Check whether --enable-loadable-sqlite-extensions was given.
8293if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8294 enableval=$enable_loadable_sqlite_extensions;
8295else
8296 enable_loadable_sqlite_extensions="no"
8297fi
8298
8299
8300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8301$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8302
Matthias Klose55708cc2009-04-30 08:06:49 +00008303# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8305$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008306
8307# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008308if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008309 withval=$with_dbmliborder;
8310if test x$with_dbmliborder = xyes
8311then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05008312as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008313else
8314 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8315 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8316 then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05008317 as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008318 fi
8319 done
8320fi
8321fi
8322
Matthias Kloseb9621712010-04-24 17:59:49 +00008323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8324$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008325
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008326# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008327
8328
Matthias Kloseb9621712010-04-24 17:59:49 +00008329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8330$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008331
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008332# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008333if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008334 withval=$with_signal_module;
8335fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008336
8337
8338if test -z "$with_signal_module"
8339then with_signal_module="yes"
8340fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8342$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008343
8344if test "${with_signal_module}" = "yes"; then
8345 USE_SIGNAL_MODULE=""
8346 SIGNAL_OBJS=""
8347else
8348 USE_SIGNAL_MODULE="#"
8349 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8350fi
8351
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008352# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008353
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008354USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008355
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008356
Martin v. Löwis11437992002-04-12 09:54:03 +00008357
8358# Templates for things AC_DEFINEd more than once.
8359# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008360
8361
Martin v. Löwis11437992002-04-12 09:54:03 +00008362
8363
Matthias Kloseb9621712010-04-24 17:59:49 +00008364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8365$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008366
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008367# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008368if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008369 withval=$with_threads;
8370fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008371
8372
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008373# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008374
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008375# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008376if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008377 withval=$with_thread; with_threads=$with_thread
8378fi
8379
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008380
8381if test -z "$with_threads"
8382then with_threads="yes"
8383fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8385$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008386
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008387
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008388if test "$with_threads" = "no"
8389then
8390 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008391elif test "$ac_cv_pthread_is_default" = yes
8392then
Matthias Kloseb9621712010-04-24 17:59:49 +00008393 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008394
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008395 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008396 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008397
8398 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008399 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008400elif test "$ac_cv_kpthread" = "yes"
8401then
8402 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008403 if test "$ac_cv_cxx_thread" = "yes"; then
8404 CXX="$CXX -Kpthread"
8405 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008406 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008407
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008408 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008409 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008410elif test "$ac_cv_kthread" = "yes"
8411then
8412 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008413 if test "$ac_cv_cxx_thread" = "yes"; then
8414 CXX="$CXX -Kthread"
8415 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008416 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008417
8418 posix_threads=yes
8419 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008420elif test "$ac_cv_pthread" = "yes"
8421then
8422 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008423 if test "$ac_cv_cxx_thread" = "yes"; then
8424 CXX="$CXX -pthread"
8425 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008426 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008427
8428 posix_threads=yes
8429 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008430else
8431 if test ! -z "$with_threads" -a -d "$with_threads"
8432 then LDFLAGS="$LDFLAGS -L$with_threads"
8433 fi
8434 if test ! -z "$withval" -a -d "$withval"
8435 then LDFLAGS="$LDFLAGS -L$withval"
8436 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008437
8438 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008439 # define _POSIX_THREADS in unistd.h. Some apparently don't
8440 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8442$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008444/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008445
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008446#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008447#ifdef _POSIX_THREADS
8448yes
8449#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008450
8451_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008452if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008453 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008454 unistd_defines_pthreads=yes
8455else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008456 unistd_defines_pthreads=no
8457fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008458rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008459
Matthias Kloseb9621712010-04-24 17:59:49 +00008460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8461$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008462
Matthias Kloseb9621712010-04-24 17:59:49 +00008463 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008464
Matthias Kloseb9621712010-04-24 17:59:49 +00008465 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008466if test "x$ac_cv_header_cthreads_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008467 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008468
Matthias Kloseb9621712010-04-24 17:59:49 +00008469 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008470
Martin v. Löwis11437992002-04-12 09:54:03 +00008471
Matthias Kloseb9621712010-04-24 17:59:49 +00008472$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008473
8474 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008475 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008476else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008477
Matthias Kloseb9621712010-04-24 17:59:49 +00008478 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008479if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008480 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008481
Matthias Kloseb9621712010-04-24 17:59:49 +00008482 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008483
Martin v. Löwis11437992002-04-12 09:54:03 +00008484
Matthias Kloseb9621712010-04-24 17:59:49 +00008485$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008486
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008487 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008488else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008489
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008490 # Just looking for pthread_create in libpthread is not enough:
8491 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8492 # So we really have to include pthread.h, and then link.
8493 _libs=$LIBS
8494 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8496$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008498/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008499#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008500
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008501void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008502int
8503main ()
8504{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008505
8506pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008507 ;
8508 return 0;
8509}
8510_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008511if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008512
Matthias Kloseb9621712010-04-24 17:59:49 +00008513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8514$as_echo "yes" >&6; }
8515 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008516
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008517 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008518 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008519else
Martin v. Löwis11437992002-04-12 09:54:03 +00008520
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008521 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008522 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008523if test "x$ac_cv_func_pthread_detach" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008524 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008525
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008526 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008527 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008528else
Guido van Rossumad678af1998-10-02 14:42:15 +00008529
Matthias Kloseb9621712010-04-24 17:59:49 +00008530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8531$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008532if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008533 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008534else
Martin v. Löwis11437992002-04-12 09:54:03 +00008535 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008536LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008537cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008538/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008539
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008540/* Override any GCC internal prototype to avoid an error.
8541 Use char because int might match the return type of a GCC
8542 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008543#ifdef __cplusplus
8544extern "C"
8545#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008546char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008547int
8548main ()
8549{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008550return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008551 ;
8552 return 0;
8553}
8554_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008555if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008556 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008557else
Matthias Kloseb9621712010-04-24 17:59:49 +00008558 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008559fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008560rm -f core conftest.err conftest.$ac_objext \
8561 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008562LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008563fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8565$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008566if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008567 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008568
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008569 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008570 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008571 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008572else
Greg Steinadf63d62000-07-05 10:38:09 +00008573
Matthias Kloseb9621712010-04-24 17:59:49 +00008574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8575$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008576if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008577 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008578else
Martin v. Löwis11437992002-04-12 09:54:03 +00008579 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008580LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008581cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008582/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008583
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008584/* Override any GCC internal prototype to avoid an error.
8585 Use char because int might match the return type of a GCC
8586 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008587#ifdef __cplusplus
8588extern "C"
8589#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008590char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008591int
8592main ()
8593{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008594return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008595 ;
8596 return 0;
8597}
8598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008599if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008600 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008601else
Matthias Kloseb9621712010-04-24 17:59:49 +00008602 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008603fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008604rm -f core conftest.err conftest.$ac_objext \
8605 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008606LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008607fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8609$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008610if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008611 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008612
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008613 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008614 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008615 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008616else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008617
Matthias Kloseb9621712010-04-24 17:59:49 +00008618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8619$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008620if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008621 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008622else
Martin v. Löwis11437992002-04-12 09:54:03 +00008623 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008624LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008626/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008627
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008628/* Override any GCC internal prototype to avoid an error.
8629 Use char because int might match the return type of a GCC
8630 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008631#ifdef __cplusplus
8632extern "C"
8633#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008634char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008635int
8636main ()
8637{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008638return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008639 ;
8640 return 0;
8641}
8642_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008643if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008644 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008645else
Matthias Kloseb9621712010-04-24 17:59:49 +00008646 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008647fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008648rm -f core conftest.err conftest.$ac_objext \
8649 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008650LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008651fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8653$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008654if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008655 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008656
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008657 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008658 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008659 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008660else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008661
Matthias Kloseb9621712010-04-24 17:59:49 +00008662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8663$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008664if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008665 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008666else
Martin v. Löwis11437992002-04-12 09:54:03 +00008667 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008668LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008670/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008671
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008672/* Override any GCC internal prototype to avoid an error.
8673 Use char because int might match the return type of a GCC
8674 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008675#ifdef __cplusplus
8676extern "C"
8677#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008678char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008679int
8680main ()
8681{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008682return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008683 ;
8684 return 0;
8685}
8686_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008687if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008688 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008689else
Matthias Kloseb9621712010-04-24 17:59:49 +00008690 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008691fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008692rm -f core conftest.err conftest.$ac_objext \
8693 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008694LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8697$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008698if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008699 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008700
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008701 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008702 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008703 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008704else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008705
Martin v. Löwis130fb172001-07-19 11:00:41 +00008706 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008707fi
8708
Guido van Rossum627b2d71993-12-24 10:39:16 +00008709
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008710fi
8711
Guido van Rossum0be3e491997-05-22 20:33:33 +00008712fi
8713
Guido van Rossum49545951997-12-02 19:28:29 +00008714fi
8715
Guido van Rossumb93a8621998-05-07 13:27:32 +00008716fi
8717
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008718fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008719rm -f core conftest.err conftest.$ac_objext \
8720 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008721fi
8722
Martin v. Löwis11437992002-04-12 09:54:03 +00008723
8724fi
8725
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008726
Michael W. Hudson54241132001-12-07 15:38:26 +00008727
Matthias Kloseb9621712010-04-24 17:59:49 +00008728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8729$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008730if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008731 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008732else
Martin v. Löwis11437992002-04-12 09:54:03 +00008733 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008734LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008736/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008737
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008738/* Override any GCC internal prototype to avoid an error.
8739 Use char because int might match the return type of a GCC
8740 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008741#ifdef __cplusplus
8742extern "C"
8743#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008744char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008745int
8746main ()
8747{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008748return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008749 ;
8750 return 0;
8751}
8752_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008753if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008754 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008755else
Matthias Kloseb9621712010-04-24 17:59:49 +00008756 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008757fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008758rm -f core conftest.err conftest.$ac_objext \
8759 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008760LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8763$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008764if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008765 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008766
Martin v. Löwis130fb172001-07-19 11:00:41 +00008767 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008768 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008769 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008770fi
8771
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008772
Neal Norwitza978ab02002-11-02 16:58:05 +00008773 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8775$as_echo_n "checking for thr_create in -lthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008776if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008777 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008778else
Martin v. Löwis11437992002-04-12 09:54:03 +00008779 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008780LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008782/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008783
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008784/* Override any GCC internal prototype to avoid an error.
8785 Use char because int might match the return type of a GCC
8786 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008787#ifdef __cplusplus
8788extern "C"
8789#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008790char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008791int
8792main ()
8793{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008794return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008795 ;
8796 return 0;
8797}
8798_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008799if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008800 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008801else
Matthias Kloseb9621712010-04-24 17:59:49 +00008802 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008803fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008804rm -f core conftest.err conftest.$ac_objext \
8805 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008806LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008807fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8809$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008810if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008811 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008812
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008813 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008814 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008815 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008816fi
8817
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008818 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008819fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008820
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008821if test "$posix_threads" = "yes"; then
8822 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008823
Matthias Kloseb9621712010-04-24 17:59:49 +00008824$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008825
8826 fi
8827
8828 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8829 case $ac_sys_system/$ac_sys_release in
8830 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008831$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008832
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008833 ;;
8834 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008835$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008836
8837 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008838 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008839$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008840
8841 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008842 AIX/6)
8843$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8844
8845 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008846 esac
8847
Matthias Kloseb9621712010-04-24 17:59:49 +00008848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8849$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008850 if test "${ac_cv_pthread_system_supported+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008851 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008852else
Matthias Kloseb9621712010-04-24 17:59:49 +00008853 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008854 ac_cv_pthread_system_supported=no
8855else
Matthias Kloseb9621712010-04-24 17:59:49 +00008856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008857/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008858#include <pthread.h>
8859 void *foo(void *parm) {
8860 return NULL;
8861 }
8862 main() {
8863 pthread_attr_t attr;
8864 pthread_t id;
8865 if (pthread_attr_init(&attr)) exit(-1);
8866 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8867 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8868 exit(0);
8869 }
8870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008871if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008872 ac_cv_pthread_system_supported=yes
8873else
Matthias Kloseb9621712010-04-24 17:59:49 +00008874 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008875fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008876rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8877 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008878fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008879
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008880
Guido van Rossum627b2d71993-12-24 10:39:16 +00008881fi
8882
Matthias Kloseb9621712010-04-24 17:59:49 +00008883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8884$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008885 if test "$ac_cv_pthread_system_supported" = "yes"; then
8886
Matthias Kloseb9621712010-04-24 17:59:49 +00008887$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008888
8889 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008890 for ac_func in pthread_sigmask
8891do :
8892 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008893if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008894 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008895#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008896_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008897 case $ac_sys_system in
8898 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008899
Matthias Kloseb9621712010-04-24 17:59:49 +00008900$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008901
8902 ;;
8903 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008904fi
8905done
8906
8907fi
8908
8909
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008910# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008911
Matthias Kloseb9621712010-04-24 17:59:49 +00008912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8913$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008914# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008915if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008916 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008917 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8919$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008920 ipv6=no
8921 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008922 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8923$as_echo "yes" >&6; }
8924 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008925
8926 ipv6=yes
8927 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008928 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008929else
Martin v. Löwis11437992002-04-12 09:54:03 +00008930
Matthias Kloseb9621712010-04-24 17:59:49 +00008931 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008932
Matthias Kloseb9621712010-04-24 17:59:49 +00008933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8934$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008935 ipv6=no
8936
8937else
Matthias Kloseb9621712010-04-24 17:59:49 +00008938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008939/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008940 /* AF_INET6 available check */
8941#include <sys/types.h>
8942#include <sys/socket.h>
8943main()
8944{
8945 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8946 exit(1);
8947 else
8948 exit(0);
8949}
8950
Martin v. Löwis11437992002-04-12 09:54:03 +00008951_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008952if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008953
Matthias Kloseb9621712010-04-24 17:59:49 +00008954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8955$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008956 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008957
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008958else
Matthias Kloseb159a552010-04-25 21:00:44 +00008959
Matthias Kloseb9621712010-04-24 17:59:49 +00008960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8961$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008962 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008963
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008964fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008965rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8966 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008967fi
8968
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008969
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008970if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8972$as_echo_n "checking if RFC2553 API is available... " >&6; }
8973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008974/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008975
8976 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008977#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008978int
8979main ()
8980{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008981struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008982 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008983 ;
8984 return 0;
8985}
Matthias Kloseb159a552010-04-25 21:00:44 +00008986
Martin v. Löwis11437992002-04-12 09:54:03 +00008987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008988if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008989
8990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008991$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008992 ipv6=yes
8993
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008994else
Matthias Kloseb159a552010-04-25 21:00:44 +00008995
8996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008997$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008998 ipv6=no
8999
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009000fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009002fi
9003
9004if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009005 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009006
9007fi
9008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009009fi
9010
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009011
9012ipv6type=unknown
9013ipv6lib=none
9014ipv6trylibc=no
9015
9016if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9018$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009019 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9020 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009021 case $i in
9022 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009024/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009025
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009026#include <netinet/in.h>
9027#ifdef IPV6_INRIA_VERSION
9028yes
9029#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009030_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009031if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009032 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009033 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009034fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009035rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009036
9037 ;;
9038 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009040/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009041
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009042#include <netinet/in.h>
9043#ifdef __KAME__
9044yes
9045#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009046_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009047if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009048 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009049 ipv6type=$i;
9050 ipv6lib=inet6
9051 ipv6libdir=/usr/local/v6/lib
9052 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009053fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009054rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009055
9056 ;;
9057 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009059/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009060
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009061#include <features.h>
9062#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9063yes
9064#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009065_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009066if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009067 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009068 ipv6type=$i;
9069 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009070fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009071rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009072
9073 ;;
9074 linux-inet6)
9075 if test -d /usr/inet6; then
9076 ipv6type=$i
9077 ipv6lib=inet6
9078 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009079 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009080 fi
9081 ;;
9082 solaris)
9083 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009084 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009085 ipv6type=$i
9086 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009087 fi
9088 fi
9089 ;;
9090 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009092/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009093
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009094#include <sys/param.h>
9095#ifdef _TOSHIBA_INET6
9096yes
9097#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009098_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009099if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009100 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009101 ipv6type=$i;
9102 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009103 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009104fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009105rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009106
9107 ;;
9108 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009110/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009111
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009112#include </usr/local/v6/include/sys/v6config.h>
9113#ifdef __V6D__
9114yes
9115#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009116_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009117if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009118 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009119 ipv6type=$i;
9120 ipv6lib=v6;
9121 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009122 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009123fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009124rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009125
9126 ;;
9127 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009129/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009130
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009131#include <sys/param.h>
9132#ifdef _ZETA_MINAMI_INET6
9133yes
9134#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009135_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009136if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009137 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009138 ipv6type=$i;
9139 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009140 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009141fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009142rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009143
9144 ;;
9145 esac
9146 if test "$ipv6type" != "unknown"; then
9147 break
9148 fi
9149 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9151$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009152fi
9153
9154if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9155 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9156 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9157 echo "using lib$ipv6lib"
9158 else
9159 if test $ipv6trylibc = "yes"; then
9160 echo "using libc"
9161 else
9162 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9163 echo "You need to fetch lib$ipv6lib.a from appropriate"
9164 echo 'ipv6 kit and compile beforehand.'
9165 exit 1
9166 fi
9167 fi
9168fi
9169
Matthias Kloseb9621712010-04-24 17:59:49 +00009170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9171$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009173/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009174
9175 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009176int
9177main ()
9178{
9179FSIORefNum fRef = 0
9180 ;
9181 return 0;
9182}
Matthias Kloseb159a552010-04-25 21:00:44 +00009183
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009185if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009186
Matthias Kloseb159a552010-04-25 21:00:44 +00009187
Matthias Kloseb9621712010-04-24 17:59:49 +00009188$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009189
Matthias Kloseb9621712010-04-24 17:59:49 +00009190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9191$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009192
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009193else
Matthias Kloseb159a552010-04-25 21:00:44 +00009194
Matthias Kloseb9621712010-04-24 17:59:49 +00009195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9196$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009197
9198fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9200
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009201# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9203$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009204
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009205# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009206if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009207 withval=$with_doc_strings;
9208fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009209
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009210
9211if test -z "$with_doc_strings"
9212then with_doc_strings="yes"
9213fi
9214if test "$with_doc_strings" != "no"
9215then
9216
Matthias Kloseb9621712010-04-24 17:59:49 +00009217$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009218
9219fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9221$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009222
Antoine Pitrou042b1282010-08-13 21:15:58 +00009223# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9225$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009226
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009227# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009228if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009229 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009230if test "$withval" != no
9231then
9232
Matthias Kloseb9621712010-04-24 17:59:49 +00009233$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009234
Matthias Kloseb9621712010-04-24 17:59:49 +00009235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9236$as_echo "yes" >&6; }
9237else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9238$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009239fi
9240else
Matthias Kloseb9621712010-04-24 17:59:49 +00009241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9242$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009243fi
9244
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009245
9246# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9248$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009249
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009250# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009251if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009252 withval=$with_pymalloc;
9253fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009254
Neil Schemenauera35c6882001-02-27 04:45:05 +00009255
Neil Schemenauer16c22972002-03-22 15:34:49 +00009256if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009257then
9258 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009259 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009260fi
9261if test "$with_pymalloc" != "no"
9262then
Martin v. Löwis11437992002-04-12 09:54:03 +00009263
Matthias Kloseb9621712010-04-24 17:59:49 +00009264$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009265
9266fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9268$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009269
Benjamin Peterson05159c42009-12-03 03:01:27 +00009270# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9272$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009273
9274# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009275if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009276 withval=$with_valgrind;
9277else
9278 with_valgrind=no
9279fi
9280
Matthias Kloseb9621712010-04-24 17:59:49 +00009281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9282$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009283if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009284 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009285if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009286
Matthias Kloseb9621712010-04-24 17:59:49 +00009287$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009288
9289else
Benjamin Peterson87cdb812011-05-31 18:26:08 -05009290 as_fn_error "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009291
9292fi
9293
9294
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009295 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009296fi
9297
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009298# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009299
Guido van Rossum98935bf2001-09-05 19:13:16 +00009300DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009301
Guido van Rossume97ee181999-12-20 21:27:22 +00009302# the dlopen() function means we might want to use dynload_shlib.o. some
9303# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009304for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009305do :
9306 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009307if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009308 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009309#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009310_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009311
Guido van Rossume97ee181999-12-20 21:27:22 +00009312fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009313done
Guido van Rossume97ee181999-12-20 21:27:22 +00009314
Michael W. Hudson54241132001-12-07 15:38:26 +00009315
Guido van Rossume97ee181999-12-20 21:27:22 +00009316# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9317# loading of modules.
9318
Matthias Kloseb9621712010-04-24 17:59:49 +00009319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9320$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009321if test -z "$DYNLOADFILE"
9322then
9323 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009324 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9325 if test "$ac_cv_func_dlopen" = yes
9326 then DYNLOADFILE="dynload_shlib.o"
9327 else DYNLOADFILE="dynload_aix.o"
9328 fi
9329 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009330 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009331 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9332 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009333 *)
9334 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9335 # out any dynamic loading
9336 if test "$ac_cv_func_dlopen" = yes
9337 then DYNLOADFILE="dynload_shlib.o"
9338 else DYNLOADFILE="dynload_stub.o"
9339 fi
9340 ;;
9341 esac
9342fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9344$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009345if test "$DYNLOADFILE" != "dynload_stub.o"
9346then
Martin v. Löwis11437992002-04-12 09:54:03 +00009347
Matthias Kloseb9621712010-04-24 17:59:49 +00009348$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009349
9350fi
9351
Neil Schemenauer4e425612001-06-19 15:44:15 +00009352# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9353
Michael W. Hudson54241132001-12-07 15:38:26 +00009354
Matthias Kloseb9621712010-04-24 17:59:49 +00009355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9356$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009357if test -z "$MACHDEP_OBJS"
9358then
Jack Jansene578a632001-08-15 01:27:14 +00009359 MACHDEP_OBJS=$extra_machdep_objs
9360else
9361 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009362fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9364$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009365
Guido van Rossum627b2d71993-12-24 10:39:16 +00009366# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009367for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Antoine Pitrou8250e232011-02-25 23:41:16 +00009368 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009369 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
9370 futimens futimes \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009371 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009372 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07009373 if_nameindex \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009374 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +02009375 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009376 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009377 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009378 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009379 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009380 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009381 sigaction sigaltstack siginterrupt sigpending \
9382 sigrelse sigwait snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009383 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009384 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
9385 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009386do :
9387 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9388ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05009389eval as_val=\$$as_ac_var
9390 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009391 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009392#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009393_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009394
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009395fi
9396done
9397
Michael W. Hudson54241132001-12-07 15:38:26 +00009398
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009399# For some functions, having a definition is not sufficient, since
9400# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9402$as_echo_n "checking for chroot... " >&6; }
9403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009404/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009405#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009406int
9407main ()
9408{
9409void *x=chroot
9410 ;
9411 return 0;
9412}
9413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009414if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009415
Matthias Kloseb9621712010-04-24 17:59:49 +00009416$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009417
Matthias Kloseb159a552010-04-25 21:00:44 +00009418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009419$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009420else
Matthias Kloseb9621712010-04-24 17:59:49 +00009421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9422$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009423
9424fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9427$as_echo_n "checking for link... " >&6; }
9428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009429/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009430#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009431int
9432main ()
9433{
9434void *x=link
9435 ;
9436 return 0;
9437}
9438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009439if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009440
Matthias Kloseb9621712010-04-24 17:59:49 +00009441$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009442
Matthias Kloseb159a552010-04-25 21:00:44 +00009443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009444$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009445else
Matthias Kloseb9621712010-04-24 17:59:49 +00009446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9447$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009448
9449fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9452$as_echo_n "checking for symlink... " >&6; }
9453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009454/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009455#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009456int
9457main ()
9458{
9459void *x=symlink
9460 ;
9461 return 0;
9462}
9463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009464if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009465
Matthias Kloseb9621712010-04-24 17:59:49 +00009466$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009467
Matthias Kloseb159a552010-04-25 21:00:44 +00009468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009469$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009470else
Matthias Kloseb9621712010-04-24 17:59:49 +00009471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9472$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009473
9474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9477$as_echo_n "checking for fchdir... " >&6; }
9478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009479/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009480#include <unistd.h>
9481int
9482main ()
9483{
9484void *x=fchdir
9485 ;
9486 return 0;
9487}
9488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009489if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009490
Matthias Kloseb9621712010-04-24 17:59:49 +00009491$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009492
Matthias Kloseb159a552010-04-25 21:00:44 +00009493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009494$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009495else
Matthias Kloseb9621712010-04-24 17:59:49 +00009496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9497$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009498
9499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9502$as_echo_n "checking for fsync... " >&6; }
9503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009504/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009505#include <unistd.h>
9506int
9507main ()
9508{
9509void *x=fsync
9510 ;
9511 return 0;
9512}
9513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009514if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009515
Matthias Kloseb9621712010-04-24 17:59:49 +00009516$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009517
Matthias Kloseb159a552010-04-25 21:00:44 +00009518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009519$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009520else
Matthias Kloseb9621712010-04-24 17:59:49 +00009521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9522$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009523
9524fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9527$as_echo_n "checking for fdatasync... " >&6; }
9528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009529/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009530#include <unistd.h>
9531int
9532main ()
9533{
9534void *x=fdatasync
9535 ;
9536 return 0;
9537}
9538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009539if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009540
Matthias Kloseb9621712010-04-24 17:59:49 +00009541$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009542
Matthias Kloseb159a552010-04-25 21:00:44 +00009543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009544$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009545else
Matthias Kloseb9621712010-04-24 17:59:49 +00009546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9547$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009548
9549fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9552$as_echo_n "checking for epoll... " >&6; }
9553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009554/* end confdefs.h. */
9555#include <sys/epoll.h>
9556int
9557main ()
9558{
9559void *x=epoll_create
9560 ;
9561 return 0;
9562}
9563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009564if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009565
Matthias Kloseb9621712010-04-24 17:59:49 +00009566$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009567
Matthias Kloseb159a552010-04-25 21:00:44 +00009568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009569$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009570else
Matthias Kloseb9621712010-04-24 17:59:49 +00009571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9572$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009573
9574fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9577$as_echo_n "checking for kqueue... " >&6; }
9578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009579/* end confdefs.h. */
9580
9581#include <sys/types.h>
9582#include <sys/event.h>
9583
9584int
9585main ()
9586{
9587int x=kqueue()
9588 ;
9589 return 0;
9590}
9591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009592if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009593
Matthias Kloseb9621712010-04-24 17:59:49 +00009594$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009595
Matthias Kloseb159a552010-04-25 21:00:44 +00009596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009597$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009598else
Matthias Kloseb9621712010-04-24 17:59:49 +00009599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9600$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009601
9602fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009604# On some systems (eg. FreeBSD 5), we would find a definition of the
9605# functions ctermid_r, setgroups in the library, but no prototype
9606# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9607# address to avoid compiler warnings and potential miscompilations
9608# because of the missing prototypes.
9609
Matthias Kloseb9621712010-04-24 17:59:49 +00009610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9611$as_echo_n "checking for ctermid_r... " >&6; }
9612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009613/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009614
Martin v. Löwisd5843682002-11-21 20:41:28 +00009615#include <stdio.h>
9616
Martin v. Löwisd5843682002-11-21 20:41:28 +00009617int
9618main ()
9619{
9620void* p = ctermid_r
9621 ;
9622 return 0;
9623}
9624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009625if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009626
Matthias Kloseb9621712010-04-24 17:59:49 +00009627$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009628
Matthias Kloseb159a552010-04-25 21:00:44 +00009629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009630$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009631else
Matthias Kloseb9621712010-04-24 17:59:49 +00009632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9633$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009634
9635fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9637
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9639$as_echo_n "checking for flock declaration... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009640if test "${ac_cv_flock_decl+set}" = set; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009641 $as_echo_n "(cached) " >&6
9642else
9643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009644/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009645#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009646int
9647main ()
9648{
9649void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009650
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009651 ;
9652 return 0;
9653}
9654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009655if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009656 ac_cv_flock_decl=yes
9657else
9658 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009659
9660fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009662
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009663fi
9664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9665$as_echo "$ac_cv_flock_decl" >&6; }
9666if test "x${ac_cv_flock_decl}" = xyes; then
9667 for ac_func in flock
9668do :
9669 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009670if test "x$ac_cv_func_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009671 cat >>confdefs.h <<_ACEOF
9672#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009673_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009674
Antoine Pitroua3000072010-09-07 14:52:42 +00009675else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009677$as_echo_n "checking for flock in -lbsd... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009678if test "${ac_cv_lib_bsd_flock+set}" = set; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009679 $as_echo_n "(cached) " >&6
9680else
9681 ac_check_lib_save_LIBS=$LIBS
9682LIBS="-lbsd $LIBS"
9683cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9684/* end confdefs.h. */
9685
9686/* Override any GCC internal prototype to avoid an error.
9687 Use char because int might match the return type of a GCC
9688 builtin and then its argument prototype would still apply. */
9689#ifdef __cplusplus
9690extern "C"
9691#endif
9692char flock ();
9693int
9694main ()
9695{
9696return flock ();
9697 ;
9698 return 0;
9699}
9700_ACEOF
9701if ac_fn_c_try_link "$LINENO"; then :
9702 ac_cv_lib_bsd_flock=yes
9703else
9704 ac_cv_lib_bsd_flock=no
9705fi
9706rm -f core conftest.err conftest.$ac_objext \
9707 conftest$ac_exeext conftest.$ac_ext
9708LIBS=$ac_check_lib_save_LIBS
9709fi
9710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9711$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009712if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009713 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009714
9715
9716$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9717
9718
9719fi
9720
9721
9722fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009723done
9724
Antoine Pitroua3000072010-09-07 14:52:42 +00009725fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009726
Matthias Kloseb9621712010-04-24 17:59:49 +00009727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9728$as_echo_n "checking for getpagesize... " >&6; }
9729cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009730/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009731
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009732#include <unistd.h>
9733
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009734int
9735main ()
9736{
9737void* p = getpagesize
9738 ;
9739 return 0;
9740}
9741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009742if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009743
Matthias Kloseb9621712010-04-24 17:59:49 +00009744$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009745
Matthias Kloseb159a552010-04-25 21:00:44 +00009746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009747$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009748else
Matthias Kloseb9621712010-04-24 17:59:49 +00009749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9750$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009751
9752fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009754
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mallopt can set malloc mmap threshold" >&5
9756$as_echo_n "checking whether mallopt can set malloc mmap threshold... " >&6; }
9757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9758/* end confdefs.h. */
9759
9760#include <malloc.h>
9761
9762int
9763main ()
9764{
9765mallopt(M_MMAP_THRESHOLD, 256 * 1024)
9766 ;
9767 return 0;
9768}
9769_ACEOF
9770if ac_fn_c_try_compile "$LINENO"; then :
9771
9772$as_echo "#define HAVE_MALLOPT_MMAP_THRESHOLD 1" >>confdefs.h
9773
9774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9775$as_echo "yes" >&6; }
9776else
9777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9778$as_echo "no" >&6; }
9779
9780fi
9781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9782
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009783for ac_prog in true
9784do
9785 # Extract the first word of "$ac_prog", so it can be a program name with args.
9786set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9788$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009789if test "${ac_cv_prog_TRUE+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009790 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009791else
9792 if test -n "$TRUE"; then
9793 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9794else
9795as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9796for as_dir in $PATH
9797do
9798 IFS=$as_save_IFS
9799 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009800 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009801 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 +00009802 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009803 $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 +00009804 break 2
9805 fi
9806done
Matthias Kloseb9621712010-04-24 17:59:49 +00009807 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009808IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009809
9810fi
9811fi
9812TRUE=$ac_cv_prog_TRUE
9813if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9815$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009816else
Matthias Kloseb9621712010-04-24 17:59:49 +00009817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9818$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009819fi
9820
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009821
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009822 test -n "$TRUE" && break
9823done
9824test -n "$TRUE" || TRUE="/bin/true"
9825
9826
Matthias Kloseb9621712010-04-24 17:59:49 +00009827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9828$as_echo_n "checking for inet_aton in -lc... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009829if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009830 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009831else
9832 ac_check_lib_save_LIBS=$LIBS
9833LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009835/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009836
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009837/* Override any GCC internal prototype to avoid an error.
9838 Use char because int might match the return type of a GCC
9839 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009840#ifdef __cplusplus
9841extern "C"
9842#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009843char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009844int
9845main ()
9846{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009847return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009848 ;
9849 return 0;
9850}
9851_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009852if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009853 ac_cv_lib_c_inet_aton=yes
9854else
Matthias Kloseb9621712010-04-24 17:59:49 +00009855 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009856fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009857rm -f core conftest.err conftest.$ac_objext \
9858 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009859LIBS=$ac_check_lib_save_LIBS
9860fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9862$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009863if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009864 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009865else
Matthias Kloseb9621712010-04-24 17:59:49 +00009866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9867$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009868if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009869 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009870else
9871 ac_check_lib_save_LIBS=$LIBS
9872LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009874/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009875
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009876/* Override any GCC internal prototype to avoid an error.
9877 Use char because int might match the return type of a GCC
9878 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009879#ifdef __cplusplus
9880extern "C"
9881#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009882char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009883int
9884main ()
9885{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009886return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009887 ;
9888 return 0;
9889}
9890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009891if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009892 ac_cv_lib_resolv_inet_aton=yes
9893else
Matthias Kloseb9621712010-04-24 17:59:49 +00009894 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009895fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009896rm -f core conftest.err conftest.$ac_objext \
9897 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009898LIBS=$ac_check_lib_save_LIBS
9899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9901$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009902if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009903 cat >>confdefs.h <<_ACEOF
9904#define HAVE_LIBRESOLV 1
9905_ACEOF
9906
9907 LIBS="-lresolv $LIBS"
9908
9909fi
9910
9911
9912fi
9913
9914
Christian Heimesd0764e22007-12-04 15:00:33 +00009915# On Tru64, chflags seems to be present, but calling it will
9916# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9918$as_echo_n "checking for chflags... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009919if test "${ac_cv_have_chflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009920 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009921else
Matthias Kloseb9621712010-04-24 17:59:49 +00009922 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009923 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009924else
Matthias Kloseb9621712010-04-24 17:59:49 +00009925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009926/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009927[
Christian Heimesd0764e22007-12-04 15:00:33 +00009928#include <sys/stat.h>
9929#include <unistd.h>
9930int main(int argc, char*argv[])
9931{
9932 if(chflags(argv[0], 0) != 0)
9933 return 1;
9934 return 0;
9935}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009936]
Christian Heimesd0764e22007-12-04 15:00:33 +00009937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009938if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009939 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009940else
Matthias Kloseb9621712010-04-24 17:59:49 +00009941 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009942fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009943rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9944 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009945fi
9946
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009947
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009948fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9950$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009951if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009952 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009953if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009954 ac_cv_have_chflags="yes"
9955else
9956 ac_cv_have_chflags="no"
9957fi
9958
9959fi
9960if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009961
Matthias Kloseb9621712010-04-24 17:59:49 +00009962$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009963
9964fi
9965
Matthias Kloseb9621712010-04-24 17:59:49 +00009966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9967$as_echo_n "checking for lchflags... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009968if test "${ac_cv_have_lchflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009969 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009970else
Matthias Kloseb9621712010-04-24 17:59:49 +00009971 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009972 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009973else
Matthias Kloseb9621712010-04-24 17:59:49 +00009974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009975/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009976[
Christian Heimesd0764e22007-12-04 15:00:33 +00009977#include <sys/stat.h>
9978#include <unistd.h>
9979int main(int argc, char*argv[])
9980{
9981 if(lchflags(argv[0], 0) != 0)
9982 return 1;
9983 return 0;
9984}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009985]
Christian Heimesd0764e22007-12-04 15:00:33 +00009986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009987if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009988 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009989else
Matthias Kloseb9621712010-04-24 17:59:49 +00009990 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009991fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009992rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9993 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009994fi
9995
9996
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009997fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9999$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010000if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010001 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010002if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010003 ac_cv_have_lchflags="yes"
10004else
10005 ac_cv_have_lchflags="no"
10006fi
10007
10008fi
10009if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010010
Matthias Kloseb9621712010-04-24 17:59:49 +000010011$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010012
10013fi
10014
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010015case $ac_sys_system/$ac_sys_release in
10016Darwin/*)
10017 _CUR_CFLAGS="${CFLAGS}"
10018 _CUR_LDFLAGS="${LDFLAGS}"
10019 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10020 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10021 ;;
10022esac
10023
Matthias Kloseb9621712010-04-24 17:59:49 +000010024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10025$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010026if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010027 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010028else
10029 ac_check_lib_save_LIBS=$LIBS
10030LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010032/* end confdefs.h. */
10033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010034/* Override any GCC internal prototype to avoid an error.
10035 Use char because int might match the return type of a GCC
10036 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010037#ifdef __cplusplus
10038extern "C"
10039#endif
10040char inflateCopy ();
10041int
10042main ()
10043{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010044return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010045 ;
10046 return 0;
10047}
10048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010049if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010050 ac_cv_lib_z_inflateCopy=yes
10051else
Matthias Kloseb9621712010-04-24 17:59:49 +000010052 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010053fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010054rm -f core conftest.err conftest.$ac_objext \
10055 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010056LIBS=$ac_check_lib_save_LIBS
10057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10059$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010060if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010061
Matthias Kloseb9621712010-04-24 17:59:49 +000010062$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010063
10064fi
10065
10066
10067case $ac_sys_system/$ac_sys_release in
10068Darwin/*)
10069 CFLAGS="${_CUR_CFLAGS}"
10070 LDFLAGS="${_CUR_LDFLAGS}"
10071 ;;
10072esac
10073
Matthias Kloseb9621712010-04-24 17:59:49 +000010074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10075$as_echo_n "checking for hstrerror... " >&6; }
10076cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010077/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010078
Martin v. Löwise9416172003-05-03 10:12:45 +000010079#include <netdb.h>
10080
Martin v. Löwise9416172003-05-03 10:12:45 +000010081int
10082main ()
10083{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010084void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010085 ;
10086 return 0;
10087}
10088_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010089if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010090
Matthias Kloseb9621712010-04-24 17:59:49 +000010091$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010092
Matthias Kloseb159a552010-04-25 21:00:44 +000010093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010094$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010095else
Matthias Kloseb9621712010-04-24 17:59:49 +000010096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10097$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010098
10099fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010100rm -f core conftest.err conftest.$ac_objext \
10101 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010102
Matthias Kloseb9621712010-04-24 17:59:49 +000010103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10104$as_echo_n "checking for inet_aton... " >&6; }
10105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010106/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010107
Martin v. Löwis86d66262006-02-17 08:40:11 +000010108#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010109#include <sys/socket.h>
10110#include <netinet/in.h>
10111#include <arpa/inet.h>
10112
Martin v. Löwise9416172003-05-03 10:12:45 +000010113int
10114main ()
10115{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010116void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010117 ;
10118 return 0;
10119}
10120_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010121if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010122
Matthias Kloseb9621712010-04-24 17:59:49 +000010123$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010124
Matthias Kloseb159a552010-04-25 21:00:44 +000010125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010126$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010127else
Matthias Kloseb9621712010-04-24 17:59:49 +000010128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10129$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010130
10131fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010132rm -f core conftest.err conftest.$ac_objext \
10133 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010134
Matthias Kloseb9621712010-04-24 17:59:49 +000010135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10136$as_echo_n "checking for inet_pton... " >&6; }
10137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010138/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010139
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010140#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010141#include <sys/socket.h>
10142#include <netinet/in.h>
10143#include <arpa/inet.h>
10144
Martin v. Löwise9416172003-05-03 10:12:45 +000010145int
10146main ()
10147{
10148void* p = inet_pton
10149 ;
10150 return 0;
10151}
10152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010153if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010154
Matthias Kloseb9621712010-04-24 17:59:49 +000010155$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010156
Matthias Kloseb159a552010-04-25 21:00:44 +000010157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010158$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010159else
Matthias Kloseb9621712010-04-24 17:59:49 +000010160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10161$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010162
10163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010165
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010166# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10168$as_echo_n "checking for setgroups... " >&6; }
10169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010170/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010171
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010172#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010173#ifdef HAVE_GRP_H
10174#include <grp.h>
10175#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010176
Martin v. Löwisd5843682002-11-21 20:41:28 +000010177int
10178main ()
10179{
10180void* p = setgroups
10181 ;
10182 return 0;
10183}
10184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010185if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010186
Matthias Kloseb9621712010-04-24 17:59:49 +000010187$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010188
Matthias Kloseb159a552010-04-25 21:00:44 +000010189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010190$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010191else
Matthias Kloseb9621712010-04-24 17:59:49 +000010192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10193$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010194
10195fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010197
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010198# check for openpty and forkpty
10199
10200for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010201do :
10202 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010203if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010204 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010205#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010206_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010207
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010208else
Matthias Kloseb9621712010-04-24 17:59:49 +000010209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10210$as_echo_n "checking for openpty in -lutil... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010211if test "${ac_cv_lib_util_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010212 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010213else
Martin v. Löwis11437992002-04-12 09:54:03 +000010214 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010215LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010217/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010218
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010219/* Override any GCC internal prototype to avoid an error.
10220 Use char because int might match the return type of a GCC
10221 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010222#ifdef __cplusplus
10223extern "C"
10224#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010225char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010226int
10227main ()
10228{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010229return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010230 ;
10231 return 0;
10232}
10233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010234if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010235 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010236else
Matthias Kloseb9621712010-04-24 17:59:49 +000010237 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010239rm -f core conftest.err conftest.$ac_objext \
10240 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010241LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10244$as_echo "$ac_cv_lib_util_openpty" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010245if test "x$ac_cv_lib_util_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010246 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010247 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010248else
Matthias Kloseb9621712010-04-24 17:59:49 +000010249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10250$as_echo_n "checking for openpty in -lbsd... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010251if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010252 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010253else
10254 ac_check_lib_save_LIBS=$LIBS
10255LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010257/* end confdefs.h. */
10258
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010259/* Override any GCC internal prototype to avoid an error.
10260 Use char because int might match the return type of a GCC
10261 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010262#ifdef __cplusplus
10263extern "C"
10264#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010265char openpty ();
10266int
10267main ()
10268{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010269return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010270 ;
10271 return 0;
10272}
10273_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010274if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010275 ac_cv_lib_bsd_openpty=yes
10276else
Matthias Kloseb9621712010-04-24 17:59:49 +000010277 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010278fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010279rm -f core conftest.err conftest.$ac_objext \
10280 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010281LIBS=$ac_check_lib_save_LIBS
10282fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10284$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010285if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010286 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010287 LIBS="$LIBS -lbsd"
10288fi
10289
10290
10291fi
10292
Fred Drake8cef4cf2000-06-28 16:40:38 +000010293
10294fi
10295done
10296
10297for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010298do :
10299 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010300if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010301 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010302#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010303_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010304
Fred Drake8cef4cf2000-06-28 16:40:38 +000010305else
Matthias Kloseb9621712010-04-24 17:59:49 +000010306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10307$as_echo_n "checking for forkpty in -lutil... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010308if test "${ac_cv_lib_util_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010309 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010310else
Martin v. Löwis11437992002-04-12 09:54:03 +000010311 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010312LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010314/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010315
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010316/* Override any GCC internal prototype to avoid an error.
10317 Use char because int might match the return type of a GCC
10318 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010319#ifdef __cplusplus
10320extern "C"
10321#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010322char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010323int
10324main ()
10325{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010326return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010327 ;
10328 return 0;
10329}
10330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010331if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010332 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010333else
Matthias Kloseb9621712010-04-24 17:59:49 +000010334 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010335fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010336rm -f core conftest.err conftest.$ac_objext \
10337 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010338LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010339fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10341$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010342if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010343 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010344 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010345else
Matthias Kloseb9621712010-04-24 17:59:49 +000010346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10347$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010348if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010349 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010350else
10351 ac_check_lib_save_LIBS=$LIBS
10352LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010354/* end confdefs.h. */
10355
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010356/* Override any GCC internal prototype to avoid an error.
10357 Use char because int might match the return type of a GCC
10358 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010359#ifdef __cplusplus
10360extern "C"
10361#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010362char forkpty ();
10363int
10364main ()
10365{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010366return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010367 ;
10368 return 0;
10369}
10370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010371if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010372 ac_cv_lib_bsd_forkpty=yes
10373else
Matthias Kloseb9621712010-04-24 17:59:49 +000010374 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010375fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010376rm -f core conftest.err conftest.$ac_objext \
10377 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010378LIBS=$ac_check_lib_save_LIBS
10379fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10381$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010382if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010383 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010384 LIBS="$LIBS -lbsd"
10385fi
10386
10387
10388fi
10389
Fred Drake8cef4cf2000-06-28 16:40:38 +000010390
10391fi
10392done
10393
Jack Jansendd19cf82001-12-06 22:36:17 +000010394
Christian Heimesb186d002008-03-18 15:15:01 +000010395# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010396for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010397do :
10398 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010399if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010400 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010401#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010402_ACEOF
10403
10404fi
10405done
10406
10407
Michael W. Hudson54241132001-12-07 15:38:26 +000010408# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010409for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010410do :
10411 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10412ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Peterson87cdb812011-05-31 18:26:08 -050010413eval as_val=\$$as_ac_var
10414 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010415 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010416#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010417_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010418
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010419fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010420done
10421
Michael W. Hudson54241132001-12-07 15:38:26 +000010422
Benjamin Peterson87cdb812011-05-31 18:26:08 -050010423for ac_func in dup2 getcwd strdup
10424do :
10425 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10426ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10427eval as_val=\$$as_ac_var
10428 if test "x$as_val" = x""yes; then :
10429 cat >>confdefs.h <<_ACEOF
10430#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10431_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000010432
Martin v. Löwis1142de32002-03-29 16:28:31 +000010433else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010434 case " $LIBOBJS " in
Benjamin Peterson87cdb812011-05-31 18:26:08 -050010435 *" $ac_func.$ac_objext "* ) ;;
10436 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010437 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010438esac
10439
Martin v. Löwis1142de32002-03-29 16:28:31 +000010440fi
Benjamin Peterson87cdb812011-05-31 18:26:08 -050010441done
Martin v. Löwis1142de32002-03-29 16:28:31 +000010442
10443
10444for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010445do :
10446 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010447if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010448 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010449#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010452/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010453#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010454int
10455main ()
10456{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010457getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010458 ;
10459 return 0;
10460}
10461_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010462if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010463
Matthias Kloseb9621712010-04-24 17:59:49 +000010464$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010465
Guido van Rossum627b2d71993-12-24 10:39:16 +000010466fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010468
Guido van Rossum627b2d71993-12-24 10:39:16 +000010469fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010470done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010471
Jack Jansen150753c2003-03-29 22:07:47 +000010472for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010473do :
10474 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010475if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010476 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010477#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010478_ACEOF
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. */
Jack Jansen150753c2003-03-29 22:07:47 +000010481#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010482int
10483main ()
10484{
10485setpgrp(0,0);
10486 ;
10487 return 0;
10488}
10489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010490if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010491
Matthias Kloseb9621712010-04-24 17:59:49 +000010492$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010493
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010494fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010496
10497fi
10498done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010499
Thomas Wouters3a584202000-08-05 23:28:51 +000010500for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010501do :
10502 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010503if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010504 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010505#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010508/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010509#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010510int
10511main ()
10512{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010513gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010514 ;
10515 return 0;
10516}
10517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010518if ac_fn_c_try_compile "$LINENO"; then :
10519
Guido van Rossum627b2d71993-12-24 10:39:16 +000010520else
Skip Montanaro6dead952003-09-25 14:50:04 +000010521
Matthias Kloseb9621712010-04-24 17:59:49 +000010522$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010523
Martin v. Löwis11437992002-04-12 09:54:03 +000010524
Guido van Rossum627b2d71993-12-24 10:39:16 +000010525fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010527
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010528fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010529done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010530
Michael W. Hudson54241132001-12-07 15:38:26 +000010531
Matthias Kloseb9621712010-04-24 17:59:49 +000010532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10533$as_echo_n "checking for major... " >&6; }
10534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010535/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010536
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010537#if defined(MAJOR_IN_MKDEV)
10538#include <sys/mkdev.h>
10539#elif defined(MAJOR_IN_SYSMACROS)
10540#include <sys/sysmacros.h>
10541#else
10542#include <sys/types.h>
10543#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010544
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010545int
10546main ()
10547{
10548
10549 makedev(major(0),minor(0));
10550
10551 ;
10552 return 0;
10553}
10554_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010555if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010556
10557
Matthias Kloseb9621712010-04-24 17:59:49 +000010558$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010559
Matthias Kloseb9621712010-04-24 17:59:49 +000010560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10561$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010562
10563else
Skip Montanaro6dead952003-09-25 14:50:04 +000010564
Matthias Kloseb9621712010-04-24 17:59:49 +000010565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10566$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010567
10568fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010569rm -f core conftest.err conftest.$ac_objext \
10570 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010571
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010572# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010573# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10575$as_echo_n "checking for getaddrinfo... " >&6; }
10576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010577/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010578
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010579#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010580#include <sys/socket.h>
10581#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010582#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010583
Martin v. Löwis11437992002-04-12 09:54:03 +000010584int
10585main ()
10586{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010587getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010588 ;
10589 return 0;
10590}
10591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010592if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010593 have_getaddrinfo=yes
10594else
Matthias Kloseb9621712010-04-24 17:59:49 +000010595 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010596fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010597rm -f core conftest.err conftest.$ac_objext \
10598 conftest$ac_exeext conftest.$ac_ext
10599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10600$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010601if test $have_getaddrinfo = yes
10602then
Matthias Kloseb9621712010-04-24 17:59:49 +000010603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10604$as_echo_n "checking getaddrinfo bug... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010605 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010606 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010607else
Matthias Kloseb9621712010-04-24 17:59:49 +000010608 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010609 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010610else
Matthias Kloseb9621712010-04-24 17:59:49 +000010611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010612/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010613
10614#include <sys/types.h>
10615#include <netdb.h>
10616#include <string.h>
10617#include <sys/socket.h>
10618#include <netinet/in.h>
10619
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010620int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010621{
10622 int passive, gaierr, inet4 = 0, inet6 = 0;
10623 struct addrinfo hints, *ai, *aitop;
10624 char straddr[INET6_ADDRSTRLEN], strport[16];
10625
10626 for (passive = 0; passive <= 1; passive++) {
10627 memset(&hints, 0, sizeof(hints));
10628 hints.ai_family = AF_UNSPEC;
10629 hints.ai_flags = passive ? AI_PASSIVE : 0;
10630 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010631 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010632 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10633 (void)gai_strerror(gaierr);
10634 goto bad;
10635 }
10636 for (ai = aitop; ai; ai = ai->ai_next) {
10637 if (ai->ai_addr == NULL ||
10638 ai->ai_addrlen == 0 ||
10639 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10640 straddr, sizeof(straddr), strport, sizeof(strport),
10641 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10642 goto bad;
10643 }
10644 switch (ai->ai_family) {
10645 case AF_INET:
10646 if (strcmp(strport, "54321") != 0) {
10647 goto bad;
10648 }
10649 if (passive) {
10650 if (strcmp(straddr, "0.0.0.0") != 0) {
10651 goto bad;
10652 }
10653 } else {
10654 if (strcmp(straddr, "127.0.0.1") != 0) {
10655 goto bad;
10656 }
10657 }
10658 inet4++;
10659 break;
10660 case AF_INET6:
10661 if (strcmp(strport, "54321") != 0) {
10662 goto bad;
10663 }
10664 if (passive) {
10665 if (strcmp(straddr, "::") != 0) {
10666 goto bad;
10667 }
10668 } else {
10669 if (strcmp(straddr, "::1") != 0) {
10670 goto bad;
10671 }
10672 }
10673 inet6++;
10674 break;
10675 case AF_UNSPEC:
10676 goto bad;
10677 break;
10678 default:
10679 /* another family support? */
10680 break;
10681 }
10682 }
10683 }
10684
10685 if (!(inet4 == 0 || inet4 == 2))
10686 goto bad;
10687 if (!(inet6 == 0 || inet6 == 2))
10688 goto bad;
10689
10690 if (aitop)
10691 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010692 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010693
10694 bad:
10695 if (aitop)
10696 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010697 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010698}
10699
Martin v. Löwis11437992002-04-12 09:54:03 +000010700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010701if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010702 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010703else
Matthias Kloseb9621712010-04-24 17:59:49 +000010704 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010705fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010706rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10707 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010708fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010709
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010710fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010711
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010712fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010713
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10715$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10716
Mark Dickinson2df5d282009-12-31 21:22:50 +000010717if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010718then
10719 if test $ipv6 = yes
10720 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010721 echo 'Fatal: You must get working getaddrinfo() function.'
10722 echo ' or you can specify "--disable-ipv6"'.
10723 exit 1
10724 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010725else
Martin v. Löwis11437992002-04-12 09:54:03 +000010726
Matthias Kloseb9621712010-04-24 17:59:49 +000010727$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010728
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010729fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010730
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010731for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010732do :
10733 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010734if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010735 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010736#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010737_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010738
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010739fi
10740done
10741
Michael W. Hudson54241132001-12-07 15:38:26 +000010742
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010743# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10745$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010746if test "${ac_cv_header_time+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010747 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010748else
Matthias Kloseb9621712010-04-24 17:59:49 +000010749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010750/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010751#include <sys/types.h>
10752#include <sys/time.h>
10753#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010754
Martin v. Löwis11437992002-04-12 09:54:03 +000010755int
10756main ()
10757{
10758if ((struct tm *) 0)
10759return 0;
10760 ;
10761 return 0;
10762}
10763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010764if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010765 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010766else
Matthias Kloseb9621712010-04-24 17:59:49 +000010767 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010768fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010770fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10772$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010773if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010774
Matthias Kloseb9621712010-04-24 17:59:49 +000010775$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010776
10777fi
10778
Matthias Kloseb9621712010-04-24 17:59:49 +000010779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10780$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010781if test "${ac_cv_struct_tm+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010782 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010783else
Matthias Kloseb9621712010-04-24 17:59:49 +000010784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010785/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010786#include <sys/types.h>
10787#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010788
Martin v. Löwis11437992002-04-12 09:54:03 +000010789int
10790main ()
10791{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010792struct tm tm;
10793 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010794 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010795 ;
10796 return 0;
10797}
10798_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010799if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010800 ac_cv_struct_tm=time.h
10801else
Matthias Kloseb9621712010-04-24 17:59:49 +000010802 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010803fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010805fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10807$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010808if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010809
Matthias Kloseb9621712010-04-24 17:59:49 +000010810$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010811
10812fi
10813
Matthias Kloseb9621712010-04-24 17:59:49 +000010814ac_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 +000010815#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010816
Matthias Kloseb9621712010-04-24 17:59:49 +000010817"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010818if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010819
10820cat >>confdefs.h <<_ACEOF
10821#define HAVE_STRUCT_TM_TM_ZONE 1
10822_ACEOF
10823
10824
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010825fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010826
Martin v. Löwis11437992002-04-12 09:54:03 +000010827if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10828
Matthias Kloseb9621712010-04-24 17:59:49 +000010829$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010830
10831else
Matthias Kloseb9621712010-04-24 17:59:49 +000010832 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10833"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010834if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010835 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010836else
Matthias Kloseb9621712010-04-24 17:59:49 +000010837 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010838fi
10839
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010840cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010841#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010842_ACEOF
10843
Matthias Kloseb9621712010-04-24 17:59:49 +000010844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10845$as_echo_n "checking for tzname... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010846if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010847 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010848else
Matthias Kloseb9621712010-04-24 17:59:49 +000010849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010850/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010851#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010852#if !HAVE_DECL_TZNAME
10853extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010854#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010855
Martin v. Löwis11437992002-04-12 09:54:03 +000010856int
10857main ()
10858{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010859return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010860 ;
10861 return 0;
10862}
10863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010864if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010865 ac_cv_var_tzname=yes
10866else
Matthias Kloseb9621712010-04-24 17:59:49 +000010867 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010868fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010869rm -f core conftest.err conftest.$ac_objext \
10870 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010871fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10873$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010874 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010875
Matthias Kloseb9621712010-04-24 17:59:49 +000010876$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010877
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010878 fi
10879fi
10880
Matthias Kloseb9621712010-04-24 17:59:49 +000010881ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010882if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010883
10884cat >>confdefs.h <<_ACEOF
10885#define HAVE_STRUCT_STAT_ST_RDEV 1
10886_ACEOF
10887
10888
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010889fi
10890
Matthias Kloseb9621712010-04-24 17:59:49 +000010891ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010892if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010893
Martin v. Löwis11437992002-04-12 09:54:03 +000010894cat >>confdefs.h <<_ACEOF
10895#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10896_ACEOF
10897
10898
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010899fi
10900
Matthias Kloseb9621712010-04-24 17:59:49 +000010901ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010902if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010903
10904cat >>confdefs.h <<_ACEOF
10905#define HAVE_STRUCT_STAT_ST_FLAGS 1
10906_ACEOF
10907
10908
10909fi
10910
Matthias Kloseb9621712010-04-24 17:59:49 +000010911ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010912if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010913
10914cat >>confdefs.h <<_ACEOF
10915#define HAVE_STRUCT_STAT_ST_GEN 1
10916_ACEOF
10917
10918
10919fi
10920
Matthias Kloseb9621712010-04-24 17:59:49 +000010921ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010922if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010923
10924cat >>confdefs.h <<_ACEOF
10925#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10926_ACEOF
10927
10928
10929fi
10930
Matthias Kloseb9621712010-04-24 17:59:49 +000010931ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010932if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010933
Martin v. Löwis11437992002-04-12 09:54:03 +000010934cat >>confdefs.h <<_ACEOF
10935#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10936_ACEOF
10937
10938
Matthias Kloseb9621712010-04-24 17:59:49 +000010939$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010940
10941else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010942 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010943 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010944 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10945 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010946esac
10947
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010948fi
10949
Michael W. Hudson54241132001-12-07 15:38:26 +000010950
Martin v. Löwis11437992002-04-12 09:54:03 +000010951
Matthias Kloseb9621712010-04-24 17:59:49 +000010952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10953$as_echo_n "checking for time.h that defines altzone... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010954if test "${ac_cv_header_time_altzone+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010955 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010956else
Matthias Kloseb159a552010-04-25 21:00:44 +000010957
Matthias Kloseb9621712010-04-24 17:59:49 +000010958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010959/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010960#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010961int
10962main ()
10963{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010964return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010965 ;
10966 return 0;
10967}
10968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010969if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010970 ac_cv_header_time_altzone=yes
10971else
Matthias Kloseb9621712010-04-24 17:59:49 +000010972 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010973fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010975
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010976fi
10977
Matthias Kloseb9621712010-04-24 17:59:49 +000010978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10979$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010980if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010981
Matthias Kloseb9621712010-04-24 17:59:49 +000010982$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010983
10984fi
10985
Guido van Rossumda88dad1995-01-26 00:46:29 +000010986was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10988$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010990/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010991
10992#include <sys/types.h>
10993#include <sys/select.h>
10994#include <sys/time.h>
10995
Martin v. Löwis11437992002-04-12 09:54:03 +000010996int
10997main ()
10998{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010999;
Martin v. Löwis11437992002-04-12 09:54:03 +000011000 ;
11001 return 0;
11002}
11003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011004if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011005
11006
Matthias Kloseb9621712010-04-24 17:59:49 +000011007$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011008
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011009 was_it_defined=yes
11010
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011011fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11014$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011015
Matthias Kloseb9621712010-04-24 17:59:49 +000011016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11017$as_echo_n "checking for addrinfo... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011018if test "${ac_cv_struct_addrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011019 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011020else
Matthias Kloseb9621712010-04-24 17:59:49 +000011021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011022/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011023#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011024int
11025main ()
11026{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011027struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011028 ;
11029 return 0;
11030}
11031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011032if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011033 ac_cv_struct_addrinfo=yes
11034else
Matthias Kloseb9621712010-04-24 17:59:49 +000011035 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011036fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11038fi
11039
Matthias Kloseb9621712010-04-24 17:59:49 +000011040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11041$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011042if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011043
Matthias Kloseb9621712010-04-24 17:59:49 +000011044$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011045
11046fi
11047
Matthias Kloseb9621712010-04-24 17:59:49 +000011048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11049$as_echo_n "checking for sockaddr_storage... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011050if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011051 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011052else
Matthias Kloseb9621712010-04-24 17:59:49 +000011053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011054/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011055
11056# include <sys/types.h>
11057# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011058int
11059main ()
11060{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011061struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011062 ;
11063 return 0;
11064}
11065_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011066if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011067 ac_cv_struct_sockaddr_storage=yes
11068else
Matthias Kloseb9621712010-04-24 17:59:49 +000011069 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011070fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11072fi
11073
Matthias Kloseb9621712010-04-24 17:59:49 +000011074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11075$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011076if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011077
Matthias Kloseb9621712010-04-24 17:59:49 +000011078$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011079
11080fi
11081
Guido van Rossum627b2d71993-12-24 10:39:16 +000011082# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011083
Matthias Kloseb9621712010-04-24 17:59:49 +000011084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11085$as_echo_n "checking whether char is unsigned... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011086if test "${ac_cv_c_char_unsigned+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011087 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011088else
Matthias Kloseb9621712010-04-24 17:59:49 +000011089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011090/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011091$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011092int
11093main ()
11094{
11095static int test_array [1 - 2 * !(((char) -1) < 0)];
11096test_array [0] = 0
11097
11098 ;
11099 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011100}
Martin v. Löwis11437992002-04-12 09:54:03 +000011101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011102if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011103 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011104else
Matthias Kloseb9621712010-04-24 17:59:49 +000011105 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011106fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011108fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11110$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011111if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011112 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011113
11114fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011115
Matthias Kloseb9621712010-04-24 17:59:49 +000011116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11117$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011118if test "${ac_cv_c_const+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011119 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011120else
Matthias Kloseb9621712010-04-24 17:59:49 +000011121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011122/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011123
Martin v. Löwis11437992002-04-12 09:54:03 +000011124int
11125main ()
11126{
11127/* FIXME: Include the comments suggested by Paul. */
11128#ifndef __cplusplus
11129 /* Ultrix mips cc rejects this. */
11130 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011131 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011132 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011133 char const *const *pcpcc;
11134 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011135 /* NEC SVR4.0.2 mips cc rejects this. */
11136 struct point {int x, y;};
11137 static struct point const zero = {0,0};
11138 /* AIX XL C 1.02.0.0 rejects this.
11139 It does not let you subtract one const X* pointer from another in
11140 an arm of an if-expression whose if-part is not a constant
11141 expression */
11142 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011143 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011144 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011145 ++pcpcc;
11146 ppc = (char**) pcpcc;
11147 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011148 { /* SCO 3.2v4 cc rejects this. */
11149 char *t;
11150 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011151
Martin v. Löwis11437992002-04-12 09:54:03 +000011152 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011153 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011154 }
11155 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11156 int x[] = {25, 17};
11157 const int *foo = &x[0];
11158 ++foo;
11159 }
11160 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11161 typedef const int *iptr;
11162 iptr p = 0;
11163 ++p;
11164 }
11165 { /* AIX XL C 1.02.0.0 rejects this saying
11166 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11167 struct s { int j; const int *ap[3]; };
11168 struct s *b; b->j = 5;
11169 }
11170 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11171 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011172 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011173 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011174 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011175#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011176
Martin v. Löwis11437992002-04-12 09:54:03 +000011177 ;
11178 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011179}
Martin v. Löwis11437992002-04-12 09:54:03 +000011180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011181if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011182 ac_cv_c_const=yes
11183else
Matthias Kloseb9621712010-04-24 17:59:49 +000011184 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011185fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011187fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11189$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011190if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011191
Matthias Kloseb9621712010-04-24 17:59:49 +000011192$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011193
11194fi
11195
Michael W. Hudson54241132001-12-07 15:38:26 +000011196
Guido van Rossumda88dad1995-01-26 00:46:29 +000011197works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11199$as_echo_n "checking for working volatile... " >&6; }
11200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011201/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011202
Martin v. Löwis11437992002-04-12 09:54:03 +000011203int
11204main ()
11205{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011206volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011207 ;
11208 return 0;
11209}
11210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011211if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011212 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011213else
Skip Montanaro6dead952003-09-25 14:50:04 +000011214
Matthias Kloseb9621712010-04-24 17:59:49 +000011215$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011216
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011217
Guido van Rossum627b2d71993-12-24 10:39:16 +000011218fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11221$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011222
Guido van Rossumda88dad1995-01-26 00:46:29 +000011223works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11225$as_echo_n "checking for working signed char... " >&6; }
11226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011227/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011228
Martin v. Löwis11437992002-04-12 09:54:03 +000011229int
11230main ()
11231{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011232signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011233 ;
11234 return 0;
11235}
11236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011237if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011238 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011239else
Skip Montanaro6dead952003-09-25 14:50:04 +000011240
Matthias Kloseb9621712010-04-24 17:59:49 +000011241$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011242
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011243
Guido van Rossum7f43da71994-08-01 12:15:30 +000011244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11247$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011248
Guido van Rossumda88dad1995-01-26 00:46:29 +000011249have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11251$as_echo_n "checking for prototypes... " >&6; }
11252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011253/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011254int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011255int
11256main ()
11257{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011258return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011259 ;
11260 return 0;
11261}
11262_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011263if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011264
Matthias Kloseb9621712010-04-24 17:59:49 +000011265$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011266
Matthias Kloseb159a552010-04-25 21:00:44 +000011267 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011268fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11271$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011272
Guido van Rossumda88dad1995-01-26 00:46:29 +000011273works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11275$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011277/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011278
11279#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011280int foo(int x, ...) {
11281 va_list va;
11282 va_start(va, x);
11283 va_arg(va, int);
11284 va_arg(va, char *);
11285 va_arg(va, double);
11286 return 0;
11287}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011288
Martin v. Löwis11437992002-04-12 09:54:03 +000011289int
11290main ()
11291{
Guido van Rossum90eea071996-08-30 20:58:57 +000011292return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011293 ;
11294 return 0;
11295}
11296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011297if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011298
11299
Matthias Kloseb9621712010-04-24 17:59:49 +000011300$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011301
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011302 works=yes
11303
Guido van Rossum627b2d71993-12-24 10:39:16 +000011304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11307$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011308
Martin v. Löwisd6320502004-08-12 13:45:08 +000011309# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11311$as_echo_n "checking for socketpair... " >&6; }
11312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011313/* end confdefs.h. */
11314
11315#include <sys/types.h>
11316#include <sys/socket.h>
11317
11318int
11319main ()
11320{
11321void *x=socketpair
11322 ;
11323 return 0;
11324}
11325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011326if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011327
Matthias Kloseb9621712010-04-24 17:59:49 +000011328$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011329
Matthias Kloseb159a552010-04-25 21:00:44 +000011330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011331$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011332else
Matthias Kloseb9621712010-04-24 17:59:49 +000011333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11334$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011335
11336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011338
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011339# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11341$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011343/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011344#include <sys/types.h>
11345#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011346int
11347main ()
11348{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011349struct sockaddr x;
11350x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011351 ;
11352 return 0;
11353}
11354_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011355if ac_fn_c_try_compile "$LINENO"; then :
11356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11357$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011358
Matthias Kloseb9621712010-04-24 17:59:49 +000011359$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011360
11361else
Matthias Kloseb9621712010-04-24 17:59:49 +000011362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11363$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011364
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011367
Guido van Rossumda88dad1995-01-26 00:46:29 +000011368va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11370$as_echo_n "checking whether va_list is an array... " >&6; }
11371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011372/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011373
11374#ifdef HAVE_STDARG_PROTOTYPES
11375#include <stdarg.h>
11376#else
11377#include <varargs.h>
11378#endif
11379
Martin v. Löwis11437992002-04-12 09:54:03 +000011380int
11381main ()
11382{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011383va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011384 ;
11385 return 0;
11386}
11387_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011388if ac_fn_c_try_compile "$LINENO"; then :
11389
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011390else
Skip Montanaro6dead952003-09-25 14:50:04 +000011391
Martin v. Löwis11437992002-04-12 09:54:03 +000011392
Matthias Kloseb9621712010-04-24 17:59:49 +000011393$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011394
Guido van Rossumda88dad1995-01-26 00:46:29 +000011395 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011396
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011397fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11400$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011401
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011402# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011403
11404
Matthias Kloseb9621712010-04-24 17:59:49 +000011405ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011406if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011407
Matthias Kloseb9621712010-04-24 17:59:49 +000011408 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011409
Matthias Kloseb9621712010-04-24 17:59:49 +000011410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11411$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011412 OLD_CFLAGS=$CFLAGS
11413 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011415/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011416
11417# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011418
Martin v. Löwis11437992002-04-12 09:54:03 +000011419int
11420main ()
11421{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011422
11423 char *name;
11424 struct hostent *he, *res;
11425 char buffer[2048];
11426 int buflen = 2048;
11427 int h_errnop;
11428
11429 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011430
11431 ;
11432 return 0;
11433}
11434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011435if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011436
Matthias Kloseb9621712010-04-24 17:59:49 +000011437 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011438
Martin v. Löwis11437992002-04-12 09:54:03 +000011439
Matthias Kloseb9621712010-04-24 17:59:49 +000011440$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011441
Matthias Kloseb9621712010-04-24 17:59:49 +000011442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11443$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011444
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011445else
Skip Montanaro6dead952003-09-25 14:50:04 +000011446
Matthias Kloseb9621712010-04-24 17:59:49 +000011447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11448$as_echo "no" >&6; }
11449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11450$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011452/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011453
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011454# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011455
Martin v. Löwis11437992002-04-12 09:54:03 +000011456int
11457main ()
11458{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011459
11460 char *name;
11461 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011462 char buffer[2048];
11463 int buflen = 2048;
11464 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011465
Matthias Kloseb159a552010-04-25 21:00:44 +000011466 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011467
11468 ;
11469 return 0;
11470}
11471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011472if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011473
Matthias Kloseb9621712010-04-24 17:59:49 +000011474 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011475
Martin v. Löwis11437992002-04-12 09:54:03 +000011476
Matthias Kloseb159a552010-04-25 21:00:44 +000011477$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011478
Matthias Kloseb9621712010-04-24 17:59:49 +000011479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11480$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011481
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011482else
Skip Montanaro6dead952003-09-25 14:50:04 +000011483
Matthias Kloseb9621712010-04-24 17:59:49 +000011484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11485$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11487$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11489/* end confdefs.h. */
11490
11491# include <netdb.h>
11492
11493int
11494main ()
11495{
11496
11497 char *name;
11498 struct hostent *he;
11499 struct hostent_data data;
11500
11501 (void) gethostbyname_r(name, he, &data);
11502
11503 ;
11504 return 0;
11505}
11506_ACEOF
11507if ac_fn_c_try_compile "$LINENO"; then :
11508
11509 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11510
11511
11512$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11513
11514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11515$as_echo "yes" >&6; }
11516
11517else
11518
11519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11520$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011521
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011522fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011524
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011525fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011527
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011528fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011530 CFLAGS=$OLD_CFLAGS
11531
11532else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011533
Matthias Kloseb9621712010-04-24 17:59:49 +000011534 for ac_func in gethostbyname
11535do :
11536 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011537if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011538 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011539#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011540_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011541
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011542fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011543done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011544
Michael W. Hudson54241132001-12-07 15:38:26 +000011545
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011546fi
11547
Michael W. Hudson54241132001-12-07 15:38:26 +000011548
11549
11550
11551
11552
11553
Guido van Rossum627b2d71993-12-24 10:39:16 +000011554# checks for system services
11555# (none yet)
11556
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011557# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011558ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011559if test "x$ac_cv_func___fpu_control" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011560
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011561else
Matthias Kloseb9621712010-04-24 17:59:49 +000011562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11563$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011564if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011565 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011566else
Martin v. Löwis11437992002-04-12 09:54:03 +000011567 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011568LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011570/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011571
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011572/* Override any GCC internal prototype to avoid an error.
11573 Use char because int might match the return type of a GCC
11574 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011575#ifdef __cplusplus
11576extern "C"
11577#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011578char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011579int
11580main ()
11581{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011582return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011583 ;
11584 return 0;
11585}
11586_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011587if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011588 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011589else
Matthias Kloseb9621712010-04-24 17:59:49 +000011590 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011591fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011592rm -f core conftest.err conftest.$ac_objext \
11593 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011594LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011595fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11597$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011598if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011599 cat >>confdefs.h <<_ACEOF
11600#define HAVE_LIBIEEE 1
11601_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011602
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011603 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011604
Guido van Rossum627b2d71993-12-24 10:39:16 +000011605fi
11606
Michael W. Hudson54241132001-12-07 15:38:26 +000011607
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011608fi
11609
Michael W. Hudson54241132001-12-07 15:38:26 +000011610
Guido van Rossum7f253911997-05-09 02:42:48 +000011611# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11613$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011614
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011615# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011616if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011617 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011618if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011619then
11620
Matthias Kloseb9621712010-04-24 17:59:49 +000011621$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011622
Matthias Kloseb9621712010-04-24 17:59:49 +000011623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11624$as_echo "yes" >&6; }
11625else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11626$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011627fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011628else
Matthias Kloseb9621712010-04-24 17:59:49 +000011629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11630$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011631fi
11632
Guido van Rossum7f253911997-05-09 02:42:48 +000011633
Guido van Rossum7f43da71994-08-01 12:15:30 +000011634# check for --with-libm=...
11635
Guido van Rossum563e7081996-09-10 18:20:48 +000011636case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011637Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011638*) LIBM=-lm
11639esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11641$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011642
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011643# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011644if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011645 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011646if test "$withval" = no
11647then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11649$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011650elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011651then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11653$as_echo "set LIBM=\"$withval\"" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -050011654else as_fn_error "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011655fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011656else
Matthias Kloseb9621712010-04-24 17:59:49 +000011657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11658$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011659fi
11660
Guido van Rossum7f43da71994-08-01 12:15:30 +000011661
11662# check for --with-libc=...
11663
Matthias Kloseb9621712010-04-24 17:59:49 +000011664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11665$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011666
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011667# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011668if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011669 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011670if test "$withval" = no
11671then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11673$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011674elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011675then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11677$as_echo "set LIBC=\"$withval\"" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -050011678else as_fn_error "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011679fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011680else
Matthias Kloseb9621712010-04-24 17:59:49 +000011681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11682$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011683fi
11684
Guido van Rossum7f43da71994-08-01 12:15:30 +000011685
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011686# **************************************************
11687# * Check for various properties of floating point *
11688# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011689
Matthias Kloseb9621712010-04-24 17:59:49 +000011690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11691$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011692if test "${ac_cv_little_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011693 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011694else
11695
Matthias Kloseb9621712010-04-24 17:59:49 +000011696if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011697 ac_cv_little_endian_double=no
11698else
Matthias Kloseb9621712010-04-24 17:59:49 +000011699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011700/* end confdefs.h. */
11701
11702#include <string.h>
11703int main() {
11704 double x = 9006104071832581.0;
11705 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11706 return 0;
11707 else
11708 return 1;
11709}
11710
11711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011712if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011713 ac_cv_little_endian_double=yes
11714else
Matthias Kloseb9621712010-04-24 17:59:49 +000011715 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011716fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011717rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11718 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011719fi
11720
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011721fi
11722
Matthias Kloseb9621712010-04-24 17:59:49 +000011723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11724$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011725if test "$ac_cv_little_endian_double" = yes
11726then
11727
Matthias Kloseb9621712010-04-24 17:59:49 +000011728$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011729
11730fi
11731
Matthias Kloseb9621712010-04-24 17:59:49 +000011732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11733$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011734if test "${ac_cv_big_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011735 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011736else
11737
Matthias Kloseb9621712010-04-24 17:59:49 +000011738if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011739 ac_cv_big_endian_double=no
11740else
Matthias Kloseb9621712010-04-24 17:59:49 +000011741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011742/* end confdefs.h. */
11743
11744#include <string.h>
11745int main() {
11746 double x = 9006104071832581.0;
11747 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11748 return 0;
11749 else
11750 return 1;
11751}
11752
11753_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011754if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011755 ac_cv_big_endian_double=yes
11756else
Matthias Kloseb9621712010-04-24 17:59:49 +000011757 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011758fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011759rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11760 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011761fi
11762
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011763fi
11764
Matthias Kloseb9621712010-04-24 17:59:49 +000011765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11766$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011767if test "$ac_cv_big_endian_double" = yes
11768then
11769
Matthias Kloseb9621712010-04-24 17:59:49 +000011770$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011771
11772fi
11773
11774# Some ARM platforms use a mixed-endian representation for doubles.
11775# While Python doesn't currently have full support for these platforms
11776# (see e.g., issue 1762561), we can at least make sure that float <-> string
11777# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11779$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011780if test "${ac_cv_mixed_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011781 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011782else
11783
Matthias Kloseb9621712010-04-24 17:59:49 +000011784if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011785 ac_cv_mixed_endian_double=no
11786else
Matthias Kloseb9621712010-04-24 17:59:49 +000011787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011788/* end confdefs.h. */
11789
11790#include <string.h>
11791int main() {
11792 double x = 9006104071832581.0;
11793 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11794 return 0;
11795 else
11796 return 1;
11797}
11798
11799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011800if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011801 ac_cv_mixed_endian_double=yes
11802else
Matthias Kloseb9621712010-04-24 17:59:49 +000011803 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011804fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011805rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11806 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011807fi
11808
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011809fi
11810
Matthias Kloseb9621712010-04-24 17:59:49 +000011811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11812$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011813if test "$ac_cv_mixed_endian_double" = yes
11814then
11815
Matthias Kloseb9621712010-04-24 17:59:49 +000011816$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011817
11818fi
11819
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011820# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011821# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011822# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011823# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011824# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011825# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011826
11827# This inline assembler syntax may also work for suncc and icc,
11828# so we try it on all platforms.
11829
Matthias Kloseb9621712010-04-24 17:59:49 +000011830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11831$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011833/* end confdefs.h. */
11834
11835int
11836main ()
11837{
11838
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011839 unsigned short cw;
11840 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11841 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011842
11843 ;
11844 return 0;
11845}
11846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011847if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011848 have_gcc_asm_for_x87=yes
11849else
Matthias Kloseb9621712010-04-24 17:59:49 +000011850 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011851fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11854$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011855if test "$have_gcc_asm_for_x87" = yes
11856then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011857
Matthias Kloseb9621712010-04-24 17:59:49 +000011858$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011859
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011860fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011861
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011862# Detect whether system arithmetic is subject to x87-style double
11863# rounding issues. The result of this test has little meaning on non
11864# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11865# mode is round-to-nearest and double rounding issues are present, and
11866# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11868$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011869# $BASECFLAGS may affect the result
11870ac_save_cc="$CC"
11871CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011872if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011873 ac_cv_x87_double_rounding=no
11874else
Matthias Kloseb9621712010-04-24 17:59:49 +000011875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011876/* end confdefs.h. */
11877
11878#include <stdlib.h>
11879#include <math.h>
11880int main() {
11881 volatile double x, y, z;
11882 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11883 x = 0.99999999999999989; /* 1-2**-53 */
11884 y = 1./x;
11885 if (y != 1.)
11886 exit(0);
11887 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11888 x = 1e16;
11889 y = 2.99999;
11890 z = x + y;
11891 if (z != 1e16+4.)
11892 exit(0);
11893 /* both tests show evidence of double rounding */
11894 exit(1);
11895}
11896
11897_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011898if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011899 ac_cv_x87_double_rounding=no
11900else
Matthias Kloseb9621712010-04-24 17:59:49 +000011901 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011902fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011903rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11904 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011905fi
11906
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011907CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11909$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011910if test "$ac_cv_x87_double_rounding" = yes
11911then
11912
Matthias Kloseb9621712010-04-24 17:59:49 +000011913$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011914
11915fi
11916
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011917# ************************************
11918# * Check for mathematical functions *
11919# ************************************
11920
11921LIBS_SAVE=$LIBS
11922LIBS="$LIBS $LIBM"
11923
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011924for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11925do :
11926 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11927ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Peterson87cdb812011-05-31 18:26:08 -050011928eval as_val=\$$as_ac_var
11929 if test "x$as_val" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011930 cat >>confdefs.h <<_ACEOF
11931#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11932_ACEOF
11933
11934fi
11935done
11936
Victor Stinner8f9f8d62011-05-09 12:45:41 +020011937for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011938do :
11939 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11940ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Peterson87cdb812011-05-31 18:26:08 -050011941eval as_val=\$$as_ac_var
11942 if test "x$as_val" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011943 cat >>confdefs.h <<_ACEOF
11944#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11945_ACEOF
11946
11947fi
11948done
11949
11950ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11951"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011952if test "x$ac_cv_have_decl_isinf" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011953 ac_have_decl=1
11954else
11955 ac_have_decl=0
11956fi
11957
11958cat >>confdefs.h <<_ACEOF
11959#define HAVE_DECL_ISINF $ac_have_decl
11960_ACEOF
11961ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11962"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011963if test "x$ac_cv_have_decl_isnan" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011964 ac_have_decl=1
11965else
11966 ac_have_decl=0
11967fi
11968
11969cat >>confdefs.h <<_ACEOF
11970#define HAVE_DECL_ISNAN $ac_have_decl
11971_ACEOF
11972ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11973"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011974if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011975 ac_have_decl=1
11976else
11977 ac_have_decl=0
11978fi
11979
11980cat >>confdefs.h <<_ACEOF
11981#define HAVE_DECL_ISFINITE $ac_have_decl
11982_ACEOF
11983
11984
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011985# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11986# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11988$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011989if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011990 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011991else
11992
Matthias Kloseb9621712010-04-24 17:59:49 +000011993if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011994 ac_cv_tanh_preserves_zero_sign=no
11995else
Matthias Kloseb9621712010-04-24 17:59:49 +000011996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011997/* end confdefs.h. */
11998
11999#include <math.h>
12000#include <stdlib.h>
12001int main() {
12002 /* return 0 if either negative zeros don't exist
12003 on this platform or if negative zeros exist
12004 and tanh(-0.) == -0. */
12005 if (atan2(0., -1.) == atan2(-0., -1.) ||
12006 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12007 else exit(1);
12008}
12009
12010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012011if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012012 ac_cv_tanh_preserves_zero_sign=yes
12013else
Matthias Kloseb9621712010-04-24 17:59:49 +000012014 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012015fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012016rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12017 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012018fi
12019
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012020fi
12021
Matthias Kloseb9621712010-04-24 17:59:49 +000012022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12023$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012024if test "$ac_cv_tanh_preserves_zero_sign" = yes
12025then
12026
Matthias Kloseb9621712010-04-24 17:59:49 +000012027$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012028
12029fi
12030
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012031if test "$ac_cv_func_log1p" = yes
12032then
12033 # On some versions of AIX, log1p(-0.) returns 0. instead of
12034 # -0. See issue #9920.
12035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12036$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012037 if test "${ac_cv_log1p_drops_zero_sign+set}" = set; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012038 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012039else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012040
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012041 if test "$cross_compiling" = yes; then :
12042 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012043else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12045/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012046
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012047 #include <math.h>
12048 #include <stdlib.h>
12049 int main() {
12050 /* Fail if the signs of log1p(-0.) and -0. can be
12051 distinguished. */
12052 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12053 return 0;
12054 else
12055 return 1;
12056 }
12057
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012058_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012059if ac_fn_c_try_run "$LINENO"; then :
12060 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012061else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012062 ac_cv_log1p_drops_zero_sign=yes
12063fi
12064rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12065 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012066fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012067
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012068fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012069
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12071$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12072fi
12073if test "$ac_cv_log1p_drops_zero_sign" = yes
12074then
12075
12076$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12077
12078fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012079
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012080LIBS=$LIBS_SAVE
12081
Mark Dickinsona614f042009-11-28 12:48:43 +000012082# For multiprocessing module, check that sem_open
12083# actually works. For FreeBSD versions <= 7.2,
12084# the kernel module that provides POSIX semaphores
12085# isn't loaded by default, so an attempt to call
12086# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12088$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012089if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012090 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012091else
Matthias Kloseb9621712010-04-24 17:59:49 +000012092 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012093 ac_cv_posix_semaphores_enabled=yes
12094else
Matthias Kloseb9621712010-04-24 17:59:49 +000012095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012096/* end confdefs.h. */
12097
12098#include <unistd.h>
12099#include <fcntl.h>
12100#include <stdio.h>
12101#include <semaphore.h>
12102#include <sys/stat.h>
12103
12104int main(void) {
12105 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12106 if (a == SEM_FAILED) {
12107 perror("sem_open");
12108 return 1;
12109 }
12110 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012111 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012112 return 0;
12113}
12114
12115_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012116if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012117 ac_cv_posix_semaphores_enabled=yes
12118else
Matthias Kloseb9621712010-04-24 17:59:49 +000012119 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012120fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012121rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12122 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012123fi
12124
12125
Mark Dickinsona614f042009-11-28 12:48:43 +000012126fi
12127
Matthias Kloseb9621712010-04-24 17:59:49 +000012128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12129$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012130if test $ac_cv_posix_semaphores_enabled = no
12131then
12132
Matthias Kloseb9621712010-04-24 17:59:49 +000012133$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012134
12135fi
12136
Mark Dickinson10683072009-04-18 21:18:19 +000012137# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12139$as_echo_n "checking for broken sem_getvalue... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012140if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012141 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012142else
Matthias Kloseb9621712010-04-24 17:59:49 +000012143 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012144 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012145else
Matthias Kloseb9621712010-04-24 17:59:49 +000012146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012147/* end confdefs.h. */
12148
12149#include <unistd.h>
12150#include <fcntl.h>
12151#include <stdio.h>
12152#include <semaphore.h>
12153#include <sys/stat.h>
12154
12155int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012156 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012157 int count;
12158 int res;
12159 if(a==SEM_FAILED){
12160 perror("sem_open");
12161 return 1;
12162
12163 }
12164 res = sem_getvalue(a, &count);
12165 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012166 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012167 return res==-1 ? 1 : 0;
12168}
12169
Mark Dickinson10683072009-04-18 21:18:19 +000012170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012171if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012172 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012173else
Matthias Kloseb9621712010-04-24 17:59:49 +000012174 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012175fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012176rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12177 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012178fi
12179
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012180
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012181fi
12182
Matthias Kloseb9621712010-04-24 17:59:49 +000012183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12184$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012185if test $ac_cv_broken_sem_getvalue = yes
12186then
12187
Matthias Kloseb9621712010-04-24 17:59:49 +000012188$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012189
12190fi
12191
Mark Dickinsonbd792642009-03-18 20:06:12 +000012192# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12194$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012195# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012196if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012197 enableval=$enable_big_digits; case $enable_big_digits in
12198yes)
12199 enable_big_digits=30 ;;
12200no)
12201 enable_big_digits=15 ;;
1220215|30)
12203 ;;
12204*)
Benjamin Peterson87cdb812011-05-31 18:26:08 -050012205 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 +000012206esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12208$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012209
12210cat >>confdefs.h <<_ACEOF
12211#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12212_ACEOF
12213
12214
12215else
Matthias Kloseb9621712010-04-24 17:59:49 +000012216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12217$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012218fi
12219
12220
Guido van Rossumef2255b2000-03-10 22:30:29 +000012221# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012222ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012223if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012224
12225
Matthias Kloseb9621712010-04-24 17:59:49 +000012226$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012227
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012228 wchar_h="yes"
12229
Guido van Rossumef2255b2000-03-10 22:30:29 +000012230else
Martin v. Löwis11437992002-04-12 09:54:03 +000012231 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012232
12233fi
12234
Michael W. Hudson54241132001-12-07 15:38:26 +000012235
Martin v. Löwis11437992002-04-12 09:54:03 +000012236
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012237# determine wchar_t size
12238if test "$wchar_h" = yes
12239then
Matthias Kloseb9621712010-04-24 17:59:49 +000012240 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012241# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12242# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12243# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12245$as_echo_n "checking size of wchar_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012246if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012247 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012248else
Matthias Kloseb9621712010-04-24 17:59:49 +000012249 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12250"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012251
Martin v. Löwis11437992002-04-12 09:54:03 +000012252else
Matthias Kloseb9621712010-04-24 17:59:49 +000012253 if test "$ac_cv_type_wchar_t" = yes; then
12254 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12255$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -050012256{ as_fn_set_status 77
12257as_fn_error "cannot compute sizeof (wchar_t)
12258See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012259 else
12260 ac_cv_sizeof_wchar_t=0
12261 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012262fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012263
Martin v. Löwis11437992002-04-12 09:54:03 +000012264fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12266$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012267
12268
12269
Martin v. Löwis11437992002-04-12 09:54:03 +000012270cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012271#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012272_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012273
Michael W. Hudson54241132001-12-07 15:38:26 +000012274
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012275fi
12276
Matthias Kloseb9621712010-04-24 17:59:49 +000012277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12278$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012279have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012281/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012282
12283#include <tcl.h>
12284#if TCL_UTF_MAX != 6
12285# error "NOT UCS4_TCL"
12286#endif
12287int
12288main ()
12289{
12290
12291 ;
12292 return 0;
12293}
12294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012295if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012296
12297
Matthias Kloseb9621712010-04-24 17:59:49 +000012298$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012299
12300 have_ucs4_tcl=yes
12301
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012302fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12305$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012306
Skip Montanaro6dead952003-09-25 14:50:04 +000012307# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012308if test "$wchar_h" = yes
12309then
12310 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12312$as_echo_n "checking whether wchar_t is signed... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012313 if test "${ac_cv_wchar_t_signed+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012314 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012315else
12316
Matthias Kloseb9621712010-04-24 17:59:49 +000012317 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012318 ac_cv_wchar_t_signed=yes
12319else
Matthias Kloseb9621712010-04-24 17:59:49 +000012320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012321/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012322
12323 #include <wchar.h>
12324 int main()
12325 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012326 /* Success: exit code 0 */
12327 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012328 }
12329
12330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012331if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012332 ac_cv_wchar_t_signed=yes
12333else
Matthias Kloseb9621712010-04-24 17:59:49 +000012334 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012335fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012336rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12337 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012338fi
12339
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012340fi
12341
Matthias Kloseb9621712010-04-24 17:59:49 +000012342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12343$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012344fi
12345
Matthias Kloseb9621712010-04-24 17:59:49 +000012346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12347$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012348
12349# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012350if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012351 withval=$with_wide_unicode;
12352if test "$withval" != no
12353then unicode_size="4"
12354else unicode_size="2"
12355fi
12356
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012357else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012358
Georg Brandl52d168a2008-01-07 18:10:24 +000012359case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012360 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012361 *) unicode_size="2" ;;
12362esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012363
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012364fi
12365
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012366
12367
Georg Brandl52d168a2008-01-07 18:10:24 +000012368case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012369 4)
12370 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12371
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012372 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012373 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012374 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012375 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012376esac
12377
Michael W. Hudson54241132001-12-07 15:38:26 +000012378
Martin v. Löwis11437992002-04-12 09:54:03 +000012379
Georg Brandl52d168a2008-01-07 18:10:24 +000012380# wchar_t is only usable if it maps to an unsigned type
12381if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012382 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012383then
12384 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012385
Matthias Kloseb9621712010-04-24 17:59:49 +000012386$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012387
Matthias Kloseb9621712010-04-24 17:59:49 +000012388 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012389
Georg Brandl52d168a2008-01-07 18:10:24 +000012390elif test "$ac_cv_sizeof_short" = "$unicode_size"
12391then
12392 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012393 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012394
Georg Brandl52d168a2008-01-07 18:10:24 +000012395elif test "$ac_cv_sizeof_long" = "$unicode_size"
12396then
12397 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012398 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012399
Georg Brandl52d168a2008-01-07 18:10:24 +000012400else
12401 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012402fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12404$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012405
12406# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12408$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012409if test "${ac_cv_c_bigendian+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012410 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012411else
Matthias Kloseb9621712010-04-24 17:59:49 +000012412 ac_cv_c_bigendian=unknown
12413 # See if we're dealing with a universal compiler.
12414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12415/* end confdefs.h. */
12416#ifndef __APPLE_CC__
12417 not a universal capable compiler
12418 #endif
12419 typedef int dummy;
12420
Skip Montanaro6dead952003-09-25 14:50:04 +000012421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012422if ac_fn_c_try_compile "$LINENO"; then :
12423
12424 # Check for potential -arch flags. It is not universal unless
12425 # there are at least two -arch flags with different values.
12426 ac_arch=
12427 ac_prev=
12428 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12429 if test -n "$ac_prev"; then
12430 case $ac_word in
12431 i?86 | x86_64 | ppc | ppc64)
12432 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12433 ac_arch=$ac_word
12434 else
12435 ac_cv_c_bigendian=universal
12436 break
12437 fi
12438 ;;
12439 esac
12440 ac_prev=
12441 elif test "x$ac_word" = "x-arch"; then
12442 ac_prev=arch
12443 fi
12444 done
12445fi
12446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12447 if test $ac_cv_c_bigendian = unknown; then
12448 # See if sys/param.h defines the BYTE_ORDER macro.
12449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012450/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012451#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012452 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012453
Martin v. Löwis11437992002-04-12 09:54:03 +000012454int
12455main ()
12456{
Matthias Kloseb9621712010-04-24 17:59:49 +000012457#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12458 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12459 && LITTLE_ENDIAN)
12460 bogus endian macros
12461 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012462
12463 ;
12464 return 0;
12465}
12466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012467if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012468 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012470/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012471#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012472 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012473
Martin v. Löwis11437992002-04-12 09:54:03 +000012474int
12475main ()
12476{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012477#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012478 not big endian
12479 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012480
12481 ;
12482 return 0;
12483}
12484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012485if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012486 ac_cv_c_bigendian=yes
12487else
Matthias Kloseb9621712010-04-24 17:59:49 +000012488 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012489fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012491fi
12492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12493 fi
12494 if test $ac_cv_c_bigendian = unknown; then
12495 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012497/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012498#include <limits.h>
12499
Martin v. Löwis11437992002-04-12 09:54:03 +000012500int
12501main ()
12502{
Matthias Kloseb9621712010-04-24 17:59:49 +000012503#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12504 bogus endian macros
12505 #endif
12506
Martin v. Löwis11437992002-04-12 09:54:03 +000012507 ;
12508 return 0;
12509}
12510_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012511if ac_fn_c_try_compile "$LINENO"; then :
12512 # It does; now see whether it defined to _BIG_ENDIAN or not.
12513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12514/* end confdefs.h. */
12515#include <limits.h>
12516
12517int
12518main ()
12519{
12520#ifndef _BIG_ENDIAN
12521 not big endian
12522 #endif
12523
12524 ;
12525 return 0;
12526}
12527_ACEOF
12528if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012529 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012530else
Matthias Kloseb9621712010-04-24 17:59:49 +000012531 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012532fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12534fi
12535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12536 fi
12537 if test $ac_cv_c_bigendian = unknown; then
12538 # Compile a test program.
12539 if test "$cross_compiling" = yes; then :
12540 # Try to guess by grepping values from an object file.
12541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12542/* end confdefs.h. */
12543short int ascii_mm[] =
12544 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12545 short int ascii_ii[] =
12546 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12547 int use_ascii (int i) {
12548 return ascii_mm[i] + ascii_ii[i];
12549 }
12550 short int ebcdic_ii[] =
12551 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12552 short int ebcdic_mm[] =
12553 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12554 int use_ebcdic (int i) {
12555 return ebcdic_mm[i] + ebcdic_ii[i];
12556 }
12557 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012558
Matthias Kloseb9621712010-04-24 17:59:49 +000012559int
12560main ()
12561{
12562return use_ascii (foo) == use_ebcdic (foo);
12563 ;
12564 return 0;
12565}
12566_ACEOF
12567if ac_fn_c_try_compile "$LINENO"; then :
12568 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12569 ac_cv_c_bigendian=yes
12570 fi
12571 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12572 if test "$ac_cv_c_bigendian" = unknown; then
12573 ac_cv_c_bigendian=no
12574 else
12575 # finding both strings is unlikely to happen, but who knows?
12576 ac_cv_c_bigendian=unknown
12577 fi
12578 fi
12579fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012581else
Matthias Kloseb9621712010-04-24 17:59:49 +000012582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012583/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012584$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012585int
12586main ()
12587{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012588
Matthias Kloseb9621712010-04-24 17:59:49 +000012589 /* Are we little or big endian? From Harbison&Steele. */
12590 union
12591 {
12592 long int l;
12593 char c[sizeof (long int)];
12594 } u;
12595 u.l = 1;
12596 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012597
12598 ;
12599 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012600}
Martin v. Löwis11437992002-04-12 09:54:03 +000012601_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012602if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012603 ac_cv_c_bigendian=no
12604else
Matthias Kloseb9621712010-04-24 17:59:49 +000012605 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012606fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012607rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12608 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012609fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012610
Matthias Kloseb9621712010-04-24 17:59:49 +000012611 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012612fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12614$as_echo "$ac_cv_c_bigendian" >&6; }
12615 case $ac_cv_c_bigendian in #(
12616 yes)
12617 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12618;; #(
12619 no)
12620 ;; #(
12621 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012622
Matthias Kloseb9621712010-04-24 17:59:49 +000012623$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012624
Matthias Kloseb9621712010-04-24 17:59:49 +000012625 ;; #(
12626 *)
Benjamin Peterson87cdb812011-05-31 18:26:08 -050012627 as_fn_error "unknown endianness
12628 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012629 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012630
Michael W. Hudson54241132001-12-07 15:38:26 +000012631
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012632# ABI version string for Python extension modules. This appears between the
12633# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12634# from the following attributes which affect the ABI of this Python build (in
12635# this order):
12636#
12637# * The Python implementation (always 'cpython-' for us)
12638# * The major and minor version numbers
12639# * --with-pydebug (adds a 'd')
12640# * --with-pymalloc (adds a 'm')
12641# * --with-wide-unicode (adds a 'u')
12642#
12643# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012644# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12645# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012646
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12648$as_echo_n "checking ABIFLAGS... " >&6; }
12649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12650$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12652$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012653SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12655$as_echo "$SOABI" >&6; }
12656
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12658$as_echo_n "checking LDVERSION... " >&6; }
12659LDVERSION='$(VERSION)$(ABIFLAGS)'
12660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12661$as_echo "$LDVERSION" >&6; }
12662
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012663# SO is the extension of shared libraries `(including the dot!)
12664# -- usually .so, .sl on HP-UX, .dll on Cygwin
12665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12666$as_echo_n "checking SO... " >&6; }
12667if test -z "$SO"
12668then
12669 case $ac_sys_system in
12670 hp*|HP*)
12671 case `uname -m` in
12672 ia64) SO=.so;;
12673 *) SO=.sl;;
12674 esac
12675 ;;
12676 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012677 Linux*|GNU*)
12678 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012679 *) SO=.so;;
12680 esac
12681else
12682 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012683 echo
12684 echo '====================================================================='
12685 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012686 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012687 echo '+ Do you really mean to change the extension for shared libraries? +'
12688 echo '+ Continuing in 10 seconds to let you to ponder. +'
12689 echo '+ +'
12690 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012691 sleep 10
12692fi
12693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12694$as_echo "$SO" >&6; }
12695
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012696# Check whether right shifting a negative integer extends the sign bit
12697# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12699$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012700if test "${ac_cv_rshift_extends_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012701 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012702else
Martin v. Löwis11437992002-04-12 09:54:03 +000012703
Matthias Kloseb9621712010-04-24 17:59:49 +000012704if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012705 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012706else
Matthias Kloseb9621712010-04-24 17:59:49 +000012707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012708/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012709
12710int main()
12711{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012712 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012713}
12714
Martin v. Löwis11437992002-04-12 09:54:03 +000012715_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012716if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012717 ac_cv_rshift_extends_sign=yes
12718else
Matthias Kloseb9621712010-04-24 17:59:49 +000012719 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012720fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012721rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12722 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012723fi
12724
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012725fi
12726
Matthias Kloseb9621712010-04-24 17:59:49 +000012727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12728$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012729if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012730then
Martin v. Löwis11437992002-04-12 09:54:03 +000012731
Matthias Kloseb9621712010-04-24 17:59:49 +000012732$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012733
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012734fi
12735
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012736# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12738$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012739if test "${ac_cv_have_getc_unlocked+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012740 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012741else
Martin v. Löwis11437992002-04-12 09:54:03 +000012742
Matthias Kloseb9621712010-04-24 17:59:49 +000012743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012744/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012745#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012746int
12747main ()
12748{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012749
12750 FILE *f = fopen("/dev/null", "r");
12751 flockfile(f);
12752 getc_unlocked(f);
12753 funlockfile(f);
12754
Martin v. Löwis11437992002-04-12 09:54:03 +000012755 ;
12756 return 0;
12757}
12758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012759if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012760 ac_cv_have_getc_unlocked=yes
12761else
Matthias Kloseb9621712010-04-24 17:59:49 +000012762 ac_cv_have_getc_unlocked=no
12763fi
12764rm -f core conftest.err conftest.$ac_objext \
12765 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012766fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012767
Matthias Kloseb9621712010-04-24 17:59:49 +000012768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12769$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012770if test "$ac_cv_have_getc_unlocked" = yes
12771then
Martin v. Löwis11437992002-04-12 09:54:03 +000012772
Matthias Kloseb9621712010-04-24 17:59:49 +000012773$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012774
12775fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012776
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012777# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012778# save the value of LIBS so we don't actually link Python with readline
12779LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012780
Gregory P. Smith18820942008-09-07 06:24:49 +000012781# On some systems we need to link readline to a termcap compatible
12782# library. NOTE: Keep the precedence of listed libraries synchronised
12783# with setup.py.
12784py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12786$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012787for py_libtermcap in "" ncursesw ncurses curses termcap; do
12788 if test -z "$py_libtermcap"; then
12789 READLINE_LIBS="-lreadline"
12790 else
12791 READLINE_LIBS="-lreadline -l$py_libtermcap"
12792 fi
12793 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012795/* end confdefs.h. */
12796
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012797/* Override any GCC internal prototype to avoid an error.
12798 Use char because int might match the return type of a GCC
12799 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012800#ifdef __cplusplus
12801extern "C"
12802#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012803char readline ();
12804int
12805main ()
12806{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012807return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012808 ;
12809 return 0;
12810}
12811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012812if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012813 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012814fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012815rm -f core conftest.err conftest.$ac_objext \
12816 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012817 if test $py_cv_lib_readline = yes; then
12818 break
12819 fi
12820done
12821# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12822#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012823if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12825$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012826else
Matthias Kloseb9621712010-04-24 17:59:49 +000012827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12828$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012829
Matthias Kloseb9621712010-04-24 17:59:49 +000012830$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012831
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012832fi
12833
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012834# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12836$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012837if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012838 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012839else
12840 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012841LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012843/* end confdefs.h. */
12844
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012845/* Override any GCC internal prototype to avoid an error.
12846 Use char because int might match the return type of a GCC
12847 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012848#ifdef __cplusplus
12849extern "C"
12850#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012851char rl_callback_handler_install ();
12852int
12853main ()
12854{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012855return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012856 ;
12857 return 0;
12858}
12859_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012860if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012861 ac_cv_lib_readline_rl_callback_handler_install=yes
12862else
Matthias Kloseb9621712010-04-24 17:59:49 +000012863 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012864fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012865rm -f core conftest.err conftest.$ac_objext \
12866 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012867LIBS=$ac_check_lib_save_LIBS
12868fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12870$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012871if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012872
Matthias Kloseb9621712010-04-24 17:59:49 +000012873$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012874
12875fi
12876
12877
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012878# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012880/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012881#include <readline/readline.h>
12882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012883if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012884 have_readline=yes
12885else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012886 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012887
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012888fi
Benjamin Peterson87cdb812011-05-31 18:26:08 -050012889rm -f conftest.err conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012890if test $have_readline = yes
12891then
Matthias Kloseb9621712010-04-24 17:59:49 +000012892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012893/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012894#include <readline/readline.h>
12895
12896_ACEOF
12897if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012898 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012899
Matthias Kloseb9621712010-04-24 17:59:49 +000012900$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012901
12902fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012903rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012904
Matthias Kloseb9621712010-04-24 17:59:49 +000012905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012906/* end confdefs.h. */
12907#include <readline/readline.h>
12908
12909_ACEOF
12910if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012911 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012912
Matthias Kloseb9621712010-04-24 17:59:49 +000012913$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012914
12915fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012916rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012917
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012918fi
12919
Martin v. Löwis0daad592001-09-30 21:09:59 +000012920# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12922$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012923if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012924 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012925else
Martin v. Löwis11437992002-04-12 09:54:03 +000012926 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012927LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012929/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012930
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012931/* Override any GCC internal prototype to avoid an error.
12932 Use char because int might match the return type of a GCC
12933 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012934#ifdef __cplusplus
12935extern "C"
12936#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012937char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012938int
12939main ()
12940{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012941return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012942 ;
12943 return 0;
12944}
12945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012946if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012947 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012948else
Matthias Kloseb9621712010-04-24 17:59:49 +000012949 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012950fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012951rm -f core conftest.err conftest.$ac_objext \
12952 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012953LIBS=$ac_check_lib_save_LIBS
12954fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12956$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012957if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012958
Matthias Kloseb9621712010-04-24 17:59:49 +000012959$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012960
Martin v. Löwis0daad592001-09-30 21:09:59 +000012961fi
12962
Michael W. Hudson54241132001-12-07 15:38:26 +000012963
Thomas Wouters89d996e2007-09-08 17:39:28 +000012964# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12966$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012967if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012968 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012969else
12970 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012971LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012973/* end confdefs.h. */
12974
12975/* Override any GCC internal prototype to avoid an error.
12976 Use char because int might match the return type of a GCC
12977 builtin and then its argument prototype would still apply. */
12978#ifdef __cplusplus
12979extern "C"
12980#endif
12981char rl_completion_display_matches_hook ();
12982int
12983main ()
12984{
12985return rl_completion_display_matches_hook ();
12986 ;
12987 return 0;
12988}
12989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012990if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012991 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12992else
Matthias Kloseb9621712010-04-24 17:59:49 +000012993 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012994fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012995rm -f core conftest.err conftest.$ac_objext \
12996 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012997LIBS=$ac_check_lib_save_LIBS
12998fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13000$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013001if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013002
Matthias Kloseb9621712010-04-24 17:59:49 +000013003$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013004
13005fi
13006
13007
Martin v. Löwis0daad592001-09-30 21:09:59 +000013008# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13010$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013011if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013012 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013013else
Martin v. Löwis11437992002-04-12 09:54:03 +000013014 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013015LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013016cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013017/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013019/* Override any GCC internal prototype to avoid an error.
13020 Use char because int might match the return type of a GCC
13021 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013022#ifdef __cplusplus
13023extern "C"
13024#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013025char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013026int
13027main ()
13028{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013029return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013030 ;
13031 return 0;
13032}
13033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013034if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013035 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013036else
Matthias Kloseb9621712010-04-24 17:59:49 +000013037 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013038fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013039rm -f core conftest.err conftest.$ac_objext \
13040 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013041LIBS=$ac_check_lib_save_LIBS
13042fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13044$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013045if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013046
Matthias Kloseb9621712010-04-24 17:59:49 +000013047$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013048
Guido van Rossum353ae582001-07-10 16:45:32 +000013049fi
13050
Jack Jansendd19cf82001-12-06 22:36:17 +000013051
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013052# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013054/* end confdefs.h. */
13055#include <readline/readline.h>
13056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013057if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013058 have_readline=yes
13059else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013060 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013061
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013062fi
Benjamin Peterson87cdb812011-05-31 18:26:08 -050013063rm -f conftest.err conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013064if test $have_readline = yes
13065then
Matthias Kloseb9621712010-04-24 17:59:49 +000013066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013067/* end confdefs.h. */
13068#include <readline/readline.h>
13069
13070_ACEOF
13071if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013072 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013073
Matthias Kloseb9621712010-04-24 17:59:49 +000013074$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013075
13076fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013077rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013078
13079fi
13080
Martin v. Löwis82bca632006-02-10 20:49:30 +000013081# End of readline checks: restore LIBS
13082LIBS=$LIBS_no_readline
13083
Matthias Kloseb9621712010-04-24 17:59:49 +000013084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13085$as_echo_n "checking for broken nice()... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013086if test "${ac_cv_broken_nice+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013087 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013088else
Martin v. Löwis11437992002-04-12 09:54:03 +000013089
Matthias Kloseb9621712010-04-24 17:59:49 +000013090if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013091 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013092else
Matthias Kloseb9621712010-04-24 17:59:49 +000013093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013094/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013095
13096int main()
13097{
13098 int val1 = nice(1);
13099 if (val1 != -1 && val1 == nice(2))
13100 exit(0);
13101 exit(1);
13102}
13103
Martin v. Löwis11437992002-04-12 09:54:03 +000013104_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013105if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013106 ac_cv_broken_nice=yes
13107else
Matthias Kloseb9621712010-04-24 17:59:49 +000013108 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013109fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013110rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13111 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013112fi
13113
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013114fi
13115
Matthias Kloseb9621712010-04-24 17:59:49 +000013116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13117$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013118if test "$ac_cv_broken_nice" = yes
13119then
Martin v. Löwis11437992002-04-12 09:54:03 +000013120
Matthias Kloseb9621712010-04-24 17:59:49 +000013121$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013122
13123fi
13124
Matthias Kloseb9621712010-04-24 17:59:49 +000013125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13126$as_echo_n "checking for broken poll()... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013127if test "${ac_cv_broken_poll+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013128 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013129else
Matthias Kloseb9621712010-04-24 17:59:49 +000013130 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013131 ac_cv_broken_poll=no
13132else
Matthias Kloseb9621712010-04-24 17:59:49 +000013133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013134/* end confdefs.h. */
13135
13136#include <poll.h>
13137
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013138int main()
13139{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013140 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013141 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013142
13143 close (42);
13144
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013145 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013146 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013147 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013148 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013149 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013150 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013151 return 1;
13152}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013153
13154_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013155if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013156 ac_cv_broken_poll=yes
13157else
Matthias Kloseb9621712010-04-24 17:59:49 +000013158 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013159fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013160rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13161 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013162fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013163
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013164fi
13165
Matthias Kloseb9621712010-04-24 17:59:49 +000013166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13167$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013168if test "$ac_cv_broken_poll" = yes
13169then
13170
Matthias Kloseb9621712010-04-24 17:59:49 +000013171$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013172
13173fi
13174
Brett Cannon43802422005-02-10 20:48:03 +000013175# 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 +000013176# (which is not required by ISO C or UNIX spec) and/or if we support
13177# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013178ac_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 +000013179#include <$ac_cv_struct_tm>
13180
Matthias Kloseb9621712010-04-24 17:59:49 +000013181"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013182if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013183
13184cat >>confdefs.h <<_ACEOF
13185#define HAVE_STRUCT_TM_TM_ZONE 1
13186_ACEOF
13187
13188
13189fi
13190
13191if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13192
Matthias Kloseb9621712010-04-24 17:59:49 +000013193$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013194
13195else
Matthias Kloseb9621712010-04-24 17:59:49 +000013196 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13197"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013198if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013199 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013200else
Matthias Kloseb9621712010-04-24 17:59:49 +000013201 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013202fi
13203
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013204cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013205#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013206_ACEOF
13207
Matthias Kloseb9621712010-04-24 17:59:49 +000013208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13209$as_echo_n "checking for tzname... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013210if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013211 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013212else
Matthias Kloseb9621712010-04-24 17:59:49 +000013213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013214/* end confdefs.h. */
13215#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013216#if !HAVE_DECL_TZNAME
13217extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013218#endif
13219
13220int
13221main ()
13222{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013223return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013224 ;
13225 return 0;
13226}
13227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013228if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013229 ac_cv_var_tzname=yes
13230else
Matthias Kloseb9621712010-04-24 17:59:49 +000013231 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013232fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013233rm -f core conftest.err conftest.$ac_objext \
13234 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013235fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13237$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013238 if test $ac_cv_var_tzname = yes; then
13239
Matthias Kloseb9621712010-04-24 17:59:49 +000013240$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013241
13242 fi
13243fi
13244
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013245
Martin v. Löwis1d459062005-03-14 21:23:33 +000013246# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13248$as_echo_n "checking for working tzset()... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013249if test "${ac_cv_working_tzset+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013250 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013251else
13252
Matthias Kloseb9621712010-04-24 17:59:49 +000013253if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013254 ac_cv_working_tzset=no
13255else
Matthias Kloseb9621712010-04-24 17:59:49 +000013256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013257/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013258
13259#include <stdlib.h>
13260#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013261#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013262
13263#if HAVE_TZNAME
13264extern char *tzname[];
13265#endif
13266
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013267int main()
13268{
Brett Cannon18367812003-09-19 00:59:16 +000013269 /* Note that we need to ensure that not only does tzset(3)
13270 do 'something' with localtime, but it works as documented
13271 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013272 This includes making sure that tzname is set properly if
13273 tm->tm_zone does not exist since it is the alternative way
13274 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013275
13276 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013277 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013278 */
13279
Martin v. Löwis1d459062005-03-14 21:23:33 +000013280 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013281 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13282
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013283 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013284 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013285 if (localtime(&groundhogday)->tm_hour != 0)
13286 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013287#if HAVE_TZNAME
13288 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13289 if (strcmp(tzname[0], "UTC") ||
13290 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13291 exit(1);
13292#endif
Brett Cannon18367812003-09-19 00:59:16 +000013293
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013294 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013295 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013296 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013297 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013298#if HAVE_TZNAME
13299 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13300 exit(1);
13301#endif
Brett Cannon18367812003-09-19 00:59:16 +000013302
13303 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13304 tzset();
13305 if (localtime(&groundhogday)->tm_hour != 11)
13306 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013307#if HAVE_TZNAME
13308 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13309 exit(1);
13310#endif
13311
13312#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013313 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13314 exit(1);
13315 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13316 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013317#endif
Brett Cannon18367812003-09-19 00:59:16 +000013318
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013319 exit(0);
13320}
13321
13322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013323if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013324 ac_cv_working_tzset=yes
13325else
Matthias Kloseb9621712010-04-24 17:59:49 +000013326 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013327fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013328rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13329 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013330fi
13331
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013332fi
13333
Matthias Kloseb9621712010-04-24 17:59:49 +000013334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13335$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013336if test "$ac_cv_working_tzset" = yes
13337then
13338
Matthias Kloseb9621712010-04-24 17:59:49 +000013339$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013340
13341fi
13342
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013343# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13345$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013346if test "${ac_cv_stat_tv_nsec+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013347 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013348else
Matthias Kloseb9621712010-04-24 17:59:49 +000013349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013350/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013351#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013352int
13353main ()
13354{
13355
13356struct stat st;
13357st.st_mtim.tv_nsec = 1;
13358
13359 ;
13360 return 0;
13361}
13362_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013363if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013364 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013365else
Matthias Kloseb9621712010-04-24 17:59:49 +000013366 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013367fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13369fi
13370
Matthias Kloseb9621712010-04-24 17:59:49 +000013371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13372$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013373if test "$ac_cv_stat_tv_nsec" = yes
13374then
13375
Matthias Kloseb9621712010-04-24 17:59:49 +000013376$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013377
13378fi
13379
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013380# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13382$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013383if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013384 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013385else
Matthias Kloseb9621712010-04-24 17:59:49 +000013386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013387/* end confdefs.h. */
13388#include <sys/stat.h>
13389int
13390main ()
13391{
13392
13393struct stat st;
13394st.st_mtimespec.tv_nsec = 1;
13395
13396 ;
13397 return 0;
13398}
13399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013400if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013401 ac_cv_stat_tv_nsec2=yes
13402else
Matthias Kloseb9621712010-04-24 17:59:49 +000013403 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13406fi
13407
Matthias Kloseb9621712010-04-24 17:59:49 +000013408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13409$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013410if test "$ac_cv_stat_tv_nsec2" = yes
13411then
13412
Matthias Kloseb9621712010-04-24 17:59:49 +000013413$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013414
13415fi
13416
Jack Jansen666b1e72001-10-31 12:11:48 +000013417# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13419$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013420if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013421 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013422else
Matthias Kloseb9621712010-04-24 17:59:49 +000013423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013424/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013425#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013426int
13427main ()
13428{
Jack Jansen666b1e72001-10-31 12:11:48 +000013429
13430 int rtn;
13431 rtn = mvwdelch(0,0,0);
13432
Martin v. Löwis11437992002-04-12 09:54:03 +000013433 ;
13434 return 0;
13435}
13436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013437if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013438 ac_cv_mvwdelch_is_expression=yes
13439else
Matthias Kloseb9621712010-04-24 17:59:49 +000013440 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013441fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13443fi
13444
Matthias Kloseb9621712010-04-24 17:59:49 +000013445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13446$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013447
13448if test "$ac_cv_mvwdelch_is_expression" = yes
13449then
Martin v. Löwis11437992002-04-12 09:54:03 +000013450
Matthias Kloseb9621712010-04-24 17:59:49 +000013451$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013452
13453fi
13454
Matthias Kloseb9621712010-04-24 17:59:49 +000013455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13456$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013457if test "${ac_cv_window_has_flags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013458 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013459else
Matthias Kloseb9621712010-04-24 17:59:49 +000013460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013461/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013462#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013463int
13464main ()
13465{
Jack Jansen666b1e72001-10-31 12:11:48 +000013466
13467 WINDOW *w;
13468 w->_flags = 0;
13469
Martin v. Löwis11437992002-04-12 09:54:03 +000013470 ;
13471 return 0;
13472}
13473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013474if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013475 ac_cv_window_has_flags=yes
13476else
Matthias Kloseb9621712010-04-24 17:59:49 +000013477 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13480fi
13481
Matthias Kloseb9621712010-04-24 17:59:49 +000013482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13483$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013484
Jack Jansen666b1e72001-10-31 12:11:48 +000013485
13486if test "$ac_cv_window_has_flags" = yes
13487then
Martin v. Löwis11437992002-04-12 09:54:03 +000013488
Matthias Kloseb9621712010-04-24 17:59:49 +000013489$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013490
13491fi
13492
Matthias Kloseb9621712010-04-24 17:59:49 +000013493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13494$as_echo_n "checking for is_term_resized... " >&6; }
13495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013496/* end confdefs.h. */
13497#include <curses.h>
13498int
13499main ()
13500{
13501void *x=is_term_resized
13502 ;
13503 return 0;
13504}
13505_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013506if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013507
Matthias Kloseb9621712010-04-24 17:59:49 +000013508$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013509
Matthias Kloseb159a552010-04-25 21:00:44 +000013510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013511$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013512else
Matthias Kloseb9621712010-04-24 17:59:49 +000013513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13514$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013515
13516fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13518
Matthias Kloseb9621712010-04-24 17:59:49 +000013519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13520$as_echo_n "checking for resize_term... " >&6; }
13521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013522/* end confdefs.h. */
13523#include <curses.h>
13524int
13525main ()
13526{
13527void *x=resize_term
13528 ;
13529 return 0;
13530}
13531_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013532if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013533
Matthias Kloseb9621712010-04-24 17:59:49 +000013534$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013535
Matthias Kloseb159a552010-04-25 21:00:44 +000013536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013537$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013538else
Matthias Kloseb9621712010-04-24 17:59:49 +000013539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13540$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013541
13542fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13544
Matthias Kloseb9621712010-04-24 17:59:49 +000013545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13546$as_echo_n "checking for resizeterm... " >&6; }
13547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013548/* end confdefs.h. */
13549#include <curses.h>
13550int
13551main ()
13552{
13553void *x=resizeterm
13554 ;
13555 return 0;
13556}
13557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013558if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013559
Matthias Kloseb9621712010-04-24 17:59:49 +000013560$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013561
Matthias Kloseb159a552010-04-25 21:00:44 +000013562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013563$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013564else
Matthias Kloseb9621712010-04-24 17:59:49 +000013565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13566$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013567
13568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13570
Matthias Kloseb9621712010-04-24 17:59:49 +000013571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13572$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013573
13574if test -r /dev/ptmx
13575then
Matthias Kloseb9621712010-04-24 17:59:49 +000013576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13577$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013578
Matthias Kloseb9621712010-04-24 17:59:49 +000013579$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013580
Thomas Wouters89f507f2006-12-13 04:49:30 +000013581else
Matthias Kloseb9621712010-04-24 17:59:49 +000013582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13583$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013584fi
13585
Matthias Kloseb9621712010-04-24 17:59:49 +000013586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13587$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013588
13589if test -r /dev/ptc
13590then
Matthias Kloseb9621712010-04-24 17:59:49 +000013591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13592$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013593
Matthias Kloseb9621712010-04-24 17:59:49 +000013594$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013595
Thomas Wouters89f507f2006-12-13 04:49:30 +000013596else
Matthias Kloseb9621712010-04-24 17:59:49 +000013597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13598$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013599fi
13600
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013601if test "$have_long_long" = yes
13602then
Matthias Kloseb9621712010-04-24 17:59:49 +000013603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13604$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013605 if test "${ac_cv_have_long_long_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013606 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013607else
Matthias Kloseb9621712010-04-24 17:59:49 +000013608 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013609 ac_cv_have_long_long_format=no
13610else
Matthias Kloseb9621712010-04-24 17:59:49 +000013611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013612/* end confdefs.h. */
13613
13614 #include <stdio.h>
13615 #include <stddef.h>
13616 #include <string.h>
13617
13618 #ifdef HAVE_SYS_TYPES_H
13619 #include <sys/types.h>
13620 #endif
13621
13622 int main()
13623 {
13624 char buffer[256];
13625
13626 if (sprintf(buffer, "%lld", (long long)123) < 0)
13627 return 1;
13628 if (strcmp(buffer, "123"))
13629 return 1;
13630
13631 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13632 return 1;
13633 if (strcmp(buffer, "-123"))
13634 return 1;
13635
13636 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13637 return 1;
13638 if (strcmp(buffer, "123"))
13639 return 1;
13640
13641 return 0;
13642 }
13643
13644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013645if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013646 ac_cv_have_long_long_format=yes
13647else
Matthias Kloseb9621712010-04-24 17:59:49 +000013648 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +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
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013652fi
13653
13654
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013655fi
13656
Matthias Kloseb9621712010-04-24 17:59:49 +000013657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13658$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013659fi
13660
Mark Dickinson89d7d412009-12-31 20:50:59 +000013661if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013662then
13663
Matthias Kloseb9621712010-04-24 17:59:49 +000013664$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013665
13666fi
13667
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013668if test $ac_sys_system = Darwin
13669then
13670 LIBS="$LIBS -framework CoreFoundation"
13671fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013672
Matthias Kloseb9621712010-04-24 17:59:49 +000013673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13674$as_echo_n "checking for %zd printf() format support... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013675if test "${ac_cv_have_size_t_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013676 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013677else
Matthias Kloseb9621712010-04-24 17:59:49 +000013678 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013679 ac_cv_have_size_t_format="cross -- assuming yes"
13680
Thomas Wouters477c8d52006-05-27 19:21:47 +000013681else
Matthias Kloseb9621712010-04-24 17:59:49 +000013682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013683/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013684
Thomas Wouters477c8d52006-05-27 19:21:47 +000013685#include <stdio.h>
13686#include <stddef.h>
13687#include <string.h>
13688
Christian Heimes2c181612007-12-17 20:04:13 +000013689#ifdef HAVE_SYS_TYPES_H
13690#include <sys/types.h>
13691#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013692
13693#ifdef HAVE_SSIZE_T
13694typedef ssize_t Py_ssize_t;
13695#elif SIZEOF_VOID_P == SIZEOF_LONG
13696typedef long Py_ssize_t;
13697#else
13698typedef int Py_ssize_t;
13699#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013700
Christian Heimes2c181612007-12-17 20:04:13 +000013701int main()
13702{
13703 char buffer[256];
13704
Thomas Wouters477c8d52006-05-27 19:21:47 +000013705 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13706 return 1;
13707
Thomas Wouters89f507f2006-12-13 04:49:30 +000013708 if (strcmp(buffer, "123"))
13709 return 1;
13710
13711 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13712 return 1;
13713
13714 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013715 return 1;
13716
13717 return 0;
13718}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013719
Thomas Wouters477c8d52006-05-27 19:21:47 +000013720_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013721if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013722 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013723else
Matthias Kloseb9621712010-04-24 17:59:49 +000013724 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013725fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013726rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13727 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013728fi
13729
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013730fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13732$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013733if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013734
Matthias Kloseb9621712010-04-24 17:59:49 +000013735$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013736
13737fi
13738
Matthias Kloseb9621712010-04-24 17:59:49 +000013739ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013740#ifdef HAVE_SYS_TYPES_H
13741#include <sys/types.h>
13742#endif
13743#ifdef HAVE_SYS_SOCKET_H
13744#include <sys/socket.h>
13745#endif
13746
Matthias Kloseb9621712010-04-24 17:59:49 +000013747"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013748if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013749
Martin v. Löwis11437992002-04-12 09:54:03 +000013750else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013751
Matthias Kloseb9621712010-04-24 17:59:49 +000013752$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013753
13754fi
13755
Michael W. Hudson54241132001-12-07 15:38:26 +000013756
Matthias Kloseb9621712010-04-24 17:59:49 +000013757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13758$as_echo_n "checking for broken mbstowcs... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013759if test "${ac_cv_broken_mbstowcs+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013760 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013761else
Matthias Kloseb9621712010-04-24 17:59:49 +000013762 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013763 ac_cv_broken_mbstowcs=no
13764else
Matthias Kloseb9621712010-04-24 17:59:49 +000013765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013766/* end confdefs.h. */
13767
13768#include<stdlib.h>
13769int main() {
13770 size_t len = -1;
13771 const char *str = "text";
13772 len = mbstowcs(NULL, str, 0);
13773 return (len != 4);
13774}
13775
13776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013777if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013778 ac_cv_broken_mbstowcs=no
13779else
Matthias Kloseb9621712010-04-24 17:59:49 +000013780 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013781fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013782rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13783 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013784fi
13785
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013786fi
13787
Matthias Kloseb9621712010-04-24 17:59:49 +000013788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13789$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013790if test "$ac_cv_broken_mbstowcs" = yes
13791then
13792
Matthias Kloseb9621712010-04-24 17:59:49 +000013793$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013794
13795fi
13796
Antoine Pitrou042b1282010-08-13 21:15:58 +000013797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13798$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013799if test "${ac_cv_computed_gotos+set}" = set; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013800 $as_echo_n "(cached) " >&6
13801else
13802 if test "$cross_compiling" = yes; then :
13803 ac_cv_computed_gotos=no
13804else
13805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13806/* end confdefs.h. */
13807
13808int main(int argc, char **argv)
13809{
13810 static void *targets[1] = { &&LABEL1 };
13811 goto LABEL2;
13812LABEL1:
13813 return 0;
13814LABEL2:
13815 goto *targets[0];
13816 return 1;
13817}
13818
13819_ACEOF
13820if ac_fn_c_try_run "$LINENO"; then :
13821 ac_cv_computed_gotos=yes
13822else
13823 ac_cv_computed_gotos=no
13824fi
13825rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13826 conftest.$ac_objext conftest.beam conftest.$ac_ext
13827fi
13828
13829fi
13830
13831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13832$as_echo "$ac_cv_computed_gotos" >&6; }
13833if test "$ac_cv_computed_gotos" = yes
13834then
13835
13836$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13837
13838fi
13839
Antoine Pitroub52ec782009-01-25 16:34:23 +000013840# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13842$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013843
13844# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013845if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013846 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013847if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013848then
13849
Matthias Kloseb9621712010-04-24 17:59:49 +000013850$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013851
Matthias Kloseb9621712010-04-24 17:59:49 +000013852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13853$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013854fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013855if test "$withval" = no
13856then
13857
13858$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13859
Matthias Kloseb9621712010-04-24 17:59:49 +000013860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13861$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013862fi
13863
Antoine Pitrou042b1282010-08-13 21:15:58 +000013864else
13865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13866$as_echo "no value specified" >&6; }
13867fi
13868
Antoine Pitroub52ec782009-01-25 16:34:23 +000013869
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013870case $ac_sys_system in
13871AIX*)
13872
13873$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13874 ;;
13875esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013876
Michael W. Hudson54241132001-12-07 15:38:26 +000013877
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013878
13879
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013880for h in `(cd $srcdir;echo Python/thread_*.h)`
13881do
13882 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13883done
13884
Michael W. Hudson54241132001-12-07 15:38:26 +000013885
Neal Norwitzd24499d2005-12-18 21:36:39 +000013886SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13888$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013889for dir in $SRCDIRS; do
13890 if test ! -d $dir; then
13891 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013892 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013893done
Matthias Kloseb9621712010-04-24 17:59:49 +000013894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13895$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013896
Guido van Rossum627b2d71993-12-24 10:39:16 +000013897# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013898ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013899
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013900ac_config_files="$ac_config_files Modules/ld_so_aix"
13901
Martin v. Löwis11437992002-04-12 09:54:03 +000013902cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013903# This file is a shell script that caches the results of configure
13904# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013905# scripts and configure runs, see configure's option --config-cache.
13906# It is not useful on other systems. If it contains results you don't
13907# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013908#
Martin v. Löwis11437992002-04-12 09:54:03 +000013909# config.status only pays attention to the cache file if you give it
13910# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013911#
Skip Montanaro6dead952003-09-25 14:50:04 +000013912# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013913# loading this file, other *unset* `ac_cv_foo' will be assigned the
13914# following values.
13915
13916_ACEOF
13917
Guido van Rossumf78abae1997-01-21 22:02:36 +000013918# The following way of writing the cache mishandles newlines in values,
13919# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013920# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013921# Ultrix sh set writes to stderr and can't be redirected directly,
13922# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013923(
13924 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13925 eval ac_val=\$$ac_var
13926 case $ac_val in #(
13927 *${as_nl}*)
13928 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013929 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13930$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013931 esac
13932 case $ac_var in #(
13933 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013934 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13935 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013936 esac ;;
13937 esac
13938 done
13939
Martin v. Löwis11437992002-04-12 09:54:03 +000013940 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013941 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13942 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013943 # `set' does not quote correctly, so add quotes: double-quote
13944 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013945 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013946 "s/'/'\\\\''/g;
13947 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013948 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013949 *)
13950 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013951 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013952 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013953 esac |
13954 sort
13955) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013956 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013957 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013958 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013959 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013960 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13961 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013962 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13963 :end' >>confcache
13964if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13965 if test -w "$cache_file"; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013966 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013967 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13968$as_echo "$as_me: updating cache $cache_file" >&6;}
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013969 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013970 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013971 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13972$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013973 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013974fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013975rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013976
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013977test "x$prefix" = xNONE && prefix=$ac_default_prefix
13978# Let make expand exec_prefix.
13979test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013980
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013981DEFS=-DHAVE_CONFIG_H
13982
Skip Montanaro6dead952003-09-25 14:50:04 +000013983ac_libobjs=
13984ac_ltlibobjs=
13985for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13986 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013987 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013988 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013989 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13990 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013991 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13992 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013993done
13994LIBOBJS=$ac_libobjs
13995
13996LTLIBOBJS=$ac_ltlibobjs
13997
13998
Martin v. Löwis11437992002-04-12 09:54:03 +000013999
Matthias Kloseb9621712010-04-24 17:59:49 +000014000
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014001: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000014002ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014003ac_clean_files_save=$ac_clean_files
14004ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014005{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14006$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14007as_write_fail=0
14008cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014009#! $SHELL
14010# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014011# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014012# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014013# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014014
Martin v. Löwis11437992002-04-12 09:54:03 +000014015debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014016ac_cs_recheck=false
14017ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014018
Matthias Kloseb9621712010-04-24 17:59:49 +000014019SHELL=\${CONFIG_SHELL-$SHELL}
14020export SHELL
14021_ASEOF
14022cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14023## -------------------- ##
14024## M4sh Initialization. ##
14025## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014026
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014027# Be more Bourne compatible
14028DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014029if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014030 emulate sh
14031 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014032 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014033 # is contrary to our usage. Disable this feature.
14034 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014035 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014036else
Matthias Kloseb9621712010-04-24 17:59:49 +000014037 case `(set -o) 2>/dev/null` in #(
14038 *posix*) :
14039 set -o posix ;; #(
14040 *) :
14041 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014042esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014043fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014044
14045
Matthias Kloseb9621712010-04-24 17:59:49 +000014046as_nl='
14047'
14048export as_nl
14049# Printing a long string crashes Solaris 7 /usr/bin/printf.
14050as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14051as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14052as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14053# Prefer a ksh shell builtin over an external printf program on Solaris,
14054# but without wasting forks for bash or zsh.
14055if test -z "$BASH_VERSION$ZSH_VERSION" \
14056 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14057 as_echo='print -r --'
14058 as_echo_n='print -rn --'
14059elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14060 as_echo='printf %s\n'
14061 as_echo_n='printf %s'
14062else
14063 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14064 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14065 as_echo_n='/usr/ucb/echo -n'
14066 else
14067 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14068 as_echo_n_body='eval
14069 arg=$1;
14070 case $arg in #(
14071 *"$as_nl"*)
14072 expr "X$arg" : "X\\(.*\\)$as_nl";
14073 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14074 esac;
14075 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14076 '
14077 export as_echo_n_body
14078 as_echo_n='sh -c $as_echo_n_body as_echo'
14079 fi
14080 export as_echo_body
14081 as_echo='sh -c $as_echo_body as_echo'
14082fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014083
14084# The user is always right.
14085if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014086 PATH_SEPARATOR=:
14087 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14088 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14089 PATH_SEPARATOR=';'
14090 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014091fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014092
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014093
14094# IFS
14095# We need space, tab and new line, in precisely that order. Quoting is
14096# there to prevent editors from complaining about space-tab.
14097# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14098# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014099IFS=" "" $as_nl"
14100
14101# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000014102case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014103 *[\\/]* ) as_myself=$0 ;;
14104 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014105for as_dir in $PATH
14106do
14107 IFS=$as_save_IFS
14108 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014109 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14110 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014111IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014112
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014113 ;;
14114esac
14115# We did not find ourselves, most probably we were run as `sh COMMAND'
14116# in which case we are not to be found in the path.
14117if test "x$as_myself" = x; then
14118 as_myself=$0
14119fi
14120if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014121 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14122 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014123fi
14124
Matthias Kloseb9621712010-04-24 17:59:49 +000014125# Unset variables that we do not need and which cause bugs (e.g. in
14126# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14127# suppresses any "Segmentation fault" message there. '((' could
14128# trigger a bug in pdksh 5.2.14.
14129for as_var in BASH_ENV ENV MAIL MAILPATH
14130do eval test x\${$as_var+set} = xset \
14131 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014132done
14133PS1='$ '
14134PS2='> '
14135PS4='+ '
14136
14137# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014138LC_ALL=C
14139export LC_ALL
14140LANGUAGE=C
14141export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014142
Matthias Kloseb9621712010-04-24 17:59:49 +000014143# CDPATH.
14144(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14145
14146
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014147# as_fn_error ERROR [LINENO LOG_FD]
14148# ---------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014149# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14150# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014151# script with status $?, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014152as_fn_error ()
14153{
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014154 as_status=$?; test $as_status -eq 0 && as_status=1
14155 if test "$3"; then
14156 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14157 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
Matthias Kloseb9621712010-04-24 17:59:49 +000014158 fi
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014159 $as_echo "$as_me: error: $1" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014160 as_fn_exit $as_status
14161} # as_fn_error
14162
14163
14164# as_fn_set_status STATUS
14165# -----------------------
14166# Set $? to STATUS, without forking.
14167as_fn_set_status ()
14168{
14169 return $1
14170} # as_fn_set_status
14171
14172# as_fn_exit STATUS
14173# -----------------
14174# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14175as_fn_exit ()
14176{
14177 set +e
14178 as_fn_set_status $1
14179 exit $1
14180} # as_fn_exit
14181
14182# as_fn_unset VAR
14183# ---------------
14184# Portably unset VAR.
14185as_fn_unset ()
14186{
14187 { eval $1=; unset $1;}
14188}
14189as_unset=as_fn_unset
14190# as_fn_append VAR VALUE
14191# ----------------------
14192# Append the text in VALUE to the end of the definition contained in VAR. Take
14193# advantage of any shell optimizations that allow amortized linear growth over
14194# repeated appends, instead of the typical quadratic growth present in naive
14195# implementations.
14196if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14197 eval 'as_fn_append ()
14198 {
14199 eval $1+=\$2
14200 }'
14201else
14202 as_fn_append ()
14203 {
14204 eval $1=\$$1\$2
14205 }
14206fi # as_fn_append
14207
14208# as_fn_arith ARG...
14209# ------------------
14210# Perform arithmetic evaluation on the ARGs, and store the result in the
14211# global $as_val. Take advantage of shells that can avoid forks. The arguments
14212# must be portable across $(()) and expr.
14213if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14214 eval 'as_fn_arith ()
14215 {
14216 as_val=$(( $* ))
14217 }'
14218else
14219 as_fn_arith ()
14220 {
14221 as_val=`expr "$@" || test $? -eq 1`
14222 }
14223fi # as_fn_arith
14224
14225
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014226if expr a : '\(a\)' >/dev/null 2>&1 &&
14227 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14228 as_expr=expr
14229else
14230 as_expr=false
14231fi
14232
14233if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14234 as_basename=basename
14235else
14236 as_basename=false
14237fi
14238
Matthias Kloseb9621712010-04-24 17:59:49 +000014239if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14240 as_dirname=dirname
14241else
14242 as_dirname=false
14243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014244
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014245as_me=`$as_basename -- "$0" ||
14246$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14247 X"$0" : 'X\(//\)$' \| \
14248 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014249$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014250 sed '/^.*\/\([^/][^/]*\)\/*$/{
14251 s//\1/
14252 q
14253 }
14254 /^X\/\(\/\/\)$/{
14255 s//\1/
14256 q
14257 }
14258 /^X\/\(\/\).*/{
14259 s//\1/
14260 q
14261 }
14262 s/.*/./; q'`
14263
Matthias Kloseb9621712010-04-24 17:59:49 +000014264# Avoid depending upon Character Ranges.
14265as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14266as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14267as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14268as_cr_digits='0123456789'
14269as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014270
14271ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014272case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014273-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014274 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014275 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014276 xy) ECHO_C='\c';;
14277 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14278 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014279 esac;;
14280*)
14281 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014282esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014283
Martin v. Löwis11437992002-04-12 09:54:03 +000014284rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014285if test -d conf$$.dir; then
14286 rm -f conf$$.dir/conf$$.file
14287else
14288 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014289 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014290fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014291if (echo >conf$$.file) 2>/dev/null; then
14292 if ln -s conf$$.file conf$$ 2>/dev/null; then
14293 as_ln_s='ln -s'
14294 # ... but there are two gotchas:
14295 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14296 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14297 # In both cases, we have to default to `cp -p'.
14298 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14299 as_ln_s='cp -p'
14300 elif ln conf$$.file conf$$ 2>/dev/null; then
14301 as_ln_s=ln
14302 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014303 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014304 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014305else
14306 as_ln_s='cp -p'
14307fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014308rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14309rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014310
Matthias Kloseb9621712010-04-24 17:59:49 +000014311
14312# as_fn_mkdir_p
14313# -------------
14314# Create "$as_dir" as a directory, including parents if necessary.
14315as_fn_mkdir_p ()
14316{
14317
14318 case $as_dir in #(
14319 -*) as_dir=./$as_dir;;
14320 esac
14321 test -d "$as_dir" || eval $as_mkdir_p || {
14322 as_dirs=
14323 while :; do
14324 case $as_dir in #(
14325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14326 *) as_qdir=$as_dir;;
14327 esac
14328 as_dirs="'$as_qdir' $as_dirs"
14329 as_dir=`$as_dirname -- "$as_dir" ||
14330$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14331 X"$as_dir" : 'X\(//\)[^/]' \| \
14332 X"$as_dir" : 'X\(//\)$' \| \
14333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14334$as_echo X"$as_dir" |
14335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14336 s//\1/
14337 q
14338 }
14339 /^X\(\/\/\)[^/].*/{
14340 s//\1/
14341 q
14342 }
14343 /^X\(\/\/\)$/{
14344 s//\1/
14345 q
14346 }
14347 /^X\(\/\).*/{
14348 s//\1/
14349 q
14350 }
14351 s/.*/./; q'`
14352 test -d "$as_dir" && break
14353 done
14354 test -z "$as_dirs" || eval "mkdir $as_dirs"
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014355 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014356
14357
14358} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014359if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014360 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014361else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014362 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014363 as_mkdir_p=false
14364fi
14365
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014366if test -x / >/dev/null 2>&1; then
14367 as_test_x='test -x'
14368else
14369 if ls -dL / >/dev/null 2>&1; then
14370 as_ls_L_option=L
14371 else
14372 as_ls_L_option=
14373 fi
14374 as_test_x='
14375 eval sh -c '\''
14376 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014377 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014378 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014379 case $1 in #(
14380 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014381 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014382 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014383 ???[sx]*):;;*)false;;esac;fi
14384 '\'' sh
14385 '
14386fi
14387as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014388
14389# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014390as_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 +000014391
14392# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014393as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014394
14395
Martin v. Löwis11437992002-04-12 09:54:03 +000014396exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014397## ----------------------------------- ##
14398## Main body of $CONFIG_STATUS script. ##
14399## ----------------------------------- ##
14400_ASEOF
14401test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014402
Matthias Kloseb9621712010-04-24 17:59:49 +000014403cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14404# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014405# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014406# values after options handling.
14407ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014408This file was extended by python $as_me 3.3, which was
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014409generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014410
14411 CONFIG_FILES = $CONFIG_FILES
14412 CONFIG_HEADERS = $CONFIG_HEADERS
14413 CONFIG_LINKS = $CONFIG_LINKS
14414 CONFIG_COMMANDS = $CONFIG_COMMANDS
14415 $ $0 $@
14416
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014417on `(hostname || uname -n) 2>/dev/null | sed 1q`
14418"
14419
Martin v. Löwis11437992002-04-12 09:54:03 +000014420_ACEOF
14421
Matthias Kloseb9621712010-04-24 17:59:49 +000014422case $ac_config_files in *"
14423"*) set x $ac_config_files; shift; ac_config_files=$*;;
14424esac
14425
14426case $ac_config_headers in *"
14427"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14428esac
14429
14430
14431cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014432# Files that config.status was made for.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014433config_files="$ac_config_files"
14434config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014435
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014436_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014437
Matthias Kloseb9621712010-04-24 17:59:49 +000014438cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014439ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014440\`$as_me' instantiates files and other configuration actions
14441from templates according to the current configuration. Unless the files
14442and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014443
Matthias Kloseb9621712010-04-24 17:59:49 +000014444Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014445
14446 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014447 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014448 --config print configuration, then exit
14449 -q, --quiet, --silent
14450 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014451 -d, --debug don't remove temporary files
14452 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014453 --file=FILE[:TEMPLATE]
14454 instantiate the configuration file FILE
14455 --header=FILE[:TEMPLATE]
14456 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014457
14458Configuration files:
14459$config_files
14460
14461Configuration headers:
14462$config_headers
14463
Matthias Kloseb9621712010-04-24 17:59:49 +000014464Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014465
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014467cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14468ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014469ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014470python config.status 3.3
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014471configured by $0, generated by GNU Autoconf 2.65,
Matthias Kloseb9621712010-04-24 17:59:49 +000014472 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014473
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014474Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014475This config.status script is free software; the Free Software Foundation
14476gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014477
14478ac_pwd='$ac_pwd'
14479srcdir='$srcdir'
14480INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014481test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014482_ACEOF
14483
Matthias Kloseb9621712010-04-24 17:59:49 +000014484cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14485# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014486ac_need_defaults=:
14487while test $# != 0
14488do
14489 case $1 in
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014490 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014491 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14492 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014493 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014494 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014495 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014496 ac_option=$1
14497 ac_optarg=$2
14498 ac_shift=shift
14499 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014500 esac
14501
Skip Montanaro6dead952003-09-25 14:50:04 +000014502 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014503 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014504 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14505 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014506 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014507 $as_echo "$ac_cs_version"; exit ;;
14508 --config | --confi | --conf | --con | --co | --c )
14509 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014510 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014511 debug=: ;;
14512 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014513 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014514 case $ac_optarg in
14515 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14516 esac
14517 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014518 ac_need_defaults=false;;
14519 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014520 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014521 case $ac_optarg in
14522 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14523 esac
14524 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014525 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014526 --he | --h)
14527 # Conflict between --help and --header
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014528 as_fn_error "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014529Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014530 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014531 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014532 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14533 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14534 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014535
14536 # This is an error.
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014537 -*) as_fn_error "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014538Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014539
Matthias Kloseb9621712010-04-24 17:59:49 +000014540 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014541 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014542
14543 esac
14544 shift
14545done
14546
Skip Montanaro6dead952003-09-25 14:50:04 +000014547ac_configure_extra_args=
14548
14549if $ac_cs_silent; then
14550 exec 6>/dev/null
14551 ac_configure_extra_args="$ac_configure_extra_args --silent"
14552fi
14553
14554_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014555cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014556if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014557 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14558 shift
14559 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14560 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014561 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014562 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014563fi
14564
Martin v. Löwis11437992002-04-12 09:54:03 +000014565_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014566cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014567exec 5>>config.log
14568{
14569 echo
14570 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14571## Running $as_me. ##
14572_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014573 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014574} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014575
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014577cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014578_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014579
Matthias Kloseb9621712010-04-24 17:59:49 +000014580cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014581
14582# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014583for ac_config_target in $ac_config_targets
14584do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014585 case $ac_config_target in
14586 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14587 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14588 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014589 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14590 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014591 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14592 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014593 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014594 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014595
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014596 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014597 esac
14598done
14599
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014600
Martin v. Löwis11437992002-04-12 09:54:03 +000014601# If the user did not use the arguments to specify the items to instantiate,
14602# then the envvar interface is used. Set only those that are not.
14603# We use the long form for the default assignment because of an extremely
14604# bizarre bug on SunOS 4.1.3.
14605if $ac_need_defaults; then
14606 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14607 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14608fi
14609
Skip Montanaro6dead952003-09-25 14:50:04 +000014610# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014611# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014612# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014613# Hook for its removal unless debugging.
14614# Note that there is a small window in which the directory will not be cleaned:
14615# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014616$debug ||
14617{
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014618 tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014619 trap 'exit_status=$?
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014620 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014621' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014622 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014623}
Martin v. Löwis11437992002-04-12 09:54:03 +000014624# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014625
Martin v. Löwis11437992002-04-12 09:54:03 +000014626{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014627 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014628 test -n "$tmp" && test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014629} ||
14630{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014631 tmp=./conf$$-$RANDOM
14632 (umask 077 && mkdir "$tmp")
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014633} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014634
Matthias Kloseb9621712010-04-24 17:59:49 +000014635# Set up the scripts for CONFIG_FILES section.
14636# No need to generate them if there are no CONFIG_FILES.
14637# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014638if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014639
Matthias Kloseb9621712010-04-24 17:59:49 +000014640
14641ac_cr=`echo X | tr X '\015'`
14642# On cygwin, bash can eat \r inside `` if the user requested igncr.
14643# But we know of no other shell where ac_cr would be empty at this
14644# point, so we can use a bashism as a fallback.
14645if test "x$ac_cr" = x; then
14646 eval ac_cr=\$\'\\r\'
14647fi
14648ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14649if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014650 ac_cs_awk_cr='\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014651else
14652 ac_cs_awk_cr=$ac_cr
14653fi
14654
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014655echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014656_ACEOF
14657
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014658
Matthias Kloseb9621712010-04-24 17:59:49 +000014659{
14660 echo "cat >conf$$subs.awk <<_ACEOF" &&
14661 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14662 echo "_ACEOF"
14663} >conf$$subs.sh ||
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014664 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14665ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014666ac_delim='%!_!# '
14667for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014668 . ./conf$$subs.sh ||
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014669 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014670
Matthias Kloseb9621712010-04-24 17:59:49 +000014671 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14672 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014673 break
14674 elif $ac_last_try; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014675 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014676 else
14677 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014678 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014679done
Matthias Kloseb9621712010-04-24 17:59:49 +000014680rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014681
Matthias Kloseb9621712010-04-24 17:59:49 +000014682cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014683cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014685sed -n '
14686h
14687s/^/S["/; s/!.*/"]=/
14688p
14689g
14690s/^[^!]*!//
14691:repl
14692t repl
14693s/'"$ac_delim"'$//
14694t delim
14695:nl
14696h
14697s/\(.\{148\}\)..*/\1/
14698t more1
14699s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14700p
14701n
14702b repl
14703:more1
14704s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14705p
14706g
14707s/.\{148\}//
14708t nl
14709:delim
14710h
14711s/\(.\{148\}\)..*/\1/
14712t more2
14713s/["\\]/\\&/g; s/^/"/; s/$/"/
14714p
14715b
14716:more2
14717s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14718p
14719g
14720s/.\{148\}//
14721t delim
14722' <conf$$subs.awk | sed '
14723/^[^""]/{
14724 N
14725 s/\n//
14726}
14727' >>$CONFIG_STATUS || ac_write_fail=1
14728rm -f conf$$subs.awk
14729cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14730_ACAWK
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014731cat >>"\$tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014732 for (key in S) S_is_set[key] = 1
14733 FS = ""
14734
14735}
14736{
14737 line = $ 0
14738 nfields = split(line, field, "@")
14739 substed = 0
14740 len = length(field[1])
14741 for (i = 2; i < nfields; i++) {
14742 key = field[i]
14743 keylen = length(key)
14744 if (S_is_set[key]) {
14745 value = S[key]
14746 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14747 len += length(value) + length(field[++i])
14748 substed = 1
14749 } else
14750 len += 1 + keylen
14751 }
14752
14753 print line
14754}
14755
14756_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014758cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14759if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14760 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14761else
14762 cat
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014763fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014764 || as_fn_error "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014765_ACEOF
14766
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014767# VPATH may cause trouble with some makes, so we remove $(srcdir),
14768# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014769# trailing colons and then remove the whole line if VPATH becomes empty
14770# (actually we leave an empty line to preserve line numbers).
14771if test "x$srcdir" = x.; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014772 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14773s/:*\$(srcdir):*/:/
14774s/:*\${srcdir}:*/:/
14775s/:*@srcdir@:*/:/
14776s/^\([^=]*=[ ]*\):*/\1/
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014777s/:*$//
14778s/^[^=]*=[ ]*$//
14779}'
14780fi
14781
Matthias Kloseb9621712010-04-24 17:59:49 +000014782cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014783fi # test -n "$CONFIG_FILES"
14784
Matthias Kloseb9621712010-04-24 17:59:49 +000014785# Set up the scripts for CONFIG_HEADERS section.
14786# No need to generate them if there are no CONFIG_HEADERS.
14787# This happens for instance with `./config.status Makefile'.
14788if test -n "$CONFIG_HEADERS"; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014789cat >"$tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014790BEGIN {
14791_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014792
Matthias Kloseb9621712010-04-24 17:59:49 +000014793# Transform confdefs.h into an awk script `defines.awk', embedded as
14794# here-document in config.status, that substitutes the proper values into
14795# config.h.in to produce config.h.
14796
14797# Create a delimiter string that does not exist in confdefs.h, to ease
14798# handling of long lines.
14799ac_delim='%!_!# '
14800for ac_last_try in false false :; do
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014801 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14802 if test -z "$ac_t"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014803 break
14804 elif $ac_last_try; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014805 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014806 else
14807 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14808 fi
14809done
14810
14811# For the awk script, D is an array of macro values keyed by name,
14812# likewise P contains macro parameters if any. Preserve backslash
14813# newline sequences.
14814
14815ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14816sed -n '
14817s/.\{148\}/&'"$ac_delim"'/g
14818t rset
14819:rset
14820s/^[ ]*#[ ]*define[ ][ ]*/ /
14821t def
14822d
14823:def
14824s/\\$//
14825t bsnl
14826s/["\\]/\\&/g
14827s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14828D["\1"]=" \3"/p
14829s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14830d
14831:bsnl
14832s/["\\]/\\&/g
14833s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14834D["\1"]=" \3\\\\\\n"\\/p
14835t cont
14836s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14837t cont
14838d
14839:cont
14840n
14841s/.\{148\}/&'"$ac_delim"'/g
14842t clear
14843:clear
14844s/\\$//
14845t bsnlc
14846s/["\\]/\\&/g; s/^/"/; s/$/"/p
14847d
14848:bsnlc
14849s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14850b cont
14851' <confdefs.h | sed '
14852s/'"$ac_delim"'/"\\\
14853"/g' >>$CONFIG_STATUS || ac_write_fail=1
14854
14855cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14856 for (key in D) D_is_set[key] = 1
14857 FS = ""
14858}
14859/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14860 line = \$ 0
14861 split(line, arg, " ")
14862 if (arg[1] == "#") {
14863 defundef = arg[2]
14864 mac1 = arg[3]
14865 } else {
14866 defundef = substr(arg[1], 2)
14867 mac1 = arg[2]
14868 }
14869 split(mac1, mac2, "(") #)
14870 macro = mac2[1]
14871 prefix = substr(line, 1, index(line, defundef) - 1)
14872 if (D_is_set[macro]) {
14873 # Preserve the white space surrounding the "#".
14874 print prefix "define", macro P[macro] D[macro]
14875 next
14876 } else {
14877 # Replace #undef with comments. This is necessary, for example,
14878 # in the case of _POSIX_SOURCE, which is predefined and required
14879 # on some systems where configure will not decide to define it.
14880 if (defundef == "undef") {
14881 print "/*", prefix defundef, macro, "*/"
14882 next
14883 }
14884 }
14885}
14886{ print }
14887_ACAWK
14888_ACEOF
14889cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014890 as_fn_error "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014891fi # test -n "$CONFIG_HEADERS"
14892
14893
14894eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14895shift
14896for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014897do
14898 case $ac_tag in
14899 :[FHLC]) ac_mode=$ac_tag; continue;;
14900 esac
14901 case $ac_mode$ac_tag in
14902 :[FHL]*:*);;
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014903 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014904 :[FH]-) ac_tag=-:-;;
14905 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14906 esac
14907 ac_save_IFS=$IFS
14908 IFS=:
14909 set x $ac_tag
14910 IFS=$ac_save_IFS
14911 shift
14912 ac_file=$1
14913 shift
14914
14915 case $ac_mode in
14916 :L) ac_source=$1;;
14917 :[FH])
14918 ac_file_inputs=
14919 for ac_f
14920 do
14921 case $ac_f in
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014922 -) ac_f="$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014923 *) # Look for the file first in the build tree, then in the source tree
14924 # (if the path is not absolute). The absolute path cannot be DOS-style,
14925 # because $ac_f cannot contain `:'.
14926 test -f "$ac_f" ||
14927 case $ac_f in
14928 [\\/$]*) false;;
14929 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14930 esac ||
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014931 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014932 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014933 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14934 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014935 done
14936
14937 # Let's still pretend it is `configure' which instantiates (i.e., don't
14938 # use $as_me), people would be surprised to read:
14939 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014940 configure_input='Generated from '`
14941 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14942 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014943 if test x"$ac_file" != x-; then
14944 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014945 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14946$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014947 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014948 # Neutralize special characters interpreted by sed in replacement strings.
14949 case $configure_input in #(
14950 *\&* | *\|* | *\\* )
14951 ac_sed_conf_input=`$as_echo "$configure_input" |
14952 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14953 *) ac_sed_conf_input=$configure_input;;
14954 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014955
14956 case $ac_tag in
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014957 *:-:* | *:-) cat >"$tmp/stdin" \
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014958 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014959 esac
14960 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014961 esac
14962
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014963 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014964$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014965 X"$ac_file" : 'X\(//\)[^/]' \| \
14966 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014967 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014968$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014969 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14970 s//\1/
14971 q
14972 }
14973 /^X\(\/\/\)[^/].*/{
14974 s//\1/
14975 q
14976 }
14977 /^X\(\/\/\)$/{
14978 s//\1/
14979 q
14980 }
14981 /^X\(\/\).*/{
14982 s//\1/
14983 q
14984 }
14985 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014986 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014987 ac_builddir=.
14988
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014989case "$ac_dir" in
14990.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14991*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014992 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014993 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014994 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014995 case $ac_top_builddir_sub in
14996 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14997 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14998 esac ;;
14999esac
15000ac_abs_top_builddir=$ac_pwd
15001ac_abs_builddir=$ac_pwd$ac_dir_suffix
15002# for backward compatibility:
15003ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015004
15005case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015006 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015007 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015008 ac_top_srcdir=$ac_top_builddir_sub
15009 ac_abs_top_srcdir=$ac_pwd ;;
15010 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015011 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015012 ac_top_srcdir=$srcdir
15013 ac_abs_top_srcdir=$srcdir ;;
15014 *) # Relative name.
15015 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15016 ac_top_srcdir=$ac_top_build_prefix$srcdir
15017 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015018esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015019ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015020
Martin v. Löwis11437992002-04-12 09:54:03 +000015021
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015022 case $ac_mode in
15023 :F)
15024 #
15025 # CONFIG_FILE
15026 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015027
15028 case $INSTALL in
15029 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015030 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015031 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015032_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015033
Matthias Kloseb9621712010-04-24 17:59:49 +000015034cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015035# If the template does not know about datarootdir, expand it.
15036# FIXME: This hack should be removed a few years after 2.60.
15037ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015038ac_sed_dataroot='
15039/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015040 p
15041 q
15042}
15043/@datadir@/p
15044/@docdir@/p
15045/@infodir@/p
15046/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015047/@mandir@/p'
15048case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015049*datarootdir*) ac_datarootdir_seen=yes;;
15050*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015051 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15052$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015054cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015055 ac_datarootdir_hack='
15056 s&@datadir@&$datadir&g
15057 s&@docdir@&$docdir&g
15058 s&@infodir@&$infodir&g
15059 s&@localedir@&$localedir&g
15060 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015061 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015062esac
15063_ACEOF
15064
15065# Neutralize VPATH when `$srcdir' = `.'.
15066# Shell code in configure.ac might set extrasub.
15067# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015068cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15069ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015070$extrasub
15071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015072cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015073:t
15074/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015075s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015076s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015077s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015078s&@srcdir@&$ac_srcdir&;t t
15079s&@abs_srcdir@&$ac_abs_srcdir&;t t
15080s&@top_srcdir@&$ac_top_srcdir&;t t
15081s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15082s&@builddir@&$ac_builddir&;t t
15083s&@abs_builddir@&$ac_abs_builddir&;t t
15084s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15085s&@INSTALL@&$ac_INSTALL&;t t
15086$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015087"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015088eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
Benjamin Peterson87cdb812011-05-31 18:26:08 -050015089 || as_fn_error "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015090
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015091test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015092 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15093 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015094 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Benjamin Peterson87cdb812011-05-31 18:26:08 -050015095which seems to be undefined. Please make sure it is defined." >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015096$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Benjamin Peterson87cdb812011-05-31 18:26:08 -050015097which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015098
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015099 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015100 case $ac_file in
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015101 -) cat "$tmp/out" && rm -f "$tmp/out";;
15102 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015103 esac \
Benjamin Peterson87cdb812011-05-31 18:26:08 -050015104 || as_fn_error "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015105 ;;
15106 :H)
15107 #
15108 # CONFIG_HEADER
15109 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015110 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015111 {
15112 $as_echo "/* $configure_input */" \
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015113 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15114 } >"$tmp/config.h" \
Benjamin Peterson87cdb812011-05-31 18:26:08 -050015115 || as_fn_error "could not create $ac_file" "$LINENO" 5
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015116 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015117 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15118$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015119 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015120 rm -f "$ac_file"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015121 mv "$tmp/config.h" "$ac_file" \
Benjamin Peterson87cdb812011-05-31 18:26:08 -050015122 || as_fn_error "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015123 fi
15124 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015125 $as_echo "/* $configure_input */" \
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015126 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
Benjamin Peterson87cdb812011-05-31 18:26:08 -050015127 || as_fn_error "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015128 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015129 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015130
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015131
15132 esac
15133
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015134
15135 case $ac_file$ac_mode in
15136 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15137
15138 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015139done # for ac_tag
15140
Guido van Rossum627b2d71993-12-24 10:39:16 +000015141
Matthias Kloseb9621712010-04-24 17:59:49 +000015142as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015143_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015144ac_clean_files=$ac_clean_files_save
15145
Matthias Kloseb9621712010-04-24 17:59:49 +000015146test $ac_write_fail = 0 ||
Benjamin Peterson87cdb812011-05-31 18:26:08 -050015147 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015148
Martin v. Löwis11437992002-04-12 09:54:03 +000015149
15150# configure is writing to config.log, and then calls config.status.
15151# config.status does its own redirection, appending to config.log.
15152# Unfortunately, on DOS this fails, as config.log is still kept open
15153# by configure, so config.status won't be able to write to it; its
15154# output is simply discarded. So we exec the FD to /dev/null,
15155# effectively closing config.log, so it can be properly (re)opened and
15156# appended to by config.status. When coming back to configure, we
15157# need to make the FD available again.
15158if test "$no_create" != yes; then
15159 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015160 ac_config_status_args=
15161 test "$silent" = yes &&
15162 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015163 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015164 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015165 exec 5>>config.log
15166 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15167 # would make configure fail if this is the last instruction.
Benjamin Peterson87cdb812011-05-31 18:26:08 -050015168 $ac_cs_success || as_fn_exit $?
Matthias Kloseb9621712010-04-24 17:59:49 +000015169fi
15170if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15171 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15172$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015173fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015174
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015175
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015176echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015177if test ! -f Modules/Setup
15178then
15179 cp $srcdir/Modules/Setup.dist Modules/Setup
15180fi
15181
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015182echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015183if test ! -f Modules/Setup.local
15184then
15185 echo "# Edit this file for local setup changes" >Modules/Setup.local
15186fi
15187
15188echo "creating Makefile"
15189$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15190 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015191 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015192mv config.c Modules