blob: 69edd5ac96dcedc849f059bde100c37423d73b8b [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Antoine Pitrou37009202011-07-08 23:47:50 +02003# Generated by GNU Autoconf 2.68 for python 3.3.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Georg Brandle2e15612009-05-20 18:25:10 +00005# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10# Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +000011#
12#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000015## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000021if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000022 emulate sh
23 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000024 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000025 # is contrary to our usage. Disable this feature.
26 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000028else
Matthias Kloseb9621712010-04-24 17:59:49 +000029 case `(set -o) 2>/dev/null` in #(
30 *posix*) :
31 set -o posix ;; #(
32 *) :
33 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000034esac
Martin v. Löwis11437992002-04-12 09:54:03 +000035fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000036
37
Matthias Kloseb9621712010-04-24 17:59:49 +000038as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49 as_echo='print -r --'
50 as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52 as_echo='printf %s\n'
53 as_echo_n='printf %s'
54else
55 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57 as_echo_n='/usr/ucb/echo -n'
58 else
59 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60 as_echo_n_body='eval
61 arg=$1;
62 case $arg in #(
63 *"$as_nl"*)
64 expr "X$arg" : "X\\(.*\\)$as_nl";
65 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66 esac;
67 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68 '
69 export as_echo_n_body
70 as_echo_n='sh -c $as_echo_n_body as_echo'
71 fi
72 export as_echo_body
73 as_echo='sh -c $as_echo_body as_echo'
74fi
Martin v. Löwis11437992002-04-12 09:54:03 +000075
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000078 PATH_SEPARATOR=:
79 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81 PATH_SEPARATOR=';'
82 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083fi
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000085
86# IFS
87# We need space, tab and new line, in precisely that order. Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000091IFS=" "" $as_nl"
92
93# Find who we are. Look in the path if we contain no directory separator.
Antoine Pitrou37009202011-07-08 23:47:50 +020094as_myself=
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.
Antoine Pitrou37009202011-07-08 23:47:50 +0200220 # Preserve -v and -x to the replacement shell.
Matthias Kloseb9621712010-04-24 17:59:49 +0000221 BASH_ENV=/dev/null
222 ENV=/dev/null
223 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
224 export CONFIG_SHELL
Antoine Pitrou37009202011-07-08 23:47:50 +0200225 case $- in # ((((
226 *v*x* | *x*v* ) as_opts=-vx ;;
227 *v* ) as_opts=-v ;;
228 *x* ) as_opts=-x ;;
229 * ) as_opts= ;;
230 esac
231 exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
Matthias Kloseb9621712010-04-24 17:59:49 +0000232fi
233
234 if test x$as_have_required = xno; then :
235 $as_echo "$0: This script requires a shell more modern than all"
236 $as_echo "$0: the shells that I found on your system."
237 if test x${ZSH_VERSION+set} = xset ; then
238 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
239 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
240 else
241 $as_echo "$0: Please tell bug-autoconf@gnu.org and
242$0: http://bugs.python.org/ about your system, including
243$0: any error possibly output before this message. Then
244$0: install a modern shell, or manually run the script
245$0: under such a shell if you do have one."
246 fi
247 exit 1
248fi
249fi
250fi
251SHELL=${CONFIG_SHELL-/bin/sh}
252export SHELL
253# Unset more variables known to interfere with behavior of common tools.
254CLICOLOR_FORCE= GREP_OPTIONS=
255unset CLICOLOR_FORCE GREP_OPTIONS
256
257## --------------------- ##
258## M4sh Shell Functions. ##
259## --------------------- ##
260# as_fn_unset VAR
261# ---------------
262# Portably unset VAR.
263as_fn_unset ()
264{
265 { eval $1=; unset $1;}
266}
267as_unset=as_fn_unset
268
269# as_fn_set_status STATUS
270# -----------------------
271# Set $? to STATUS, without forking.
272as_fn_set_status ()
273{
274 return $1
275} # as_fn_set_status
276
277# as_fn_exit STATUS
278# -----------------
279# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
280as_fn_exit ()
281{
282 set +e
283 as_fn_set_status $1
284 exit $1
285} # as_fn_exit
286
287# as_fn_mkdir_p
288# -------------
289# Create "$as_dir" as a directory, including parents if necessary.
290as_fn_mkdir_p ()
291{
292
293 case $as_dir in #(
294 -*) as_dir=./$as_dir;;
295 esac
296 test -d "$as_dir" || eval $as_mkdir_p || {
297 as_dirs=
298 while :; do
299 case $as_dir in #(
300 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
301 *) as_qdir=$as_dir;;
302 esac
303 as_dirs="'$as_qdir' $as_dirs"
304 as_dir=`$as_dirname -- "$as_dir" ||
305$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
306 X"$as_dir" : 'X\(//\)[^/]' \| \
307 X"$as_dir" : 'X\(//\)$' \| \
308 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
309$as_echo X"$as_dir" |
310 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
311 s//\1/
312 q
313 }
314 /^X\(\/\/\)[^/].*/{
315 s//\1/
316 q
317 }
318 /^X\(\/\/\)$/{
319 s//\1/
320 q
321 }
322 /^X\(\/\).*/{
323 s//\1/
324 q
325 }
326 s/.*/./; q'`
327 test -d "$as_dir" && break
328 done
329 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200330 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000331
332
333} # as_fn_mkdir_p
334# as_fn_append VAR VALUE
335# ----------------------
336# Append the text in VALUE to the end of the definition contained in VAR. Take
337# advantage of any shell optimizations that allow amortized linear growth over
338# repeated appends, instead of the typical quadratic growth present in naive
339# implementations.
340if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
341 eval 'as_fn_append ()
342 {
343 eval $1+=\$2
344 }'
345else
346 as_fn_append ()
347 {
348 eval $1=\$$1\$2
349 }
350fi # as_fn_append
351
352# as_fn_arith ARG...
353# ------------------
354# Perform arithmetic evaluation on the ARGs, and store the result in the
355# global $as_val. Take advantage of shells that can avoid forks. The arguments
356# must be portable across $(()) and expr.
357if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
358 eval 'as_fn_arith ()
359 {
360 as_val=$(( $* ))
361 }'
362else
363 as_fn_arith ()
364 {
365 as_val=`expr "$@" || test $? -eq 1`
366 }
367fi # as_fn_arith
368
369
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200370# as_fn_error STATUS ERROR [LINENO LOG_FD]
371# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000372# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
373# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200374# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000375as_fn_error ()
376{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200377 as_status=$1; test $as_status -eq 0 && as_status=1
378 if test "$4"; then
379 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
380 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000381 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200382 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000383 as_fn_exit $as_status
384} # as_fn_error
385
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000386if expr a : '\(a\)' >/dev/null 2>&1 &&
387 test "X`expr 00001 : '.*\(...\)'`" = X001; then
388 as_expr=expr
389else
390 as_expr=false
391fi
392
393if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
394 as_basename=basename
395else
396 as_basename=false
397fi
398
Matthias Kloseb9621712010-04-24 17:59:49 +0000399if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
400 as_dirname=dirname
401else
402 as_dirname=false
403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000404
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000405as_me=`$as_basename -- "$0" ||
406$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
407 X"$0" : 'X\(//\)$' \| \
408 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000409$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000410 sed '/^.*\/\([^/][^/]*\)\/*$/{
411 s//\1/
412 q
413 }
414 /^X\/\(\/\/\)$/{
415 s//\1/
416 q
417 }
418 /^X\/\(\/\).*/{
419 s//\1/
420 q
421 }
422 s/.*/./; q'`
423
Matthias Kloseb9621712010-04-24 17:59:49 +0000424# Avoid depending upon Character Ranges.
425as_cr_letters='abcdefghijklmnopqrstuvwxyz'
426as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
427as_cr_Letters=$as_cr_letters$as_cr_LETTERS
428as_cr_digits='0123456789'
429as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000430
431
Matthias Kloseb9621712010-04-24 17:59:49 +0000432 as_lineno_1=$LINENO as_lineno_1a=$LINENO
433 as_lineno_2=$LINENO as_lineno_2a=$LINENO
434 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
435 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
436 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000437 sed -n '
438 p
439 /[$]LINENO/=
440 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000441 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000442 s/[$]LINENO.*/&-/
443 t lineno
444 b
445 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000446 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000447 :loop
448 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000449 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000450 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000451 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000452 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000453 { $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 +0000454
455 # Don't try to exec as it changes $[0], causing all sort of problems
456 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000457 # original and so on. Autoconf is especially sensitive to this).
458 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000459 # Exit status is that of the last command.
460 exit
461}
462
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000463ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000464case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000465-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000466 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000467 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 xy) ECHO_C='\c';;
469 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
470 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000471 esac;;
472*)
473 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000474esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000475
Martin v. Löwis11437992002-04-12 09:54:03 +0000476rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000477if test -d conf$$.dir; then
478 rm -f conf$$.dir/conf$$.file
479else
480 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000481 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000482fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000483if (echo >conf$$.file) 2>/dev/null; then
484 if ln -s conf$$.file conf$$ 2>/dev/null; then
485 as_ln_s='ln -s'
486 # ... but there are two gotchas:
487 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
488 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
489 # In both cases, we have to default to `cp -p'.
490 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
491 as_ln_s='cp -p'
492 elif ln conf$$.file conf$$ 2>/dev/null; then
493 as_ln_s=ln
494 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000496 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000497else
498 as_ln_s='cp -p'
499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000500rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
501rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000502
Skip Montanaro6dead952003-09-25 14:50:04 +0000503if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000504 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000505else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000506 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000507 as_mkdir_p=false
508fi
509
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000510if test -x / >/dev/null 2>&1; then
511 as_test_x='test -x'
512else
513 if ls -dL / >/dev/null 2>&1; then
514 as_ls_L_option=L
515 else
516 as_ls_L_option=
517 fi
518 as_test_x='
519 eval sh -c '\''
520 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522 else
Matthias Kloseb9621712010-04-24 17:59:49 +0000523 case $1 in #(
524 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000525 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +0000526 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000527 ???[sx]*):;;*)false;;esac;fi
528 '\'' sh
529 '
530fi
531as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000532
533# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000534as_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 +0000535
536# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000537as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000538
539
Matthias Kloseb9621712010-04-24 17:59:49 +0000540test -n "$DJDIR" || exec 7<&0 </dev/null
541exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
543# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200544# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000545# so uname gets run too.
546ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
547
Martin v. Löwis11437992002-04-12 09:54:03 +0000548#
549# Initializations.
550#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000551ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000552ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000553ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000554LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000555cross_compiling=no
556subdirs=
557MFLAGS=
558MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000559
Martin v. Löwis11437992002-04-12 09:54:03 +0000560# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000561PACKAGE_NAME='python'
562PACKAGE_TARNAME='python'
Georg Brandl3ebb6b32011-02-20 10:37:07 +0000563PACKAGE_VERSION='3.3'
564PACKAGE_STRING='python 3.3'
Georg Brandle2e15612009-05-20 18:25:10 +0000565PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000566PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000567
568ac_unique_file="Include/object.h"
569# Factoring default headers for most tests.
570ac_includes_default="\
571#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000573# include <sys/types.h>
574#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000575#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000576# include <sys/stat.h>
577#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000578#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000579# include <stdlib.h>
580# include <stddef.h>
581#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000582# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000583# include <stdlib.h>
584# endif
585#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000586#ifdef HAVE_STRING_H
587# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000588# include <memory.h>
589# endif
590# include <string.h>
591#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <strings.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef HAVE_STDINT_H
599# include <stdint.h>
600#endif
601#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <unistd.h>
603#endif"
604
Matthias Kloseb9621712010-04-24 17:59:49 +0000605ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000606SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000607THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000608SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000609LIBC
610LIBM
611HAVE_GETHOSTBYNAME
612HAVE_GETHOSTBYNAME_R
613HAVE_GETHOSTBYNAME_R_3_ARG
614HAVE_GETHOSTBYNAME_R_5_ARG
615HAVE_GETHOSTBYNAME_R_6_ARG
616LIBOBJS
617TRUE
618MACHDEP_OBJS
619DYNLOADFILE
620DLINCLDIR
621THREADOBJ
622LDLAST
623USE_THREAD_MODULE
624SIGNAL_OBJS
625USE_SIGNAL_MODULE
626LIBFFI_INCLUDEDIR
627PKG_CONFIG
628SHLIBS
629CFLAGSFORSHARED
630LINKFORSHARED
631CCSHARED
632BLDSHARED
633LDCXXSHARED
634LDSHARED
635SO
636LIBTOOL_CRUFT
637OTHER_LIBTOOL_OPT
638UNIVERSAL_ARCH_FLAGS
639BASECFLAGS
640OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000641ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000642LN
643INSTALL_DATA
644INSTALL_SCRIPT
645INSTALL_PROGRAM
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500646HAS_PYTHON
647DISABLE_ASDLGEN
Matthias Kloseb9621712010-04-24 17:59:49 +0000648ARFLAGS
649AR
650RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000651USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000652GNULD
653LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000654LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000655RUNSHARED
656INSTSONAME
657LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000658PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000659BLDLIBRARY
660DLLLIBRARY
661LDLIBRARY
662LIBRARY
663BUILDEXEEXT
664EGREP
665GREP
666CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200667NO_AS_NEEDED
Matthias Kloseb9621712010-04-24 17:59:49 +0000668MAINCC
669CXX
670OBJEXT
671EXEEXT
672ac_ct_CC
673CPPFLAGS
674LDFLAGS
675CFLAGS
676CC
677EXPORT_MACOSX_DEPLOYMENT_TARGET
678CONFIGURE_MACOSX_DEPLOYMENT_TARGET
679SGI_ABI
680MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000681FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000682FRAMEWORKUNIXTOOLSPREFIX
683FRAMEWORKALTINSTALLLAST
684FRAMEWORKALTINSTALLFIRST
685FRAMEWORKINSTALLLAST
686FRAMEWORKINSTALLFIRST
687PYTHONFRAMEWORKINSTALLDIR
688PYTHONFRAMEWORKPREFIX
689PYTHONFRAMEWORKDIR
690PYTHONFRAMEWORKIDENTIFIER
691PYTHONFRAMEWORK
692LIPO_32BIT_FLAGS
693ARCH_RUN_32BIT
694UNIVERSALSDK
695CONFIG_ARGS
696SOVERSION
697VERSION
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500698HAS_HG
699HGBRANCH
700HGTAG
701HGVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000702target_alias
703host_alias
704build_alias
705LIBS
706ECHO_T
707ECHO_N
708ECHO_C
709DEFS
710mandir
711localedir
712libdir
713psdir
714pdfdir
715dvidir
716htmldir
717infodir
718docdir
719oldincludedir
720includedir
721localstatedir
722sharedstatedir
723sysconfdir
724datadir
725datarootdir
726libexecdir
727sbindir
728bindir
729program_transform_name
730prefix
731exec_prefix
732PACKAGE_URL
733PACKAGE_BUGREPORT
734PACKAGE_STRING
735PACKAGE_VERSION
736PACKAGE_TARNAME
737PACKAGE_NAME
738PATH_SEPARATOR
739SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000740ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000741ac_user_opts='
742enable_option_checking
743enable_universalsdk
744with_universal_archs
745with_framework_name
746enable_framework
747with_gcc
748with_cxx_main
749with_suffix
750enable_shared
751enable_profiling
752with_pydebug
753with_libs
754with_system_expat
755with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000756enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000757with_dbmliborder
758with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000759with_threads
760with_thread
761enable_ipv6
762with_doc_strings
763with_tsc
764with_pymalloc
765with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000766with_fpectl
767with_libm
768with_libc
769enable_big_digits
770with_wide_unicode
771with_computed_gotos
772'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000773 ac_precious_vars='build_alias
774host_alias
775target_alias
776CC
777CFLAGS
778LDFLAGS
779LIBS
780CPPFLAGS
Ross Lagerwall7807c352011-03-17 20:20:30 +0200781CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000782
Guido van Rossum627b2d71993-12-24 10:39:16 +0000783
Guido van Rossum7f43da71994-08-01 12:15:30 +0000784# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000785ac_init_help=
786ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000787ac_unrecognized_opts=
788ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000789# The variables have the same names as the options, with
790# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000791cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000792exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000793no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000794no_recursion=
795prefix=NONE
796program_prefix=NONE
797program_suffix=NONE
798program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000800site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000803x_includes=NONE
804x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000805
806# Installation directory options.
807# These are left unexpanded so users can "make install exec_prefix=/foo"
808# and all the variables that are supposed to be based on exec_prefix
809# by default will actually change.
810# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000811# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000812bindir='${exec_prefix}/bin'
813sbindir='${exec_prefix}/sbin'
814libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000815datarootdir='${prefix}/share'
816datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000817sysconfdir='${prefix}/etc'
818sharedstatedir='${prefix}/com'
819localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820includedir='${prefix}/include'
821oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000822docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
823infodir='${datarootdir}/info'
824htmldir='${docdir}'
825dvidir='${docdir}'
826pdfdir='${docdir}'
827psdir='${docdir}'
828libdir='${exec_prefix}/lib'
829localedir='${datarootdir}/locale'
830mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000831
Guido van Rossum7f43da71994-08-01 12:15:30 +0000832ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000833ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000834for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000835do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000836 # If the previous option needs an argument, assign it.
837 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000838 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839 ac_prev=
840 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000841 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000842
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000843 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200844 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
845 *=) ac_optarg= ;;
846 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849 # Accept the important Cygnus configure options, so we can diagnose typos.
850
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851 case $ac_dashdash$ac_option in
852 --)
853 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000854
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000855 -bindir | --bindir | --bindi | --bind | --bin | --bi)
856 ac_prev=bindir ;;
857 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000858 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000859
860 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000861 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000862 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000863 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865 -cache-file | --cache-file | --cache-fil | --cache-fi \
866 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
867 ac_prev=cache_file ;;
868 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
869 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000870 cache_file=$ac_optarg ;;
871
872 --config-cache | -C)
873 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000875 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000876 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000877 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000878 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000879
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000880 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
881 | --dataroo | --dataro | --datar)
882 ac_prev=datarootdir ;;
883 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
884 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
885 datarootdir=$ac_optarg ;;
886
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000888 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000889 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000890 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200891 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000892 ac_useropt_orig=$ac_useropt
893 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
894 case $ac_user_opts in
895 *"
896"enable_$ac_useropt"
897"*) ;;
898 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
899 ac_unrecognized_sep=', ';;
900 esac
901 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902
903 -docdir | --docdir | --docdi | --doc | --do)
904 ac_prev=docdir ;;
905 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
906 docdir=$ac_optarg ;;
907
908 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
909 ac_prev=dvidir ;;
910 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
911 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912
913 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000914 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000915 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000916 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200917 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000918 ac_useropt_orig=$ac_useropt
919 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
920 case $ac_user_opts in
921 *"
922"enable_$ac_useropt"
923"*) ;;
924 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
925 ac_unrecognized_sep=', ';;
926 esac
927 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
930 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
931 | --exec | --exe | --ex)
932 ac_prev=exec_prefix ;;
933 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
934 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
935 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937
938 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000939 # Obsolete; use --with-gas.
940 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000941
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 -help | --help | --hel | --he | -h)
943 ac_init_help=long ;;
944 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
945 ac_init_help=recursive ;;
946 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
947 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000948
949 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000951 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
955 ac_prev=htmldir ;;
956 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
957 | --ht=*)
958 htmldir=$ac_optarg ;;
959
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000960 -includedir | --includedir | --includedi | --included | --include \
961 | --includ | --inclu | --incl | --inc)
962 ac_prev=includedir ;;
963 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
964 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000965 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000966
967 -infodir | --infodir | --infodi | --infod | --info | --inf)
968 ac_prev=infodir ;;
969 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000970 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000971
972 -libdir | --libdir | --libdi | --libd)
973 ac_prev=libdir ;;
974 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000975 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000976
977 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
978 | --libexe | --libex | --libe)
979 ac_prev=libexecdir ;;
980 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
981 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000982 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000983
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000984 -localedir | --localedir | --localedi | --localed | --locale)
985 ac_prev=localedir ;;
986 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
987 localedir=$ac_optarg ;;
988
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000989 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000990 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000991 ac_prev=localstatedir ;;
992 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000993 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000994 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000995
996 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
997 ac_prev=mandir ;;
998 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000999 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001000
Guido van Rossum7f43da71994-08-01 12:15:30 +00001001 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001002 # Obsolete; use --without-fp.
1003 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004
1005 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007 no_create=yes ;;
1008
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001009 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1010 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1011 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001013 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1014 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1015 | --oldin | --oldi | --old | --ol | --o)
1016 ac_prev=oldincludedir ;;
1017 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1018 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1019 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1023 ac_prev=prefix ;;
1024 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026
1027 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1028 | --program-pre | --program-pr | --program-p)
1029 ac_prev=program_prefix ;;
1030 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1031 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033
1034 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1035 | --program-suf | --program-su | --program-s)
1036 ac_prev=program_suffix ;;
1037 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1038 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040
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)
1048 ac_prev=program_transform_name ;;
1049 -program-transform-name=* | --program-transform-name=* \
1050 | --program-transform-nam=* | --program-transform-na=* \
1051 | --program-transform-n=* | --program-transform-=* \
1052 | --program-transform=* | --program-transfor=* \
1053 | --program-transfo=* | --program-transf=* \
1054 | --program-trans=* | --program-tran=* \
1055 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001058 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1059 ac_prev=pdfdir ;;
1060 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1061 pdfdir=$ac_optarg ;;
1062
1063 -psdir | --psdir | --psdi | --psd | --ps)
1064 ac_prev=psdir ;;
1065 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1066 psdir=$ac_optarg ;;
1067
Guido van Rossum7f43da71994-08-01 12:15:30 +00001068 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1069 | -silent | --silent | --silen | --sile | --sil)
1070 silent=yes ;;
1071
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1073 ac_prev=sbindir ;;
1074 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1075 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001077
1078 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1079 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1080 | --sharedst | --shareds | --shared | --share | --shar \
1081 | --sha | --sh)
1082 ac_prev=sharedstatedir ;;
1083 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1084 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1085 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1086 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001088
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001089 -site | --site | --sit)
1090 ac_prev=site ;;
1091 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001093
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1095 ac_prev=srcdir ;;
1096 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001099 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1100 | --syscon | --sysco | --sysc | --sys | --sy)
1101 ac_prev=sysconfdir ;;
1102 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1103 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001105
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110
1111 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1112 verbose=yes ;;
1113
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 -version | --version | --versio | --versi | --vers | -V)
1115 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001116
1117 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001118 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001119 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001120 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001121 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001122 ac_useropt_orig=$ac_useropt
1123 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1124 case $ac_user_opts in
1125 *"
1126"with_$ac_useropt"
1127"*) ;;
1128 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1129 ac_unrecognized_sep=', ';;
1130 esac
1131 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132
1133 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001134 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001135 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001136 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001137 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001138 ac_useropt_orig=$ac_useropt
1139 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1140 case $ac_user_opts in
1141 *"
1142"with_$ac_useropt"
1143"*) ;;
1144 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1145 ac_unrecognized_sep=', ';;
1146 esac
1147 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001149 --x)
1150 # Obsolete; use --with-x.
1151 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001152
1153 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1154 | --x-incl | --x-inc | --x-in | --x-i)
1155 ac_prev=x_includes ;;
1156 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1157 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001158 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001159
1160 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1161 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1162 ac_prev=x_libraries ;;
1163 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1164 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001166
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001167 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1168Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001169 ;;
1170
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 *=*)
1172 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1173 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001174 case $ac_envvar in #(
1175 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001176 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001177 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001178 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 export $ac_envvar ;;
1180
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001181 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001183 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001185 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Antoine Pitrou37009202011-07-08 23:47:50 +02001186 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187 ;;
1188
1189 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001190done
1191
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001194 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195fi
1196
Matthias Kloseb9621712010-04-24 17:59:49 +00001197if test -n "$ac_unrecognized_opts"; then
1198 case $enable_option_checking in
1199 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001200 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001201 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1202 esac
1203fi
1204
1205# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001206for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1207 datadir sysconfdir sharedstatedir localstatedir includedir \
1208 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1209 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001210do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001211 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001212 # Remove trailing slashes.
1213 case $ac_val in
1214 */ )
1215 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1216 eval $ac_var=\$ac_val;;
1217 esac
1218 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001219 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001220 [\\/$]* | ?:[\\/]* ) continue;;
1221 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001222 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001223 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001224done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001225
Martin v. Löwis11437992002-04-12 09:54:03 +00001226# There might be people who depend on the old broken behavior: `$host'
1227# used to hold the argument of --host etc.
1228# FIXME: To remove some day.
1229build=$build_alias
1230host=$host_alias
1231target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001232
Martin v. Löwis11437992002-04-12 09:54:03 +00001233# FIXME: To remove some day.
1234if test "x$host_alias" != x; then
1235 if test "x$build_alias" = x; then
1236 cross_compiling=maybe
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001237 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1238 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 elif test "x$build_alias" != "x$host_alias"; then
1240 cross_compiling=yes
1241 fi
1242fi
1243
1244ac_tool_prefix=
1245test -n "$host_alias" && ac_tool_prefix=$host_alias-
1246
1247test "$silent" = yes && exec 6>/dev/null
1248
Guido van Rossum627b2d71993-12-24 10:39:16 +00001249
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001250ac_pwd=`pwd` && test -n "$ac_pwd" &&
1251ac_ls_di=`ls -di .` &&
1252ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001253 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001254test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001255 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001256
1257
Guido van Rossum627b2d71993-12-24 10:39:16 +00001258# Find the source files, if location was not specified.
1259if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001260 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001261 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 ac_confdir=`$as_dirname -- "$as_myself" ||
1263$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1264 X"$as_myself" : 'X\(//\)[^/]' \| \
1265 X"$as_myself" : 'X\(//\)$' \| \
1266 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1267$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001268 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1269 s//\1/
1270 q
1271 }
1272 /^X\(\/\/\)[^/].*/{
1273 s//\1/
1274 q
1275 }
1276 /^X\(\/\/\)$/{
1277 s//\1/
1278 q
1279 }
1280 /^X\(\/\).*/{
1281 s//\1/
1282 q
1283 }
1284 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001285 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001286 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001287 srcdir=..
1288 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001289else
1290 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001292if test ! -r "$srcdir/$ac_unique_file"; then
1293 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001294 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001296ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1297ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001298 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299 pwd)`
1300# When building in place, set srcdir=.
1301if test "$ac_abs_confdir" = "$ac_pwd"; then
1302 srcdir=.
1303fi
1304# Remove unnecessary trailing slashes from srcdir.
1305# Double slashes in file names in object file debugging info
1306# mess up M-x gdb in Emacs.
1307case $srcdir in
1308*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1309esac
1310for ac_var in $ac_precious_vars; do
1311 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1312 eval ac_env_${ac_var}_value=\$${ac_var}
1313 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1314 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1315done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001316
Martin v. Löwis11437992002-04-12 09:54:03 +00001317#
1318# Report the --help message.
1319#
1320if test "$ac_init_help" = "long"; then
1321 # Omit some internal or obsolete options to make the list less imposing.
1322 # This message is too long to be a string in the A/UX 3.1 sh.
1323 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001324\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001325
1326Usage: $0 [OPTION]... [VAR=VALUE]...
1327
1328To assign environment variables (e.g., CC, CFLAGS...), specify them as
1329VAR=VALUE. See below for descriptions of some of the useful variables.
1330
1331Defaults for the options are specified in brackets.
1332
1333Configuration:
1334 -h, --help display this help and exit
1335 --help=short display options specific to this package
1336 --help=recursive display the short help of all the included packages
1337 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001338 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001339 --cache-file=FILE cache test results in FILE [disabled]
1340 -C, --config-cache alias for \`--cache-file=config.cache'
1341 -n, --no-create do not create output files
1342 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1343
Martin v. Löwis11437992002-04-12 09:54:03 +00001344Installation directories:
1345 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001346 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001347 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001348 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001349
1350By default, \`make install' will install all the files in
1351\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1352an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1353for instance \`--prefix=\$HOME'.
1354
1355For better control, use the options below.
1356
1357Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001358 --bindir=DIR user executables [EPREFIX/bin]
1359 --sbindir=DIR system admin executables [EPREFIX/sbin]
1360 --libexecdir=DIR program executables [EPREFIX/libexec]
1361 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1362 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1363 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1364 --libdir=DIR object code libraries [EPREFIX/lib]
1365 --includedir=DIR C header files [PREFIX/include]
1366 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1367 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1368 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1369 --infodir=DIR info documentation [DATAROOTDIR/info]
1370 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1371 --mandir=DIR man documentation [DATAROOTDIR/man]
1372 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1373 --htmldir=DIR html documentation [DOCDIR]
1374 --dvidir=DIR dvi documentation [DOCDIR]
1375 --pdfdir=DIR pdf documentation [DOCDIR]
1376 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001377_ACEOF
1378
1379 cat <<\_ACEOF
1380_ACEOF
1381fi
1382
1383if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001384 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001385 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001386 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001387 cat <<\_ACEOF
1388
1389Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001390 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001391 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1392 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001393 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001394 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001395 --enable-framework[=INSTALLDIR]
1396 Build (MacOSX|Darwin) framework
1397 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001398 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001399 --enable-loadable-sqlite-extensions
1400 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001401 --enable-ipv6 Enable ipv6 (with ipv4) support
1402 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001403 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001404 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001405
1406Optional Packages:
1407 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1408 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001409 --with-universal-archs=ARCH
1410 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001411 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001412 --with-framework-name=FRAMEWORK
1413 specify an alternate name of the framework built
1414 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001415 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001416 --with-cxx-main=<compiler>
1417 compile main() and link python executable with C++
1418 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001419 --with-suffix=.exe set executable suffix
1420 --with-pydebug build with Py_DEBUG defined
1421 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001422 --with-system-expat build pyexpat module using an installed expat
1423 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001424 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001425 --with-dbmliborder=db1:db2:...
1426 order to check db backends for dbm. Valid value is a
1427 colon separated string with the backend names
1428 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001429 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001430 --with(out)-threads[=DIRECTORY]
1431 disable/enable thread support
1432 --with(out)-thread[=DIRECTORY]
1433 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001434 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001435 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001436 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001437 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001438 --with-fpectl enable SIGFPE catching
1439 --with-libm=STRING math library
1440 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001441 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001442 --with(out)-computed-gotos
1443 Use computed gotos in evaluation loop (enabled by
1444 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001445
1446Some influential environment variables:
1447 CC C compiler command
1448 CFLAGS C compiler flags
1449 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1450 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001451 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001452 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001453 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001454 CPP C preprocessor
1455
1456Use these variables to override the choices made by `configure' or to help
1457it to find libraries and programs with nonstandard names/locations.
1458
Georg Brandle2e15612009-05-20 18:25:10 +00001459Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001460_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001461ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001462fi
1463
1464if test "$ac_init_help" = "recursive"; then
1465 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001466 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001467 test -d "$ac_dir" ||
1468 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1469 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001470 ac_builddir=.
1471
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001472case "$ac_dir" in
1473.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1474*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001475 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001476 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001477 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001478 case $ac_top_builddir_sub in
1479 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1480 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1481 esac ;;
1482esac
1483ac_abs_top_builddir=$ac_pwd
1484ac_abs_builddir=$ac_pwd$ac_dir_suffix
1485# for backward compatibility:
1486ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001487
1488case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001489 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001490 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001491 ac_top_srcdir=$ac_top_builddir_sub
1492 ac_abs_top_srcdir=$ac_pwd ;;
1493 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001494 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001495 ac_top_srcdir=$srcdir
1496 ac_abs_top_srcdir=$srcdir ;;
1497 *) # Relative name.
1498 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1499 ac_top_srcdir=$ac_top_build_prefix$srcdir
1500 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001501esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001502ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001503
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001504 cd "$ac_dir" || { ac_status=$?; continue; }
1505 # Check for guested configure.
1506 if test -f "$ac_srcdir/configure.gnu"; then
1507 echo &&
1508 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1509 elif test -f "$ac_srcdir/configure"; then
1510 echo &&
1511 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001512 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001513 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001514 fi || ac_status=$?
1515 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001516 done
1517fi
1518
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001519test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001520if $ac_init_version; then
1521 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001522python configure 3.3
Antoine Pitrou37009202011-07-08 23:47:50 +02001523generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001524
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001525Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001526This configure script is free software; the Free Software Foundation
1527gives unlimited permission to copy, distribute and modify it.
1528_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001529 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001530fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001531
1532## ------------------------ ##
1533## Autoconf initialization. ##
1534## ------------------------ ##
1535
1536# ac_fn_c_try_compile LINENO
1537# --------------------------
1538# Try to compile conftest.$ac_ext, and return whether this succeeded.
1539ac_fn_c_try_compile ()
1540{
1541 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1542 rm -f conftest.$ac_objext
1543 if { { ac_try="$ac_compile"
1544case "(($ac_try" in
1545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1546 *) ac_try_echo=$ac_try;;
1547esac
1548eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1549$as_echo "$ac_try_echo"; } >&5
1550 (eval "$ac_compile") 2>conftest.err
1551 ac_status=$?
1552 if test -s conftest.err; then
1553 grep -v '^ *+' conftest.err >conftest.er1
1554 cat conftest.er1 >&5
1555 mv -f conftest.er1 conftest.err
1556 fi
1557 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1558 test $ac_status = 0; } && {
1559 test -z "$ac_c_werror_flag" ||
1560 test ! -s conftest.err
1561 } && test -s conftest.$ac_objext; then :
1562 ac_retval=0
1563else
1564 $as_echo "$as_me: failed program was:" >&5
1565sed 's/^/| /' conftest.$ac_ext >&5
1566
1567 ac_retval=1
1568fi
Antoine Pitrou37009202011-07-08 23:47:50 +02001569 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001570 as_fn_set_status $ac_retval
1571
1572} # ac_fn_c_try_compile
1573
Matthias Kloseb9621712010-04-24 17:59:49 +00001574# ac_fn_c_try_link LINENO
1575# -----------------------
1576# Try to link conftest.$ac_ext, and return whether this succeeded.
1577ac_fn_c_try_link ()
1578{
1579 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1580 rm -f conftest.$ac_objext conftest$ac_exeext
1581 if { { ac_try="$ac_link"
1582case "(($ac_try" in
1583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1584 *) ac_try_echo=$ac_try;;
1585esac
1586eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1587$as_echo "$ac_try_echo"; } >&5
1588 (eval "$ac_link") 2>conftest.err
1589 ac_status=$?
1590 if test -s conftest.err; then
1591 grep -v '^ *+' conftest.err >conftest.er1
1592 cat conftest.er1 >&5
1593 mv -f conftest.er1 conftest.err
1594 fi
1595 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1596 test $ac_status = 0; } && {
1597 test -z "$ac_c_werror_flag" ||
1598 test ! -s conftest.err
1599 } && test -s conftest$ac_exeext && {
1600 test "$cross_compiling" = yes ||
1601 $as_test_x conftest$ac_exeext
1602 }; then :
1603 ac_retval=0
1604else
1605 $as_echo "$as_me: failed program was:" >&5
1606sed 's/^/| /' conftest.$ac_ext >&5
1607
1608 ac_retval=1
1609fi
1610 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1611 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1612 # interfere with the next link command; also delete a directory that is
1613 # left behind by Apple's compiler. We do this before executing the actions.
1614 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Antoine Pitrou37009202011-07-08 23:47:50 +02001615 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001616 as_fn_set_status $ac_retval
1617
1618} # ac_fn_c_try_link
1619
Matthias Kloseb9621712010-04-24 17:59:49 +00001620# ac_fn_c_try_cpp LINENO
1621# ----------------------
1622# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1623ac_fn_c_try_cpp ()
1624{
1625 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1626 if { { ac_try="$ac_cpp conftest.$ac_ext"
1627case "(($ac_try" in
1628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1629 *) ac_try_echo=$ac_try;;
1630esac
1631eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1632$as_echo "$ac_try_echo"; } >&5
1633 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1634 ac_status=$?
1635 if test -s conftest.err; then
1636 grep -v '^ *+' conftest.err >conftest.er1
1637 cat conftest.er1 >&5
1638 mv -f conftest.er1 conftest.err
1639 fi
1640 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001641 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001642 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1643 test ! -s conftest.err
1644 }; then :
1645 ac_retval=0
1646else
1647 $as_echo "$as_me: failed program was:" >&5
1648sed 's/^/| /' conftest.$ac_ext >&5
1649
1650 ac_retval=1
1651fi
Antoine Pitrou37009202011-07-08 23:47:50 +02001652 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001653 as_fn_set_status $ac_retval
1654
1655} # ac_fn_c_try_cpp
1656
1657# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1658# -------------------------------------------------------
1659# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1660# the include files in INCLUDES and setting the cache variable VAR
1661# accordingly.
1662ac_fn_c_check_header_mongrel ()
1663{
1664 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Antoine Pitrou37009202011-07-08 23:47:50 +02001665 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1667$as_echo_n "checking for $2... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02001668if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001669 $as_echo_n "(cached) " >&6
1670fi
1671eval ac_res=\$$3
1672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1673$as_echo "$ac_res" >&6; }
1674else
1675 # Is the header compilable?
1676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1677$as_echo_n "checking $2 usability... " >&6; }
1678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1679/* end confdefs.h. */
1680$4
1681#include <$2>
1682_ACEOF
1683if ac_fn_c_try_compile "$LINENO"; then :
1684 ac_header_compiler=yes
1685else
1686 ac_header_compiler=no
1687fi
1688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1690$as_echo "$ac_header_compiler" >&6; }
1691
1692# Is the header present?
1693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1694$as_echo_n "checking $2 presence... " >&6; }
1695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1696/* end confdefs.h. */
1697#include <$2>
1698_ACEOF
1699if ac_fn_c_try_cpp "$LINENO"; then :
1700 ac_header_preproc=yes
1701else
1702 ac_header_preproc=no
1703fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001704rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1706$as_echo "$ac_header_preproc" >&6; }
1707
1708# So? What about this header?
1709case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1710 yes:no: )
1711 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1712$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1713 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1714$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1715 ;;
1716 no:yes:* )
1717 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1718$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1719 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1720$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1721 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1722$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1723 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1724$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1725 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1726$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001727( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001728## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001729## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001730 ) | sed "s/^/$as_me: WARNING: /" >&2
1731 ;;
1732esac
1733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1734$as_echo_n "checking for $2... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02001735if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001736 $as_echo_n "(cached) " >&6
1737else
1738 eval "$3=\$ac_header_compiler"
1739fi
1740eval ac_res=\$$3
1741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1742$as_echo "$ac_res" >&6; }
1743fi
Antoine Pitrou37009202011-07-08 23:47:50 +02001744 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001745
1746} # ac_fn_c_check_header_mongrel
1747
1748# ac_fn_c_try_run LINENO
1749# ----------------------
1750# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1751# that executables *can* be run.
1752ac_fn_c_try_run ()
1753{
1754 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1755 if { { ac_try="$ac_link"
1756case "(($ac_try" in
1757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1758 *) ac_try_echo=$ac_try;;
1759esac
1760eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1761$as_echo "$ac_try_echo"; } >&5
1762 (eval "$ac_link") 2>&5
1763 ac_status=$?
1764 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1765 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1766 { { case "(($ac_try" in
1767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1768 *) ac_try_echo=$ac_try;;
1769esac
1770eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1771$as_echo "$ac_try_echo"; } >&5
1772 (eval "$ac_try") 2>&5
1773 ac_status=$?
1774 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1775 test $ac_status = 0; }; }; then :
1776 ac_retval=0
1777else
1778 $as_echo "$as_me: program exited with status $ac_status" >&5
1779 $as_echo "$as_me: failed program was:" >&5
1780sed 's/^/| /' conftest.$ac_ext >&5
1781
1782 ac_retval=$ac_status
1783fi
1784 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Antoine Pitrou37009202011-07-08 23:47:50 +02001785 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001786 as_fn_set_status $ac_retval
1787
1788} # ac_fn_c_try_run
1789
1790# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1791# -------------------------------------------------------
1792# Tests whether HEADER exists and can be compiled using the include files in
1793# INCLUDES, setting the cache variable VAR accordingly.
1794ac_fn_c_check_header_compile ()
1795{
1796 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1798$as_echo_n "checking for $2... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02001799if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001800 $as_echo_n "(cached) " >&6
1801else
1802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1803/* end confdefs.h. */
1804$4
1805#include <$2>
1806_ACEOF
1807if ac_fn_c_try_compile "$LINENO"; then :
1808 eval "$3=yes"
1809else
1810 eval "$3=no"
1811fi
1812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1813fi
1814eval ac_res=\$$3
1815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1816$as_echo "$ac_res" >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02001817 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001818
1819} # ac_fn_c_check_header_compile
1820
Matthias Kloseb9621712010-04-24 17:59:49 +00001821# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1822# -------------------------------------------
1823# Tests whether TYPE exists after having included INCLUDES, setting cache
1824# variable VAR accordingly.
1825ac_fn_c_check_type ()
1826{
1827 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1829$as_echo_n "checking for $2... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02001830if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001831 $as_echo_n "(cached) " >&6
1832else
1833 eval "$3=no"
1834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1835/* end confdefs.h. */
1836$4
1837int
1838main ()
1839{
1840if (sizeof ($2))
1841 return 0;
1842 ;
1843 return 0;
1844}
1845_ACEOF
1846if ac_fn_c_try_compile "$LINENO"; then :
1847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1848/* end confdefs.h. */
1849$4
1850int
1851main ()
1852{
1853if (sizeof (($2)))
1854 return 0;
1855 ;
1856 return 0;
1857}
1858_ACEOF
1859if ac_fn_c_try_compile "$LINENO"; then :
1860
1861else
1862 eval "$3=yes"
1863fi
1864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1865fi
1866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1867fi
1868eval ac_res=\$$3
1869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1870$as_echo "$ac_res" >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02001871 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001872
1873} # ac_fn_c_check_type
1874
1875# ac_fn_c_find_uintX_t LINENO BITS VAR
1876# ------------------------------------
1877# Finds an unsigned integer type with width BITS, setting cache variable VAR
1878# accordingly.
1879ac_fn_c_find_uintX_t ()
1880{
1881 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1883$as_echo_n "checking for uint$2_t... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02001884if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001885 $as_echo_n "(cached) " >&6
1886else
1887 eval "$3=no"
1888 # Order is important - never check a type that is potentially smaller
1889 # than half of the expected target width.
1890 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1891 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1893/* end confdefs.h. */
1894$ac_includes_default
1895int
1896main ()
1897{
1898static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1899test_array [0] = 0
1900
1901 ;
1902 return 0;
1903}
1904_ACEOF
1905if ac_fn_c_try_compile "$LINENO"; then :
1906 case $ac_type in #(
1907 uint$2_t) :
1908 eval "$3=yes" ;; #(
1909 *) :
1910 eval "$3=\$ac_type" ;;
1911esac
1912fi
1913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001914 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001915
1916else
1917 break
1918fi
1919 done
1920fi
1921eval ac_res=\$$3
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1923$as_echo "$ac_res" >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02001924 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001925
1926} # ac_fn_c_find_uintX_t
1927
1928# ac_fn_c_find_intX_t LINENO BITS VAR
1929# -----------------------------------
1930# Finds a signed integer type with width BITS, setting cache variable VAR
1931# accordingly.
1932ac_fn_c_find_intX_t ()
1933{
1934 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1936$as_echo_n "checking for int$2_t... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02001937if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001938 $as_echo_n "(cached) " >&6
1939else
1940 eval "$3=no"
1941 # Order is important - never check a type that is potentially smaller
1942 # than half of the expected target width.
1943 for ac_type in int$2_t 'int' 'long int' \
1944 'long long int' 'short int' 'signed char'; do
1945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1946/* end confdefs.h. */
1947$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001948 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001949int
1950main ()
1951{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001952static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001953test_array [0] = 0
1954
1955 ;
1956 return 0;
1957}
1958_ACEOF
1959if ac_fn_c_try_compile "$LINENO"; then :
1960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1961/* end confdefs.h. */
1962$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001963 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001964int
1965main ()
1966{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001967static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001968 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1969test_array [0] = 0
1970
1971 ;
1972 return 0;
1973}
1974_ACEOF
1975if ac_fn_c_try_compile "$LINENO"; then :
1976
1977else
1978 case $ac_type in #(
1979 int$2_t) :
1980 eval "$3=yes" ;; #(
1981 *) :
1982 eval "$3=\$ac_type" ;;
1983esac
1984fi
1985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1986fi
1987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001988 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001989
1990else
1991 break
1992fi
1993 done
1994fi
1995eval ac_res=\$$3
1996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1997$as_echo "$ac_res" >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02001998 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001999
2000} # ac_fn_c_find_intX_t
2001
2002# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2003# --------------------------------------------
2004# Tries to find the compile-time value of EXPR in a program that includes
2005# INCLUDES, setting VAR accordingly. Returns whether the value could be
2006# computed
2007ac_fn_c_compute_int ()
2008{
2009 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2010 if test "$cross_compiling" = yes; then
2011 # Depending upon the size, compute the lo and hi bounds.
2012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2013/* end confdefs.h. */
2014$4
2015int
2016main ()
2017{
2018static int test_array [1 - 2 * !(($2) >= 0)];
2019test_array [0] = 0
2020
2021 ;
2022 return 0;
2023}
2024_ACEOF
2025if ac_fn_c_try_compile "$LINENO"; then :
2026 ac_lo=0 ac_mid=0
2027 while :; do
2028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2029/* end confdefs.h. */
2030$4
2031int
2032main ()
2033{
2034static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2035test_array [0] = 0
2036
2037 ;
2038 return 0;
2039}
2040_ACEOF
2041if ac_fn_c_try_compile "$LINENO"; then :
2042 ac_hi=$ac_mid; break
2043else
2044 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2045 if test $ac_lo -le $ac_mid; then
2046 ac_lo= ac_hi=
2047 break
2048 fi
2049 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2050fi
2051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2052 done
2053else
2054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2055/* end confdefs.h. */
2056$4
2057int
2058main ()
2059{
2060static int test_array [1 - 2 * !(($2) < 0)];
2061test_array [0] = 0
2062
2063 ;
2064 return 0;
2065}
2066_ACEOF
2067if ac_fn_c_try_compile "$LINENO"; then :
2068 ac_hi=-1 ac_mid=-1
2069 while :; do
2070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2071/* end confdefs.h. */
2072$4
2073int
2074main ()
2075{
2076static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2077test_array [0] = 0
2078
2079 ;
2080 return 0;
2081}
2082_ACEOF
2083if ac_fn_c_try_compile "$LINENO"; then :
2084 ac_lo=$ac_mid; break
2085else
2086 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2087 if test $ac_mid -le $ac_hi; then
2088 ac_lo= ac_hi=
2089 break
2090 fi
2091 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2092fi
2093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2094 done
2095else
2096 ac_lo= ac_hi=
2097fi
2098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2099fi
2100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2101# Binary search between lo and hi bounds.
2102while test "x$ac_lo" != "x$ac_hi"; do
2103 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2105/* end confdefs.h. */
2106$4
2107int
2108main ()
2109{
2110static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2111test_array [0] = 0
2112
2113 ;
2114 return 0;
2115}
2116_ACEOF
2117if ac_fn_c_try_compile "$LINENO"; then :
2118 ac_hi=$ac_mid
2119else
2120 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2121fi
2122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2123done
2124case $ac_lo in #((
2125?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2126'') ac_retval=1 ;;
2127esac
2128 else
2129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2130/* end confdefs.h. */
2131$4
2132static long int longval () { return $2; }
2133static unsigned long int ulongval () { return $2; }
2134#include <stdio.h>
2135#include <stdlib.h>
2136int
2137main ()
2138{
2139
2140 FILE *f = fopen ("conftest.val", "w");
2141 if (! f)
2142 return 1;
2143 if (($2) < 0)
2144 {
2145 long int i = longval ();
2146 if (i != ($2))
2147 return 1;
2148 fprintf (f, "%ld", i);
2149 }
2150 else
2151 {
2152 unsigned long int i = ulongval ();
2153 if (i != ($2))
2154 return 1;
2155 fprintf (f, "%lu", i);
2156 }
2157 /* Do not output a trailing newline, as this causes \r\n confusion
2158 on some platforms. */
2159 return ferror (f) || fclose (f) != 0;
2160
2161 ;
2162 return 0;
2163}
2164_ACEOF
2165if ac_fn_c_try_run "$LINENO"; then :
2166 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2167else
2168 ac_retval=1
2169fi
2170rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2171 conftest.$ac_objext conftest.beam conftest.$ac_ext
2172rm -f conftest.val
2173
2174 fi
Antoine Pitrou37009202011-07-08 23:47:50 +02002175 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002176 as_fn_set_status $ac_retval
2177
2178} # ac_fn_c_compute_int
2179
2180# ac_fn_c_check_func LINENO FUNC VAR
2181# ----------------------------------
2182# Tests whether FUNC exists, setting the cache variable VAR accordingly
2183ac_fn_c_check_func ()
2184{
2185 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2187$as_echo_n "checking for $2... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02002188if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002189 $as_echo_n "(cached) " >&6
2190else
2191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2192/* end confdefs.h. */
2193/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2194 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2195#define $2 innocuous_$2
2196
2197/* System header to define __stub macros and hopefully few prototypes,
2198 which can conflict with char $2 (); below.
2199 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2200 <limits.h> exists even on freestanding compilers. */
2201
2202#ifdef __STDC__
2203# include <limits.h>
2204#else
2205# include <assert.h>
2206#endif
2207
2208#undef $2
2209
2210/* Override any GCC internal prototype to avoid an error.
2211 Use char because int might match the return type of a GCC
2212 builtin and then its argument prototype would still apply. */
2213#ifdef __cplusplus
2214extern "C"
2215#endif
2216char $2 ();
2217/* The GNU C library defines this for functions which it implements
2218 to always fail with ENOSYS. Some functions are actually named
2219 something starting with __ and the normal name is an alias. */
2220#if defined __stub_$2 || defined __stub___$2
2221choke me
2222#endif
2223
2224int
2225main ()
2226{
2227return $2 ();
2228 ;
2229 return 0;
2230}
2231_ACEOF
2232if ac_fn_c_try_link "$LINENO"; then :
2233 eval "$3=yes"
2234else
2235 eval "$3=no"
2236fi
2237rm -f core conftest.err conftest.$ac_objext \
2238 conftest$ac_exeext conftest.$ac_ext
2239fi
2240eval ac_res=\$$3
2241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2242$as_echo "$ac_res" >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02002243 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002244
2245} # ac_fn_c_check_func
2246
2247# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2248# ----------------------------------------------------
2249# Tries to find if the field MEMBER exists in type AGGR, after including
2250# INCLUDES, setting cache variable VAR accordingly.
2251ac_fn_c_check_member ()
2252{
2253 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2255$as_echo_n "checking for $2.$3... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02002256if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002257 $as_echo_n "(cached) " >&6
2258else
2259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2260/* end confdefs.h. */
2261$5
2262int
2263main ()
2264{
2265static $2 ac_aggr;
2266if (ac_aggr.$3)
2267return 0;
2268 ;
2269 return 0;
2270}
2271_ACEOF
2272if ac_fn_c_try_compile "$LINENO"; then :
2273 eval "$4=yes"
2274else
2275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2276/* end confdefs.h. */
2277$5
2278int
2279main ()
2280{
2281static $2 ac_aggr;
2282if (sizeof ac_aggr.$3)
2283return 0;
2284 ;
2285 return 0;
2286}
2287_ACEOF
2288if ac_fn_c_try_compile "$LINENO"; then :
2289 eval "$4=yes"
2290else
2291 eval "$4=no"
2292fi
2293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2294fi
2295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2296fi
2297eval ac_res=\$$4
2298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2299$as_echo "$ac_res" >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02002300 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002301
2302} # ac_fn_c_check_member
2303
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002304# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2305# ---------------------------------------------
2306# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2307# accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002308ac_fn_c_check_decl ()
2309{
2310 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002311 as_decl_name=`echo $2|sed 's/ *(.*//'`
2312 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2314$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02002315if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002316 $as_echo_n "(cached) " >&6
2317else
2318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2319/* end confdefs.h. */
2320$4
2321int
2322main ()
2323{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002324#ifndef $as_decl_name
2325#ifdef __cplusplus
2326 (void) $as_decl_use;
2327#else
2328 (void) $as_decl_name;
2329#endif
Matthias Kloseb9621712010-04-24 17:59:49 +00002330#endif
2331
2332 ;
2333 return 0;
2334}
2335_ACEOF
2336if ac_fn_c_try_compile "$LINENO"; then :
2337 eval "$3=yes"
2338else
2339 eval "$3=no"
2340fi
2341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2342fi
2343eval ac_res=\$$3
2344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2345$as_echo "$ac_res" >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02002346 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002347
2348} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002349cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002350This file contains any messages produced by compilers while
2351running configure, to aid debugging if configure makes a mistake.
2352
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002353It was created by python $as_me 3.3, which was
Antoine Pitrou37009202011-07-08 23:47:50 +02002354generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002355
2356 $ $0 $@
2357
2358_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002359exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002360{
2361cat <<_ASUNAME
2362## --------- ##
2363## Platform. ##
2364## --------- ##
2365
2366hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2367uname -m = `(uname -m) 2>/dev/null || echo unknown`
2368uname -r = `(uname -r) 2>/dev/null || echo unknown`
2369uname -s = `(uname -s) 2>/dev/null || echo unknown`
2370uname -v = `(uname -v) 2>/dev/null || echo unknown`
2371
2372/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2373/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2374
2375/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2376/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2377/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002378/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002379/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2380/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2381/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2382
2383_ASUNAME
2384
2385as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2386for as_dir in $PATH
2387do
2388 IFS=$as_save_IFS
2389 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002390 $as_echo "PATH: $as_dir"
2391 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002392IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002393
2394} >&5
2395
2396cat >&5 <<_ACEOF
2397
2398
2399## ----------- ##
2400## Core tests. ##
2401## ----------- ##
2402
2403_ACEOF
2404
2405
2406# Keep a trace of the command line.
2407# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002408# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002409# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002410# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002411ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002412ac_configure_args0=
2413ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002414ac_must_keep_next=false
2415for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002416do
Skip Montanaro6dead952003-09-25 14:50:04 +00002417 for ac_arg
2418 do
2419 case $ac_arg in
2420 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2421 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2422 | -silent | --silent | --silen | --sile | --sil)
2423 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002424 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002425 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002426 esac
2427 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002428 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002429 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002430 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002431 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002432 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002433 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002434 case $ac_arg in
2435 *=* | --config-cache | -C | -disable-* | --disable-* \
2436 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2437 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2438 | -with-* | --with-* | -without-* | --without-* | --x)
2439 case "$ac_configure_args0 " in
2440 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2441 esac
2442 ;;
2443 -* ) ac_must_keep_next=true ;;
2444 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002445 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002446 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002447 ;;
2448 esac
2449 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002450done
Matthias Kloseb9621712010-04-24 17:59:49 +00002451{ ac_configure_args0=; unset ac_configure_args0;}
2452{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002453
2454# When interrupted or exit'd, cleanup temporary files, and complete
2455# config.log. We remove comments because anyway the quotes in there
2456# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002457# WARNING: Use '\'' to represent an apostrophe within the trap.
2458# 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 +00002459trap 'exit_status=$?
2460 # Save into config.log some information that might help in debugging.
2461 {
2462 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002463
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002464 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002465## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002466## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002467 echo
2468 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469(
2470 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2471 eval ac_val=\$$ac_var
2472 case $ac_val in #(
2473 *${as_nl}*)
2474 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002475 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2476$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477 esac
2478 case $ac_var in #(
2479 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002480 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2481 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002482 esac ;;
2483 esac
2484 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002485 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2487 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002488 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489 "s/'\''/'\''\\\\'\'''\''/g;
2490 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2491 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002492 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002493 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002494 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495 esac |
2496 sort
2497)
Martin v. Löwis11437992002-04-12 09:54:03 +00002498 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002499
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002500 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002501## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002502## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 echo
2504 for ac_var in $ac_subst_vars
2505 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506 eval ac_val=\$$ac_var
2507 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 done | sort
2512 echo
2513
2514 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002515 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002517## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002518 echo
2519 for ac_var in $ac_subst_files
2520 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521 eval ac_val=\$$ac_var
2522 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002523 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002525 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002526 done | sort
2527 echo
2528 fi
2529
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002531 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002532## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002533## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 echo
2537 fi
2538 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002539 $as_echo "$as_me: caught signal $ac_signal"
2540 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002541 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542 rm -f core *.core core.conftest.* &&
2543 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002544 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002545' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002546for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002547 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002548done
2549ac_signal=0
2550
2551# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002552rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002553
Matthias Kloseb9621712010-04-24 17:59:49 +00002554$as_echo "/* confdefs.h */" > confdefs.h
2555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556# Predefined preprocessor variables.
2557
2558cat >>confdefs.h <<_ACEOF
2559#define PACKAGE_NAME "$PACKAGE_NAME"
2560_ACEOF
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562cat >>confdefs.h <<_ACEOF
2563#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2564_ACEOF
2565
Martin v. Löwis11437992002-04-12 09:54:03 +00002566cat >>confdefs.h <<_ACEOF
2567#define PACKAGE_VERSION "$PACKAGE_VERSION"
2568_ACEOF
2569
Martin v. Löwis11437992002-04-12 09:54:03 +00002570cat >>confdefs.h <<_ACEOF
2571#define PACKAGE_STRING "$PACKAGE_STRING"
2572_ACEOF
2573
Martin v. Löwis11437992002-04-12 09:54:03 +00002574cat >>confdefs.h <<_ACEOF
2575#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2576_ACEOF
2577
Matthias Kloseb9621712010-04-24 17:59:49 +00002578cat >>confdefs.h <<_ACEOF
2579#define PACKAGE_URL "$PACKAGE_URL"
2580_ACEOF
2581
Martin v. Löwis11437992002-04-12 09:54:03 +00002582
2583# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002584# Prefer an explicitly selected file to automatically selected ones.
2585ac_site_file1=NONE
2586ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002588 # We do not want a PATH search for config.site.
2589 case $CONFIG_SITE in #((
2590 -*) ac_site_file1=./$CONFIG_SITE;;
2591 */*) ac_site_file1=$CONFIG_SITE;;
2592 *) ac_site_file1=./$CONFIG_SITE;;
2593 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002595 ac_site_file1=$prefix/share/config.site
2596 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002597else
Matthias Kloseb9621712010-04-24 17:59:49 +00002598 ac_site_file1=$ac_default_prefix/share/config.site
2599 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002600fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002601for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002602do
Matthias Kloseb9621712010-04-24 17:59:49 +00002603 test "x$ac_site_file" = xNONE && continue
2604 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2605 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2606$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002608 . "$ac_site_file" \
2609 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2610$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2611as_fn_error $? "failed to load site script $ac_site_file
Antoine Pitrou37009202011-07-08 23:47:50 +02002612See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002613 fi
2614done
2615
2616if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002617 # Some versions of bash will fail to source /dev/null (special files
2618 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2619 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2620 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2621$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002623 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2624 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 esac
2626 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002627else
Matthias Kloseb9621712010-04-24 17:59:49 +00002628 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2629$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 >$cache_file
2631fi
2632
2633# Check that the precious variables saved in the cache have kept the same
2634# value.
2635ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002636for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2638 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002639 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2640 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 case $ac_old_set,$ac_new_set in
2642 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002643 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2644$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 +00002645 ac_cache_corrupted=: ;;
2646 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002647 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2648$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 ac_cache_corrupted=: ;;
2650 ,);;
2651 *)
2652 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002653 # differences in whitespace do not lead to failure.
2654 ac_old_val_w=`echo x $ac_old_val`
2655 ac_new_val_w=`echo x $ac_new_val`
2656 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2658$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2659 ac_cache_corrupted=:
2660 else
2661 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2662$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2663 eval $ac_var=\$ac_old_val
2664 fi
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2666$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2667 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2668$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 fi;;
2670 esac
2671 # Pass precious variables to config.status.
2672 if test "$ac_new_set" = set; then
2673 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002674 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002675 *) ac_arg=$ac_var=$ac_new_val ;;
2676 esac
2677 case " $ac_configure_args " in
2678 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002679 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002680 esac
2681 fi
2682done
2683if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002684 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2685$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2686 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2687$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002688 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002689fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002690## -------------------- ##
2691## Main body of script. ##
2692## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002693
Guido van Rossum7f43da71994-08-01 12:15:30 +00002694ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002695ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002696ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2697ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2698ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002699
Guido van Rossum627b2d71993-12-24 10:39:16 +00002700
Michael W. Hudson54241132001-12-07 15:38:26 +00002701
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002702
2703
2704
2705
2706if test -e $srcdir/.hg/00changelog.i
2707then
2708# Extract the first word of "hg", so it can be a program name with args.
2709set dummy hg; ac_word=$2
2710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2711$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02002712if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002713 $as_echo_n "(cached) " >&6
2714else
2715 if test -n "$HAS_HG"; then
2716 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2717else
2718as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2719for as_dir in $PATH
2720do
2721 IFS=$as_save_IFS
2722 test -z "$as_dir" && as_dir=.
2723 for ac_exec_ext in '' $ac_executable_extensions; do
2724 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2725 ac_cv_prog_HAS_HG="found"
2726 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2727 break 2
2728 fi
2729done
2730 done
2731IFS=$as_save_IFS
2732
2733 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2734fi
2735fi
2736HAS_HG=$ac_cv_prog_HAS_HG
2737if test -n "$HAS_HG"; then
2738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2739$as_echo "$HAS_HG" >&6; }
2740else
2741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2742$as_echo "no" >&6; }
2743fi
2744
2745
2746else
2747HAS_HG=no-repository
2748fi
2749if test $HAS_HG = found
2750then
2751 HGVERSION="hg id -i \$(srcdir)"
2752 HGTAG="hg id -t \$(srcdir)"
2753 HGBRANCH="hg id -b \$(srcdir)"
2754else
2755 HGVERSION=""
2756 HGTAG=""
2757 HGBRANCH=""
2758fi
2759
2760
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002761ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002762
2763
Martin v. Löwis11437992002-04-12 09:54:03 +00002764
Benjamin Petersond23f8222009-04-05 19:13:16 +00002765if test "$prefix" != "/"; then
2766 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2767fi
2768
2769
Martin v. Löwis11437992002-04-12 09:54:03 +00002770
2771
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002772# We don't use PACKAGE_ variables, and they cause conflicts
2773# with other autoconf-based packages that include Python.h
2774grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2775rm confdefs.h
2776mv confdefs.h.new confdefs.h
2777
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002778
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002779VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002780
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002781# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002782
2783SOVERSION=1.0
2784
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002785# The later defininition of _XOPEN_SOURCE disables certain features
2786# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2787
Matthias Kloseb9621712010-04-24 17:59:49 +00002788$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002789
2790
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002791# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2792# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2793# them.
2794
Matthias Kloseb9621712010-04-24 17:59:49 +00002795$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002796
2797
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002798# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2799# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2800# them.
2801
Matthias Kloseb9621712010-04-24 17:59:49 +00002802$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002803
2804
Martin v. Löwisd6320502004-08-12 13:45:08 +00002805# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2806# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2807
Matthias Kloseb9621712010-04-24 17:59:49 +00002808$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002809
2810
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002811# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2812# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2813# them.
2814
Matthias Kloseb9621712010-04-24 17:59:49 +00002815$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002816
2817
2818
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002819define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002820
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002821# Arguments passed to configure.
2822
2823CONFIG_ARGS="$ac_configure_args"
2824
Matthias Kloseb9621712010-04-24 17:59:49 +00002825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2826$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002827# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002828if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002829 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002830 case $enableval in
2831 yes)
2832 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002833 if test ! -d "${enableval}"
2834 then
2835 enableval=/
2836 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002837 ;;
2838 esac
2839 case $enableval in
2840 no)
2841 UNIVERSALSDK=
2842 enable_universalsdk=
2843 ;;
2844 *)
2845 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002846 if test ! -d "${UNIVERSALSDK}"
2847 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002848 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002849 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002850 ;;
2851 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002852
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002853
Thomas Wouters477c8d52006-05-27 19:21:47 +00002854else
2855
2856 UNIVERSALSDK=
2857 enable_universalsdk=
2858
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002859fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002860
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002861if test -n "${UNIVERSALSDK}"
2862then
Matthias Kloseb9621712010-04-24 17:59:49 +00002863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2864$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002865else
Matthias Kloseb9621712010-04-24 17:59:49 +00002866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2867$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002868fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002869
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002870
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002871
2872
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002873UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002874
Matthias Kloseb9621712010-04-24 17:59:49 +00002875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2876$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002877
2878# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002879if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002880 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2882$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002883 UNIVERSAL_ARCHS="$withval"
2884
2885else
2886
Matthias Kloseb9621712010-04-24 17:59:49 +00002887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2888$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002889
2890fi
2891
2892
2893
2894
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002895
2896# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002897if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002898 withval=$with_framework_name;
2899 PYTHONFRAMEWORK=${withval}
2900 PYTHONFRAMEWORKDIR=${withval}.framework
2901 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2902
2903else
2904
2905 PYTHONFRAMEWORK=Python
2906 PYTHONFRAMEWORKDIR=Python.framework
2907 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2908
2909fi
2910
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002911# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002912if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002913 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002914 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002915 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002916 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002917 esac
2918 case $enableval in
2919 no)
2920 PYTHONFRAMEWORK=
2921 PYTHONFRAMEWORKDIR=no-framework
2922 PYTHONFRAMEWORKPREFIX=
2923 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002924 FRAMEWORKINSTALLFIRST=
2925 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002926 FRAMEWORKALTINSTALLFIRST=
2927 FRAMEWORKALTINSTALLLAST=
2928 if test "x${prefix}" = "xNONE"; then
2929 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2930 else
2931 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2932 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002933 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002934 ;;
2935 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002936 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002937 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002938 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002939 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002940 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2941 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002942 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002943
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002944 if test "x${prefix}" = "xNONE" ; then
2945 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002946
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002947 else
2948 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2949 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002950
2951 case "${enableval}" in
2952 /System*)
2953 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2954 if test "${prefix}" = "NONE" ; then
2955 # See below
2956 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2957 fi
2958 ;;
2959
2960 /Library*)
2961 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2962 ;;
2963
2964 */Library/Frameworks)
2965 MDIR="`dirname "${enableval}"`"
2966 MDIR="`dirname "${MDIR}"`"
2967 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2968
2969 if test "${prefix}" = "NONE"; then
2970 # User hasn't specified the
2971 # --prefix option, but wants to install
2972 # the framework in a non-default location,
2973 # ensure that the compatibility links get
2974 # installed relative to that prefix as well
2975 # instead of in /usr/local.
2976 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2977 fi
2978 ;;
2979
2980 *)
2981 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2982 ;;
2983 esac
2984
Jack Jansen127e56e2001-09-11 14:41:54 +00002985 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002986
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002987 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002988 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002989 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002990
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002991 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002992
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002993 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2994
2995 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2996
Jack Jansene578a632001-08-15 01:27:14 +00002997 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002998
Guido van Rossum563e7081996-09-10 18:20:48 +00002999else
Martin v. Löwis11437992002-04-12 09:54:03 +00003000
Jack Jansene578a632001-08-15 01:27:14 +00003001 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003002 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003003 PYTHONFRAMEWORKPREFIX=
3004 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003005 FRAMEWORKINSTALLFIRST=
3006 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003007 FRAMEWORKALTINSTALLFIRST=
3008 FRAMEWORKALTINSTALLLAST=
3009 if test "x${prefix}" = "xNONE" ; then
3010 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3011 else
3012 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3013 fi
Jack Jansene578a632001-08-15 01:27:14 +00003014 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003015
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003016
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003017fi
3018
Thomas Wouters477c8d52006-05-27 19:21:47 +00003019
3020
Michael W. Hudson54241132001-12-07 15:38:26 +00003021
3022
3023
3024
Jack Jansene578a632001-08-15 01:27:14 +00003025
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003026
3027
3028
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003029
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003030
Jack Jansene578a632001-08-15 01:27:14 +00003031##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003032## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003033## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003034##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003035# Set name for machine-dependent library files
3036
Matthias Kloseb9621712010-04-24 17:59:49 +00003037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3038$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003039if test -z "$MACHDEP"
3040then
Guido van Rossum563e7081996-09-10 18:20:48 +00003041 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003042 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003043 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003044 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003045 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003046 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003047 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00003048 ac_md_system=`echo $ac_sys_system |
3049 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3050 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00003051 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00003052 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003053
Guido van Rossum07397971997-04-29 21:49:50 +00003054 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003055 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003056 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003057 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003058 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003059 esac
3060fi
Guido van Rossum91922671997-10-09 20:24:13 +00003061
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003062# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3063# disable features if it is defined, without any means to access these
3064# features as extensions. For these systems, we skip the definition of
3065# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3066# some feature, make sure there is no alternative way to access this
3067# feature. Also, when using wildcards, make sure you have verified the
3068# need for not defining _XOPEN_SOURCE on all systems matching the
3069# wildcard, and that the wildcard does not include future systems
3070# (which may remove their limitations).
3071case $ac_sys_system/$ac_sys_release in
3072 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3073 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003074 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003075 # In addition, Stefan Krah confirms that issue #1244610 exists through
3076 # OpenBSD 4.6, but is fixed in 4.7.
3077 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003078 define_xopen_source=no
3079 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3080 # also defined. This can be overridden by defining _BSD_SOURCE
3081 # As this has a different meaning on Linux, only define it on OpenBSD
3082
Matthias Kloseb9621712010-04-24 17:59:49 +00003083$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003084
3085 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003086 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003087 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3088 # also defined. This can be overridden by defining _BSD_SOURCE
3089 # As this has a different meaning on Linux, only define it on OpenBSD
3090
Matthias Kloseb9621712010-04-24 17:59:49 +00003091$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003092
3093 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003094 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3095 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3096 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003097 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 +00003098 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003099 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3100 # request to enable features supported by the standard as a request
3101 # to disable features not supported by the standard. The best way
3102 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3103 # entirely and define __EXTENSIONS__ instead.
3104 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003105 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003106 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3107 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003108 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003109 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003110 define_xopen_source=no;;
3111 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003112 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003113 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003114 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003115 # On FreeBSD 4, the math functions C89 does not cover are never defined
3116 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3117 FreeBSD/4.*)
3118 define_xopen_source=no;;
3119 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3120 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3121 # identifies itself as Darwin/7.*
3122 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3123 # disables platform specific features beyond repair.
3124 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3125 # has no effect, don't bother defining them
3126 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003127 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003128 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003129 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003130 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3131 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3132 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003133 AIX/4)
3134 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003135 AIX/5)
3136 if test `uname -r` -eq 1; then
3137 define_xopen_source=no
3138 fi
3139 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003140 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3141 # defining NI_NUMERICHOST.
3142 QNX/6.3.2)
3143 define_xopen_source=no
3144 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003145
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003146esac
3147
3148if test $define_xopen_source = yes
3149then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003150
Matthias Kloseb9621712010-04-24 17:59:49 +00003151$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003152
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003153
3154 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3155 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3156 # several APIs are not declared. Since this is also needed in some
3157 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003158
Matthias Kloseb9621712010-04-24 17:59:49 +00003159$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003160
3161
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003162
Matthias Kloseb9621712010-04-24 17:59:49 +00003163$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003164
3165
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003166fi
3167
Guido van Rossum91922671997-10-09 20:24:13 +00003168#
3169# SGI compilers allow the specification of the both the ABI and the
3170# ISA on the command line. Depending on the values of these switches,
3171# different and often incompatable code will be generated.
3172#
3173# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3174# thus supply support for various ABI/ISA combinations. The MACHDEP
3175# variable is also adjusted.
3176#
3177
3178if test ! -z "$SGI_ABI"
3179then
3180 CC="cc $SGI_ABI"
3181 LDFLAGS="$SGI_ABI $LDFLAGS"
3182 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3183fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3185$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003186
Jack Jansen6b08a402004-06-03 12:41:45 +00003187# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3188# it may influence the way we can build extensions, so distutils
3189# needs to check it
3190
Thomas Wouters477c8d52006-05-27 19:21:47 +00003191
Jack Jansen6b08a402004-06-03 12:41:45 +00003192CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003193EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003194
Matthias Kloseb9621712010-04-24 17:59:49 +00003195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3196$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003197ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3199$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003200
Guido van Rossum627b2d71993-12-24 10:39:16 +00003201# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003202
3203# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3204# for debug/optimization stuff. BASECFLAGS is for flags that are required
3205# just to get things to compile and link. Users are free to override OPT
3206# when running configure or make. The build should not break if they do.
3207# BASECFLAGS should generally not be messed with, however.
3208
3209# XXX shouldn't some/most/all of this code be merged with the stuff later
3210# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3212$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003213
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003214# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003215if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003216 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003217 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003218 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003219 without_gcc=yes;;
3220 yes) CC=gcc
3221 without_gcc=no;;
3222 *) CC=$withval
3223 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003224 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003225else
Martin v. Löwis11437992002-04-12 09:54:03 +00003226
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003227 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003228 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003229 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003230 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003231 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003232fi
3233
Matthias Kloseb9621712010-04-24 17:59:49 +00003234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3235$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003236
Guido van Rossum8b131c51995-03-09 14:10:13 +00003237# If the user switches compilers, we can't believe the cache
3238if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3239then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003240 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003241(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003242fi
3243
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003244# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3245# when the compiler supports them, but we don't always want -O2, and
3246# we set -g later.
3247if test -z "$CFLAGS"; then
3248 CFLAGS=
3249fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003250ac_ext=c
3251ac_cpp='$CPP $CPPFLAGS'
3252ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3253ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3254ac_compiler_gnu=$ac_cv_c_compiler_gnu
3255if test -n "$ac_tool_prefix"; then
3256 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3257set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3259$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02003260if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003261 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003262else
3263 if test -n "$CC"; then
3264 ac_cv_prog_CC="$CC" # Let the user override the test.
3265else
Martin v. Löwis11437992002-04-12 09:54:03 +00003266as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3267for as_dir in $PATH
3268do
3269 IFS=$as_save_IFS
3270 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003271 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003272 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 +00003273 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003274 $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 +00003275 break 2
3276 fi
3277done
Matthias Kloseb9621712010-04-24 17:59:49 +00003278 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003279IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003280
Jack Jansendd19cf82001-12-06 22:36:17 +00003281fi
3282fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003283CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003284if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3286$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003287else
Matthias Kloseb9621712010-04-24 17:59:49 +00003288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3289$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003290fi
3291
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003292
Martin v. Löwis11437992002-04-12 09:54:03 +00003293fi
3294if test -z "$ac_cv_prog_CC"; then
3295 ac_ct_CC=$CC
3296 # Extract the first word of "gcc", so it can be a program name with args.
3297set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3299$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02003300if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003301 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003302else
3303 if test -n "$ac_ct_CC"; then
3304 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3305else
3306as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3307for as_dir in $PATH
3308do
3309 IFS=$as_save_IFS
3310 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003311 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003312 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 +00003313 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003314 $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 +00003315 break 2
3316 fi
3317done
Matthias Kloseb9621712010-04-24 17:59:49 +00003318 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003319IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003320
3321fi
3322fi
3323ac_ct_CC=$ac_cv_prog_ac_ct_CC
3324if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3326$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003327else
Matthias Kloseb9621712010-04-24 17:59:49 +00003328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3329$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003330fi
3331
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003332 if test "x$ac_ct_CC" = x; then
3333 CC=""
3334 else
3335 case $cross_compiling:$ac_tool_warned in
3336yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003337{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3338$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003339ac_tool_warned=yes ;;
3340esac
3341 CC=$ac_ct_CC
3342 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003343else
3344 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003345fi
3346
Jack Jansendd19cf82001-12-06 22:36:17 +00003347if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003348 if test -n "$ac_tool_prefix"; then
3349 # 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 +00003350set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3352$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02003353if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003354 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003355else
3356 if test -n "$CC"; then
3357 ac_cv_prog_CC="$CC" # Let the user override the test.
3358else
Martin v. Löwis11437992002-04-12 09:54:03 +00003359as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3360for as_dir in $PATH
3361do
3362 IFS=$as_save_IFS
3363 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003364 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003365 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 +00003366 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003367 $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 +00003368 break 2
3369 fi
3370done
Matthias Kloseb9621712010-04-24 17:59:49 +00003371 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003372IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003373
3374fi
3375fi
3376CC=$ac_cv_prog_CC
3377if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3379$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003380else
Matthias Kloseb9621712010-04-24 17:59:49 +00003381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3382$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003383fi
3384
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003385
Martin v. Löwis11437992002-04-12 09:54:03 +00003386 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003387fi
3388if test -z "$CC"; then
3389 # Extract the first word of "cc", so it can be a program name with args.
3390set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3392$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02003393if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003394 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003395else
3396 if test -n "$CC"; then
3397 ac_cv_prog_CC="$CC" # Let the user override the test.
3398else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003399 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003400as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3401for as_dir in $PATH
3402do
3403 IFS=$as_save_IFS
3404 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003405 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003406 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 +00003407 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3408 ac_prog_rejected=yes
3409 continue
3410 fi
3411 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003412 $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 +00003413 break 2
3414 fi
3415done
Matthias Kloseb9621712010-04-24 17:59:49 +00003416 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003417IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003418
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003419if test $ac_prog_rejected = yes; then
3420 # We found a bogon in the path, so make sure we never use it.
3421 set dummy $ac_cv_prog_CC
3422 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003423 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003424 # We chose a different compiler from the bogus one.
3425 # However, it has the same basename, so the bogon will be chosen
3426 # first if we set CC to just the basename; use the full file name.
3427 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003428 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003429 fi
3430fi
3431fi
3432fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003433CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003434if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3436$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003437else
Matthias Kloseb9621712010-04-24 17:59:49 +00003438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3439$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003440fi
3441
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003442
Martin v. Löwis11437992002-04-12 09:54:03 +00003443fi
3444if test -z "$CC"; then
3445 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003446 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003447 do
3448 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3449set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3451$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02003452if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003453 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003454else
3455 if test -n "$CC"; then
3456 ac_cv_prog_CC="$CC" # Let the user override the test.
3457else
Martin v. Löwis11437992002-04-12 09:54:03 +00003458as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3459for as_dir in $PATH
3460do
3461 IFS=$as_save_IFS
3462 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003463 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003464 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 +00003465 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003466 $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 +00003467 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003468 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003469done
Matthias Kloseb9621712010-04-24 17:59:49 +00003470 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003471IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003472
3473fi
3474fi
3475CC=$ac_cv_prog_CC
3476if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3478$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003479else
Matthias Kloseb9621712010-04-24 17:59:49 +00003480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3481$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003482fi
3483
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003484
Martin v. Löwis11437992002-04-12 09:54:03 +00003485 test -n "$CC" && break
3486 done
3487fi
3488if test -z "$CC"; then
3489 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003490 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003491do
3492 # Extract the first word of "$ac_prog", so it can be a program name with args.
3493set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3495$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02003496if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003497 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003498else
3499 if test -n "$ac_ct_CC"; then
3500 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3501else
3502as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3503for as_dir in $PATH
3504do
3505 IFS=$as_save_IFS
3506 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003507 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003508 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 +00003509 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003510 $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 +00003511 break 2
3512 fi
3513done
Matthias Kloseb9621712010-04-24 17:59:49 +00003514 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003515IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003516
Martin v. Löwis11437992002-04-12 09:54:03 +00003517fi
3518fi
3519ac_ct_CC=$ac_cv_prog_ac_ct_CC
3520if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3522$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003523else
Matthias Kloseb9621712010-04-24 17:59:49 +00003524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3525$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003526fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003527
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003528
Martin v. Löwis11437992002-04-12 09:54:03 +00003529 test -n "$ac_ct_CC" && break
3530done
Michael W. Hudson54241132001-12-07 15:38:26 +00003531
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003532 if test "x$ac_ct_CC" = x; then
3533 CC=""
3534 else
3535 case $cross_compiling:$ac_tool_warned in
3536yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003537{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3538$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003539ac_tool_warned=yes ;;
3540esac
3541 CC=$ac_ct_CC
3542 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003543fi
3544
3545fi
3546
3547
Matthias Kloseb9621712010-04-24 17:59:49 +00003548test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3549$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003550as_fn_error $? "no acceptable C compiler found in \$PATH
Antoine Pitrou37009202011-07-08 23:47:50 +02003551See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003552
3553# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003554$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3555set X $ac_compile
3556ac_compiler=$2
3557for ac_option in --version -v -V -qversion; do
3558 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003559case "(($ac_try" in
3560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3561 *) ac_try_echo=$ac_try;;
3562esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003563eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3564$as_echo "$ac_try_echo"; } >&5
3565 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003566 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003567 if test -s conftest.err; then
3568 sed '10a\
3569... rest of stderr output deleted ...
3570 10q' conftest.err >conftest.er1
3571 cat conftest.er1 >&5
3572 fi
3573 rm -f conftest.er1 conftest.err
3574 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3575 test $ac_status = 0; }
3576done
Martin v. Löwis11437992002-04-12 09:54:03 +00003577
Matthias Kloseb9621712010-04-24 17:59:49 +00003578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003579/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003580
Martin v. Löwis11437992002-04-12 09:54:03 +00003581int
3582main ()
3583{
3584
3585 ;
3586 return 0;
3587}
3588_ACEOF
3589ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003590ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003591# Try to create an executable without -o first, disregard a.out.
3592# It will help us diagnose broken compilers, and finding out an intuition
3593# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3595$as_echo_n "checking whether the C compiler works... " >&6; }
3596ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3597
3598# The possible output files:
3599ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3600
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003601ac_rmfiles=
3602for ac_file in $ac_files
3603do
3604 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003605 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003606 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3607 esac
3608done
3609rm -f $ac_rmfiles
3610
Matthias Kloseb9621712010-04-24 17:59:49 +00003611if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003612case "(($ac_try" in
3613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3614 *) ac_try_echo=$ac_try;;
3615esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003616eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3617$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003618 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003619 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003620 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3621 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003622 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3623# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3624# in a Makefile. We should not override ac_cv_exeext if it was cached,
3625# so that the user can short-circuit this test for compilers unknown to
3626# Autoconf.
3627for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003628do
3629 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003630 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003632 ;;
3633 [ab].out )
3634 # We found the default executable, but exeext='' is most
3635 # certainly right.
3636 break;;
3637 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003639 then :; else
3640 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3641 fi
3642 # We set ac_cv_exeext here because the later test for it is not
3643 # safe: cross compilers may not add the suffix if given an `-o'
3644 # argument, so we may need to know it at that point already.
3645 # Even if this section looks crufty: it has the advantage of
3646 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003647 break;;
3648 * )
3649 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003650 esac
3651done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003652test "$ac_cv_exeext" = no && ac_cv_exeext=
3653
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003654else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003655 ac_file=''
3656fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003657if test -z "$ac_file"; then :
3658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3659$as_echo "no" >&6; }
3660$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003661sed 's/^/| /' conftest.$ac_ext >&5
3662
Matthias Kloseb9621712010-04-24 17:59:49 +00003663{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3664$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003665as_fn_error 77 "C compiler cannot create executables
Antoine Pitrou37009202011-07-08 23:47:50 +02003666See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003667else
3668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3669$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003670fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3672$as_echo_n "checking for C compiler default output file name... " >&6; }
3673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3674$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003675ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003676
Matthias Kloseb9621712010-04-24 17:59:49 +00003677rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003678ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3680$as_echo_n "checking for suffix of executables... " >&6; }
3681if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003682case "(($ac_try" in
3683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3684 *) ac_try_echo=$ac_try;;
3685esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003686eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3687$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003688 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003689 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003690 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3691 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003692 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3693# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3694# work properly (i.e., refer to `conftest.exe'), while it won't with
3695# `rm'.
3696for ac_file in conftest.exe conftest conftest.*; do
3697 test -f "$ac_file" || continue
3698 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003699 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003700 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3701 break;;
3702 * ) break;;
3703 esac
3704done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003705else
Matthias Kloseb9621712010-04-24 17:59:49 +00003706 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3707$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003708as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Antoine Pitrou37009202011-07-08 23:47:50 +02003709See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003711rm -f conftest conftest$ac_cv_exeext
3712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3713$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003714
3715rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003716EXEEXT=$ac_cv_exeext
3717ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3719/* end confdefs.h. */
3720#include <stdio.h>
3721int
3722main ()
3723{
3724FILE *f = fopen ("conftest.out", "w");
3725 return ferror (f) || fclose (f) != 0;
3726
3727 ;
3728 return 0;
3729}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003731ac_clean_files="$ac_clean_files conftest.out"
3732# Check that the compiler produces executables we can run. If not, either
3733# the compiler is broken, or we cross compile.
3734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3735$as_echo_n "checking whether we are cross compiling... " >&6; }
3736if test "$cross_compiling" != yes; then
3737 { { ac_try="$ac_link"
3738case "(($ac_try" in
3739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3740 *) ac_try_echo=$ac_try;;
3741esac
3742eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3743$as_echo "$ac_try_echo"; } >&5
3744 (eval "$ac_link") 2>&5
3745 ac_status=$?
3746 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3747 test $ac_status = 0; }
3748 if { ac_try='./conftest$ac_cv_exeext'
3749 { { case "(($ac_try" in
3750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3751 *) ac_try_echo=$ac_try;;
3752esac
3753eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3754$as_echo "$ac_try_echo"; } >&5
3755 (eval "$ac_try") 2>&5
3756 ac_status=$?
3757 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3758 test $ac_status = 0; }; }; then
3759 cross_compiling=no
3760 else
3761 if test "$cross_compiling" = maybe; then
3762 cross_compiling=yes
3763 else
3764 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3765$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003766as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003767If you meant to cross compile, use \`--host'.
Antoine Pitrou37009202011-07-08 23:47:50 +02003768See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 fi
3770 fi
3771fi
3772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3773$as_echo "$cross_compiling" >&6; }
3774
3775rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3776ac_clean_files=$ac_clean_files_save
3777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3778$as_echo_n "checking for suffix of object files... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02003779if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003780 $as_echo_n "(cached) " >&6
3781else
3782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003783/* end confdefs.h. */
3784
3785int
3786main ()
3787{
3788
3789 ;
3790 return 0;
3791}
3792_ACEOF
3793rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003794if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003795case "(($ac_try" in
3796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3797 *) ac_try_echo=$ac_try;;
3798esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003799eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3800$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003801 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003802 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3804 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003805 for ac_file in conftest.o conftest.obj conftest.*; do
3806 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003807 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003808 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003809 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3810 break;;
3811 esac
3812done
3813else
Matthias Kloseb9621712010-04-24 17:59:49 +00003814 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003815sed 's/^/| /' conftest.$ac_ext >&5
3816
Matthias Kloseb9621712010-04-24 17:59:49 +00003817{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3818$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003819as_fn_error $? "cannot compute suffix of object files: cannot compile
Antoine Pitrou37009202011-07-08 23:47:50 +02003820See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003821fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003822rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3825$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003826OBJEXT=$ac_cv_objext
3827ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3829$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02003830if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003831 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003832else
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003834/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003835
Martin v. Löwis11437992002-04-12 09:54:03 +00003836int
3837main ()
3838{
3839#ifndef __GNUC__
3840 choke me
3841#endif
3842
3843 ;
3844 return 0;
3845}
3846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003847if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003848 ac_compiler_gnu=yes
3849else
Matthias Kloseb9621712010-04-24 17:59:49 +00003850 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003853ac_cv_c_compiler_gnu=$ac_compiler_gnu
3854
3855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3857$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3858if test $ac_compiler_gnu = yes; then
3859 GCC=yes
3860else
3861 GCC=
3862fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003863ac_test_CFLAGS=${CFLAGS+set}
3864ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3866$as_echo_n "checking whether $CC accepts -g... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02003867if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003868 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003869else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003870 ac_save_c_werror_flag=$ac_c_werror_flag
3871 ac_c_werror_flag=yes
3872 ac_cv_prog_cc_g=no
3873 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003875/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003876
Martin v. Löwis11437992002-04-12 09:54:03 +00003877int
3878main ()
3879{
3880
3881 ;
3882 return 0;
3883}
3884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003885if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003886 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003887else
Matthias Kloseb9621712010-04-24 17:59:49 +00003888 CFLAGS=""
3889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003890/* end confdefs.h. */
3891
3892int
3893main ()
3894{
3895
3896 ;
3897 return 0;
3898}
3899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003900if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003901
Matthias Kloseb9621712010-04-24 17:59:49 +00003902else
3903 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003904 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003906/* end confdefs.h. */
3907
3908int
3909main ()
3910{
3911
3912 ;
3913 return 0;
3914}
3915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003916if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003917 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003920fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3922fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3924 ac_c_werror_flag=$ac_save_c_werror_flag
3925fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3927$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003928if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003929 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003930elif test $ac_cv_prog_cc_g = yes; then
3931 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003932 CFLAGS="-g -O2"
3933 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003934 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003935 fi
3936else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003937 if test "$GCC" = yes; then
3938 CFLAGS="-O2"
3939 else
3940 CFLAGS=
3941 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003942fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3944$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02003945if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003946 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003947else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003949ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003951/* end confdefs.h. */
3952#include <stdarg.h>
3953#include <stdio.h>
3954#include <sys/types.h>
3955#include <sys/stat.h>
3956/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3957struct buf { int x; };
3958FILE * (*rcsopen) (struct buf *, struct stat *, int);
3959static char *e (p, i)
3960 char **p;
3961 int i;
3962{
3963 return p[i];
3964}
3965static char *f (char * (*g) (char **, int), char **p, ...)
3966{
3967 char *s;
3968 va_list v;
3969 va_start (v,p);
3970 s = g (p, va_arg (v,int));
3971 va_end (v);
3972 return s;
3973}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003974
3975/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3976 function prototypes and stuff, but not '\xHH' hex character constants.
3977 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003978 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003979 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3980 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003981 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003982int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3983
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003984/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3985 inside strings and character constants. */
3986#define FOO(x) 'x'
3987int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3988
Skip Montanaro6dead952003-09-25 14:50:04 +00003989int test (int i, double x);
3990struct s1 {int (*f) (int a);};
3991struct s2 {int (*f) (double a);};
3992int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3993int argc;
3994char **argv;
3995int
3996main ()
3997{
3998return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3999 ;
4000 return 0;
4001}
4002_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004003for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4004 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004005do
4006 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004007 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004008 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004010rm -f core conftest.err conftest.$ac_objext
4011 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004012done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004013rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004014CC=$ac_save_CC
4015
4016fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004017# AC_CACHE_VAL
4018case "x$ac_cv_prog_cc_c89" in
4019 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4021$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004022 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4024$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004025 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004026 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4028$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004029esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004030if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004031
Matthias Kloseb9621712010-04-24 17:59:49 +00004032fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004033
Martin v. Löwis11437992002-04-12 09:54:03 +00004034ac_ext=c
4035ac_cpp='$CPP $CPPFLAGS'
4036ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4037ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4038ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004039
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004040
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004041
4042
Matthias Kloseb9621712010-04-24 17:59:49 +00004043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4044$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004045
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004046# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004047if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004048 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004049
4050 case $withval in
4051 no) with_cxx_main=no
4052 MAINCC='$(CC)';;
4053 yes) with_cxx_main=yes
4054 MAINCC='$(CXX)';;
4055 *) with_cxx_main=yes
4056 MAINCC=$withval
4057 if test -z "$CXX"
4058 then
4059 CXX=$withval
4060 fi;;
4061 esac
4062else
4063
4064 with_cxx_main=no
4065 MAINCC='$(CC)'
4066
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004067fi
4068
Matthias Kloseb9621712010-04-24 17:59:49 +00004069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4070$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004071
4072preset_cxx="$CXX"
4073if test -z "$CXX"
4074then
4075 case "$CC" in
4076 gcc) # Extract the first word of "g++", so it can be a program name with args.
4077set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4079$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02004080if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004081 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004082else
4083 case $CXX in
4084 [\\/]* | ?:[\\/]*)
4085 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4086 ;;
4087 *)
4088 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4089for as_dir in notfound
4090do
4091 IFS=$as_save_IFS
4092 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004093 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004094 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 +00004095 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004096 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004097 break 2
4098 fi
4099done
Matthias Kloseb9621712010-04-24 17:59:49 +00004100 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004101IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004102
4103 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4104 ;;
4105esac
4106fi
4107CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004108if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4110$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004111else
Matthias Kloseb9621712010-04-24 17:59:49 +00004112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4113$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004114fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004115
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004116 ;;
4117 cc) # Extract the first word of "c++", so it can be a program name with args.
4118set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4120$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02004121if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004123else
4124 case $CXX in
4125 [\\/]* | ?:[\\/]*)
4126 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4127 ;;
4128 *)
4129 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4130for as_dir in notfound
4131do
4132 IFS=$as_save_IFS
4133 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004134 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004135 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 +00004136 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004137 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004138 break 2
4139 fi
4140done
Matthias Kloseb9621712010-04-24 17:59:49 +00004141 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004142IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004143
4144 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4145 ;;
4146esac
4147fi
4148CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004149if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4151$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004152else
Matthias Kloseb9621712010-04-24 17:59:49 +00004153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4154$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004156
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004157 ;;
4158 esac
4159 if test "$CXX" = "notfound"
4160 then
4161 CXX=""
4162 fi
4163fi
4164if test -z "$CXX"
4165then
4166 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4167do
4168 # Extract the first word of "$ac_prog", so it can be a program name with args.
4169set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4171$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02004172if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004173 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004174else
4175 if test -n "$CXX"; then
4176 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4177else
4178as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4179for as_dir in $PATH
4180do
4181 IFS=$as_save_IFS
4182 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004183 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004184 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 +00004185 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004186 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004187 break 2
4188 fi
4189done
Matthias Kloseb9621712010-04-24 17:59:49 +00004190 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004191IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004192
4193fi
4194fi
4195CXX=$ac_cv_prog_CXX
4196if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4198$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004199else
Matthias Kloseb9621712010-04-24 17:59:49 +00004200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4201$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004202fi
4203
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004204
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004205 test -n "$CXX" && break
4206done
4207test -n "$CXX" || CXX="notfound"
4208
4209 if test "$CXX" = "notfound"
4210 then
4211 CXX=""
4212 fi
4213fi
4214if test "$preset_cxx" != "$CXX"
4215then
Matthias Kloseb9621712010-04-24 17:59:49 +00004216 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004217
4218 By default, distutils will build C++ extension modules with \"$CXX\".
4219 If this is not intended, then set CXX on the configure command line.
4220 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004221$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004222
4223 By default, distutils will build C++ extension modules with \"$CXX\".
4224 If this is not intended, then set CXX on the configure command line.
4225 " >&2;}
4226fi
4227
4228
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4230$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4231save_LDFLAGS="$LDFLAGS"
4232LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004233
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4235/* end confdefs.h. */
4236
4237int
4238main ()
4239{
4240
4241 ;
4242 return 0;
4243}
4244_ACEOF
4245if ac_fn_c_try_link "$LINENO"; then :
4246 NO_AS_NEEDED="-Wl,--no-as-needed"
4247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4248$as_echo "yes" >&6; }
4249else
4250 NO_AS_NEEDED=""
4251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4252$as_echo "no" >&6; }
4253fi
4254rm -f core conftest.err conftest.$ac_objext \
4255 conftest$ac_exeext conftest.$ac_ext
4256LDFLAGS="$save_LDFLAGS"
4257
4258
4259
4260# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004261ac_ext=c
4262ac_cpp='$CPP $CPPFLAGS'
4263ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4264ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4265ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4267$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004268# On Suns, sometimes $CPP names a directory.
4269if test -n "$CPP" && test -d "$CPP"; then
4270 CPP=
4271fi
4272if test -z "$CPP"; then
Antoine Pitrou37009202011-07-08 23:47:50 +02004273 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004274 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004275else
Martin v. Löwis11437992002-04-12 09:54:03 +00004276 # Double quotes because CPP needs to be expanded
4277 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4278 do
4279 ac_preproc_ok=false
4280for ac_c_preproc_warn_flag in '' yes
4281do
4282 # Use a header file that comes with gcc, so configuring glibc
4283 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004284 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4285 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004286 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004287 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004289/* end confdefs.h. */
4290#ifdef __STDC__
4291# include <limits.h>
4292#else
4293# include <assert.h>
4294#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004295 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004297if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004298
Matthias Kloseb9621712010-04-24 17:59:49 +00004299else
Martin v. Löwis11437992002-04-12 09:54:03 +00004300 # Broken: fails on valid input.
4301continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004302fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004303rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004304
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004305 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004306 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004308/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004309#include <ac_nonexistent.h>
4310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004311if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004312 # Broken: success on invalid input.
4313continue
4314else
Martin v. Löwis11437992002-04-12 09:54:03 +00004315 # Passes both tests.
4316ac_preproc_ok=:
4317break
4318fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004319rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004320
4321done
4322# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004323rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004324if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004325 break
4326fi
4327
4328 done
4329 ac_cv_prog_CPP=$CPP
4330
4331fi
4332 CPP=$ac_cv_prog_CPP
4333else
4334 ac_cv_prog_CPP=$CPP
4335fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4337$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004338ac_preproc_ok=false
4339for ac_c_preproc_warn_flag in '' yes
4340do
4341 # Use a header file that comes with gcc, so configuring glibc
4342 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004343 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4344 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004345 # On the NeXT, cc -E runs the code through the compiler's parser,
4346 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004348/* end confdefs.h. */
4349#ifdef __STDC__
4350# include <limits.h>
4351#else
4352# include <assert.h>
4353#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004354 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004356if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004357
Matthias Kloseb9621712010-04-24 17:59:49 +00004358else
Martin v. Löwis11437992002-04-12 09:54:03 +00004359 # Broken: fails on valid input.
4360continue
4361fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004362rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004363
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004364 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004365 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004367/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004368#include <ac_nonexistent.h>
4369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004370if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004371 # Broken: success on invalid input.
4372continue
4373else
Martin v. Löwis11437992002-04-12 09:54:03 +00004374 # Passes both tests.
4375ac_preproc_ok=:
4376break
4377fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004378rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004379
4380done
4381# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004382rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004383if $ac_preproc_ok; then :
4384
Martin v. Löwis11437992002-04-12 09:54:03 +00004385else
Matthias Kloseb9621712010-04-24 17:59:49 +00004386 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4387$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004388as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Antoine Pitrou37009202011-07-08 23:47:50 +02004389See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004390fi
4391
4392ac_ext=c
4393ac_cpp='$CPP $CPPFLAGS'
4394ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4395ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4396ac_compiler_gnu=$ac_cv_c_compiler_gnu
4397
4398
Matthias Kloseb9621712010-04-24 17:59:49 +00004399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4400$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02004401if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004402 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004403else
Matthias Kloseb9621712010-04-24 17:59:49 +00004404 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004405 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004406 # Loop through the user's path and test for each of PROGNAME-LIST
4407 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004408for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4409do
4410 IFS=$as_save_IFS
4411 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004412 for ac_prog in grep ggrep; do
4413 for ac_exec_ext in '' $ac_executable_extensions; do
4414 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4415 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4416# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004417 # Check for GNU $ac_path_GREP
4418case `"$ac_path_GREP" --version 2>&1` in
4419*GNU*)
4420 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4421*)
4422 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004423 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004424 while :
4425 do
4426 cat "conftest.in" "conftest.in" >"conftest.tmp"
4427 mv "conftest.tmp" "conftest.in"
4428 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004429 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004430 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4431 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004432 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004433 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4434 # Best one so far, save it but keep looking for a better one
4435 ac_cv_path_GREP="$ac_path_GREP"
4436 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004437 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004438 # 10*(2^10) chars as input seems more than enough
4439 test $ac_count -gt 10 && break
4440 done
4441 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4442esac
4443
Matthias Kloseb9621712010-04-24 17:59:49 +00004444 $ac_path_GREP_found && break 3
4445 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004446 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004447 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004448IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004449 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004450 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 +00004451 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004452else
4453 ac_cv_path_GREP=$GREP
4454fi
4455
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004456fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4458$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004459 GREP="$ac_cv_path_GREP"
4460
4461
Matthias Kloseb9621712010-04-24 17:59:49 +00004462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4463$as_echo_n "checking for egrep... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02004464if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004465 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004466else
4467 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4468 then ac_cv_path_EGREP="$GREP -E"
4469 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004470 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004471 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004472 # Loop through the user's path and test for each of PROGNAME-LIST
4473 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004474for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4475do
4476 IFS=$as_save_IFS
4477 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004478 for ac_prog in egrep; do
4479 for ac_exec_ext in '' $ac_executable_extensions; do
4480 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4481 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4482# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004483 # Check for GNU $ac_path_EGREP
4484case `"$ac_path_EGREP" --version 2>&1` in
4485*GNU*)
4486 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4487*)
4488 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004489 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004490 while :
4491 do
4492 cat "conftest.in" "conftest.in" >"conftest.tmp"
4493 mv "conftest.tmp" "conftest.in"
4494 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004495 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004496 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4497 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004498 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004499 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4500 # Best one so far, save it but keep looking for a better one
4501 ac_cv_path_EGREP="$ac_path_EGREP"
4502 ac_path_EGREP_max=$ac_count
4503 fi
4504 # 10*(2^10) chars as input seems more than enough
4505 test $ac_count -gt 10 && break
4506 done
4507 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4508esac
4509
Matthias Kloseb9621712010-04-24 17:59:49 +00004510 $ac_path_EGREP_found && break 3
4511 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004512 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004513 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004514IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004515 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004516 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 +00004517 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004518else
4519 ac_cv_path_EGREP=$EGREP
4520fi
4521
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004522 fi
4523fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4525$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004526 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004527
4528
Matthias Kloseb9621712010-04-24 17:59:49 +00004529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4530$as_echo_n "checking for ANSI C header files... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02004531if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004532 $as_echo_n "(cached) " >&6
4533else
4534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004535/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004536#include <stdlib.h>
4537#include <stdarg.h>
4538#include <string.h>
4539#include <float.h>
4540
4541int
4542main ()
4543{
4544
4545 ;
4546 return 0;
4547}
4548_ACEOF
4549if ac_fn_c_try_compile "$LINENO"; then :
4550 ac_cv_header_stdc=yes
4551else
4552 ac_cv_header_stdc=no
4553fi
4554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4555
4556if test $ac_cv_header_stdc = yes; then
4557 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4559/* end confdefs.h. */
4560#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004561
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004562_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004563if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004564 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004565
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004566else
Matthias Kloseb9621712010-04-24 17:59:49 +00004567 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004568fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004569rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004570
Matthias Kloseb9621712010-04-24 17:59:49 +00004571fi
4572
4573if test $ac_cv_header_stdc = yes; then
4574 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4576/* end confdefs.h. */
4577#include <stdlib.h>
4578
4579_ACEOF
4580if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4581 $EGREP "free" >/dev/null 2>&1; then :
4582
4583else
4584 ac_cv_header_stdc=no
4585fi
4586rm -f conftest*
4587
4588fi
4589
4590if test $ac_cv_header_stdc = yes; then
4591 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4592 if test "$cross_compiling" = yes; then :
4593 :
4594else
4595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4596/* end confdefs.h. */
4597#include <ctype.h>
4598#include <stdlib.h>
4599#if ((' ' & 0x0FF) == 0x020)
4600# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4601# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4602#else
4603# define ISLOWER(c) \
4604 (('a' <= (c) && (c) <= 'i') \
4605 || ('j' <= (c) && (c) <= 'r') \
4606 || ('s' <= (c) && (c) <= 'z'))
4607# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4608#endif
4609
4610#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4611int
4612main ()
4613{
4614 int i;
4615 for (i = 0; i < 256; i++)
4616 if (XOR (islower (i), ISLOWER (i))
4617 || toupper (i) != TOUPPER (i))
4618 return 2;
4619 return 0;
4620}
4621_ACEOF
4622if ac_fn_c_try_run "$LINENO"; then :
4623
4624else
4625 ac_cv_header_stdc=no
4626fi
4627rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4628 conftest.$ac_objext conftest.beam conftest.$ac_ext
4629fi
4630
4631fi
4632fi
4633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4634$as_echo "$ac_cv_header_stdc" >&6; }
4635if test $ac_cv_header_stdc = yes; then
4636
4637$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4638
4639fi
4640
4641# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4642for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4643 inttypes.h stdint.h unistd.h
4644do :
4645 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4646ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4647"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004648if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004649 cat >>confdefs.h <<_ACEOF
4650#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4651_ACEOF
4652
4653fi
4654
4655done
4656
4657
4658
4659 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Antoine Pitrou37009202011-07-08 23:47:50 +02004660if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004661 MINIX=yes
4662else
4663 MINIX=
4664fi
4665
4666
4667 if test "$MINIX" = yes; then
4668
4669$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4670
4671
4672$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4673
4674
4675$as_echo "#define _MINIX 1" >>confdefs.h
4676
4677 fi
4678
4679
4680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4681$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02004682if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004683 $as_echo_n "(cached) " >&6
4684else
4685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4686/* end confdefs.h. */
4687
4688# define __EXTENSIONS__ 1
4689 $ac_includes_default
4690int
4691main ()
4692{
4693
4694 ;
4695 return 0;
4696}
4697_ACEOF
4698if ac_fn_c_try_compile "$LINENO"; then :
4699 ac_cv_safe_to_define___extensions__=yes
4700else
4701 ac_cv_safe_to_define___extensions__=no
4702fi
4703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4704fi
4705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4706$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4707 test $ac_cv_safe_to_define___extensions__ = yes &&
4708 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4709
4710 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4711
4712 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4713
4714 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4715
4716 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4717
4718
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004719
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004720# Check for unsupported systems
4721case $ac_sys_system/$ac_sys_release in
4722atheos*|Linux*/1*)
4723 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4724 echo See README for details.
4725 exit 1;;
4726esac
4727
4728
Matthias Kloseb9621712010-04-24 17:59:49 +00004729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4730$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004731
4732# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004733if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004734 withval=$with_suffix;
4735 case $withval in
4736 no) EXEEXT=;;
4737 yes) EXEEXT=.exe;;
4738 *) EXEEXT=$withval;;
4739 esac
4740fi
4741
Matthias Kloseb9621712010-04-24 17:59:49 +00004742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4743$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004744
4745# Test whether we're running on a non-case-sensitive system, in which
4746# case we give a warning if no ext is given
4747
Matthias Kloseb9621712010-04-24 17:59:49 +00004748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4749$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004750if test ! -d CaseSensitiveTestDir; then
4751mkdir CaseSensitiveTestDir
4752fi
4753
4754if test -d casesensitivetestdir
4755then
Matthias Kloseb9621712010-04-24 17:59:49 +00004756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4757$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004758 BUILDEXEEXT=.exe
4759else
Matthias Kloseb9621712010-04-24 17:59:49 +00004760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4761$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004762 BUILDEXEEXT=$EXEEXT
4763fi
4764rmdir CaseSensitiveTestDir
4765
4766case $MACHDEP in
4767bsdos*)
4768 case $CC in
4769 gcc) CC="$CC -D_HAVE_BSDI";;
4770 esac;;
4771esac
4772
4773case $ac_sys_system in
4774hp*|HP*)
4775 case $CC in
4776 cc|*/cc) CC="$CC -Ae";;
4777 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004778esac
4779
4780
4781
Matthias Kloseb9621712010-04-24 17:59:49 +00004782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4783$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004784if test -z "$LIBRARY"
4785then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004786 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4789$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004790
4791# LDLIBRARY is the name of the library to link against (as opposed to the
4792# name of the library into which to insert object files). BLDLIBRARY is also
4793# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4794# is blank as the main program is not linked directly against LDLIBRARY.
4795# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4796# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4797# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4798# DLLLIBRARY is the shared (i.e., DLL) library.
4799#
4800# RUNSHARED is used to run shared python without installed libraries
4801#
4802# INSTSONAME is the name of the shared library that will be use to install
4803# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004804#
4805# LDVERSION is the shared library version number, normally the Python version
4806# with the ABI build flags appended.
4807
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004808
4809
4810
4811
4812
4813
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004814
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004815LDLIBRARY="$LIBRARY"
4816BLDLIBRARY='$(LDLIBRARY)'
4817INSTSONAME='$(LDLIBRARY)'
4818DLLLIBRARY=''
4819LDLIBRARYDIR=''
4820RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004821LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004822
4823# LINKCC is the command that links the python executable -- default is $(CC).
4824# If CXX is set, and if it is needed to link a main function that was
4825# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4826# python might then depend on the C++ runtime
4827# This is altered for AIX in order to build the export list before
4828# linking.
4829
Matthias Kloseb9621712010-04-24 17:59:49 +00004830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4831$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004832if test -z "$LINKCC"
4833then
4834 LINKCC='$(PURIFY) $(MAINCC)'
4835 case $ac_sys_system in
4836 AIX*)
4837 exp_extra="\"\""
4838 if test $ac_sys_release -ge 5 -o \
4839 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4840 exp_extra="."
4841 fi
4842 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004843 QNX*)
4844 # qcc must be used because the other compilers do not
4845 # support -N.
4846 LINKCC=qcc;;
4847 esac
4848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4850$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004851
4852# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4853# make sure we default having it set to "no": this is used by
4854# distutils.unixccompiler to know if it should add --enable-new-dtags
4855# to linker command lines, and failing to detect GNU ld simply results
4856# in the same bahaviour as before.
4857
Matthias Kloseb9621712010-04-24 17:59:49 +00004858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4859$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004860ac_prog=ld
4861if test "$GCC" = yes; then
4862 ac_prog=`$CC -print-prog-name=ld`
4863fi
4864case `"$ac_prog" -V 2>&1 < /dev/null` in
4865 *GNU*)
4866 GNULD=yes;;
4867 *)
4868 GNULD=no;;
4869esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4871$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004872
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4874$as_echo_n "checking for inline... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02004875if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004876 $as_echo_n "(cached) " >&6
4877else
4878 ac_cv_c_inline=no
4879for ac_kw in inline __inline__ __inline; do
4880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4881/* end confdefs.h. */
4882#ifndef __cplusplus
4883typedef int foo_t;
4884static $ac_kw foo_t static_foo () {return 0; }
4885$ac_kw foo_t foo () {return 0; }
4886#endif
4887
4888_ACEOF
4889if ac_fn_c_try_compile "$LINENO"; then :
4890 ac_cv_c_inline=$ac_kw
4891fi
4892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4893 test "$ac_cv_c_inline" != no && break
4894done
4895
4896fi
4897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4898$as_echo "$ac_cv_c_inline" >&6; }
4899
4900case $ac_cv_c_inline in
4901 inline | yes) ;;
4902 *)
4903 case $ac_cv_c_inline in
4904 no) ac_val=;;
4905 *) ac_val=$ac_cv_c_inline;;
4906 esac
4907 cat >>confdefs.h <<_ACEOF
4908#ifndef __cplusplus
4909#define inline $ac_val
4910#endif
4911_ACEOF
4912 ;;
4913esac
4914
4915if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004916
4917$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004918
4919
4920fi
4921
4922
Matthias Kloseb9621712010-04-24 17:59:49 +00004923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4924$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004925# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004926if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004927 enableval=$enable_shared;
4928fi
4929
4930
4931if test -z "$enable_shared"
4932then
4933 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004934 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004935 enable_shared="yes";;
4936 *)
4937 enable_shared="no";;
4938 esac
4939fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4941$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004942
Matthias Kloseb9621712010-04-24 17:59:49 +00004943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4944$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004945# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004946if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004947 enableval=$enable_profiling; ac_save_cc="$CC"
4948 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004949 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004950 ac_enable_profiling="no"
4951else
Matthias Kloseb9621712010-04-24 17:59:49 +00004952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004953/* end confdefs.h. */
4954int main() { return 0; }
4955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004956if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004957 ac_enable_profiling="yes"
4958else
Matthias Kloseb9621712010-04-24 17:59:49 +00004959 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4962 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004963fi
4964
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004965 CC="$ac_save_cc"
4966fi
4967
Matthias Kloseb9621712010-04-24 17:59:49 +00004968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4969$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004970
4971case "$ac_enable_profiling" in
4972 "yes")
4973 BASECFLAGS="-pg $BASECFLAGS"
4974 LDFLAGS="-pg $LDFLAGS"
4975 ;;
4976esac
4977
Matthias Kloseb9621712010-04-24 17:59:49 +00004978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4979$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004980
4981# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4982# library that we build, but we do not want to link against it (we
4983# will find it with a -framework option). For this reason there is an
4984# extra variable BLDLIBRARY against which Python and the extension
4985# modules are linked, BLDLIBRARY. This is normally the same as
4986# LDLIBRARY, but empty for MacOSX framework builds.
4987if test "$enable_framework"
4988then
4989 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4990 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4991 BLDLIBRARY=''
4992else
4993 BLDLIBRARY='$(LDLIBRARY)'
4994fi
4995
4996# Other platforms follow
4997if test $enable_shared = "yes"; then
4998
Matthias Kloseb9621712010-04-24 17:59:49 +00004999$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005000
5001 case $ac_sys_system in
5002 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005003 LDLIBRARY='libpython$(LDVERSION).dll.a'
5004 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005005 ;;
5006 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005007 LDLIBRARY='libpython$(LDVERSION).so'
5008 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005009 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5010 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005011 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005012 then
5013 PY3LIBRARY=libpython3.so
5014 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005015 ;;
5016 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005017 LDLIBRARY='libpython$(LDVERSION).so'
5018 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005019 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5020 case $ac_sys_system in
5021 FreeBSD*)
5022 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5023 ;;
5024 esac
5025 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005026 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005027 then
5028 PY3LIBRARY=libpython3.so
5029 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005030 ;;
5031 hp*|HP*)
5032 case `uname -m` in
5033 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005034 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005035 ;;
5036 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005037 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005038 ;;
5039 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005040 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005041 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5042 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005043 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005044 LDLIBRARY='libpython$(LDVERSION).dylib'
5045 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005046 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5047 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005048 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005049 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005050 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5051 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005052
5053 esac
5054else # shared is disabled
5055 case $ac_sys_system in
5056 CYGWIN*)
5057 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005058 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005059 ;;
5060 esac
5061fi
5062
Matthias Kloseb9621712010-04-24 17:59:49 +00005063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5064$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005065
5066if test -n "$ac_tool_prefix"; then
5067 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5068set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5070$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02005071if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005072 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005073else
5074 if test -n "$RANLIB"; then
5075 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5076else
5077as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5078for as_dir in $PATH
5079do
5080 IFS=$as_save_IFS
5081 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005082 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005083 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5084 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005085 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005086 break 2
5087 fi
5088done
Matthias Kloseb9621712010-04-24 17:59:49 +00005089 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005090IFS=$as_save_IFS
5091
5092fi
5093fi
5094RANLIB=$ac_cv_prog_RANLIB
5095if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5097$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005098else
Matthias Kloseb9621712010-04-24 17:59:49 +00005099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5100$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005101fi
5102
5103
5104fi
5105if test -z "$ac_cv_prog_RANLIB"; then
5106 ac_ct_RANLIB=$RANLIB
5107 # Extract the first word of "ranlib", so it can be a program name with args.
5108set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5110$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02005111if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005112 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005113else
5114 if test -n "$ac_ct_RANLIB"; then
5115 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5116else
5117as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5118for as_dir in $PATH
5119do
5120 IFS=$as_save_IFS
5121 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005122 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005123 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5124 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005125 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005126 break 2
5127 fi
5128done
Matthias Kloseb9621712010-04-24 17:59:49 +00005129 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005130IFS=$as_save_IFS
5131
5132fi
5133fi
5134ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5135if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5137$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005138else
Matthias Kloseb9621712010-04-24 17:59:49 +00005139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5140$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005141fi
5142
5143 if test "x$ac_ct_RANLIB" = x; then
5144 RANLIB=":"
5145 else
5146 case $cross_compiling:$ac_tool_warned in
5147yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005148{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5149$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005150ac_tool_warned=yes ;;
5151esac
5152 RANLIB=$ac_ct_RANLIB
5153 fi
5154else
5155 RANLIB="$ac_cv_prog_RANLIB"
5156fi
5157
5158
5159for ac_prog in ar aal
5160do
5161 # Extract the first word of "$ac_prog", so it can be a program name with args.
5162set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5164$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02005165if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005166 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005167else
5168 if test -n "$AR"; then
5169 ac_cv_prog_AR="$AR" # Let the user override the test.
5170else
5171as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5172for as_dir in $PATH
5173do
5174 IFS=$as_save_IFS
5175 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005176 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005177 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5178 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005179 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005180 break 2
5181 fi
5182done
Matthias Kloseb9621712010-04-24 17:59:49 +00005183 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005184IFS=$as_save_IFS
5185
5186fi
5187fi
5188AR=$ac_cv_prog_AR
5189if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5191$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005192else
Matthias Kloseb9621712010-04-24 17:59:49 +00005193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5194$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005195fi
5196
5197
5198 test -n "$AR" && break
5199done
5200test -n "$AR" || AR="ar"
5201
5202
5203# tweak ARFLAGS only if the user didn't set it on the command line
5204
5205if test -z "$ARFLAGS"
5206then
5207 ARFLAGS="rc"
5208fi
5209
5210
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005211DISABLE_ASDLGEN=""
5212# Extract the first word of "python", so it can be a program name with args.
5213set dummy python; ac_word=$2
5214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5215$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02005216if ${ac_cv_prog_HAS_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005217 $as_echo_n "(cached) " >&6
5218else
5219 if test -n "$HAS_PYTHON"; then
5220 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5221else
5222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5223for as_dir in $PATH
5224do
5225 IFS=$as_save_IFS
5226 test -z "$as_dir" && as_dir=.
5227 for ac_exec_ext in '' $ac_executable_extensions; do
5228 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5229 ac_cv_prog_HAS_PYTHON="found"
5230 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5231 break 2
5232 fi
5233done
5234 done
5235IFS=$as_save_IFS
5236
5237 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5238fi
5239fi
5240HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5241if test -n "$HAS_PYTHON"; then
5242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5243$as_echo "$HAS_PYTHON" >&6; }
5244else
5245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5246$as_echo "no" >&6; }
5247fi
5248
5249
5250if test $HAS_HG != found -o $HAS_PYTHON != found
5251then
5252 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5253fi
5254
5255
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005256case $MACHDEP in
5257bsdos*|hp*|HP*)
5258 # install -d does not work on BSDI or HP-UX
5259 if test -z "$INSTALL"
5260 then
5261 INSTALL="${srcdir}/install-sh -c"
5262 fi
5263esac
5264ac_aux_dir=
5265for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005266 if test -f "$ac_dir/install-sh"; then
5267 ac_aux_dir=$ac_dir
5268 ac_install_sh="$ac_aux_dir/install-sh -c"
5269 break
5270 elif test -f "$ac_dir/install.sh"; then
5271 ac_aux_dir=$ac_dir
5272 ac_install_sh="$ac_aux_dir/install.sh -c"
5273 break
5274 elif test -f "$ac_dir/shtool"; then
5275 ac_aux_dir=$ac_dir
5276 ac_install_sh="$ac_aux_dir/shtool install -c"
5277 break
5278 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005279done
5280if test -z "$ac_aux_dir"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005281 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005282fi
5283
5284# These three variables are undocumented and unsupported,
5285# and are intended to be withdrawn in a future Autoconf release.
5286# They can cause serious problems if a builder's source tree is in a directory
5287# whose full name contains unusual characters.
5288ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5289ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5290ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5291
5292
5293# Find a good install program. We prefer a C program (faster),
5294# so one script is as good as another. But avoid the broken or
5295# incompatible versions:
5296# SysV /etc/install, /usr/sbin/install
5297# SunOS /usr/etc/install
5298# IRIX /sbin/install
5299# AIX /bin/install
5300# AmigaOS /C/install, which installs bootblocks on floppy discs
5301# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5302# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5303# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5304# OS/2's system install, which has a completely different semantic
5305# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005306# Reject install programs that cannot install multiple files.
5307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5308$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005309if test -z "$INSTALL"; then
Antoine Pitrou37009202011-07-08 23:47:50 +02005310if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005311 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005312else
5313 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5314for as_dir in $PATH
5315do
5316 IFS=$as_save_IFS
5317 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005318 # Account for people who put trailing slashes in PATH elements.
5319case $as_dir/ in #((
5320 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005321 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005322 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005323 /usr/ucb/* ) ;;
5324 *)
5325 # OSF1 and SCO ODT 3.0 have their own names for install.
5326 # Don't use installbsd from OSF since it installs stuff as root
5327 # by default.
5328 for ac_prog in ginstall scoinst install; do
5329 for ac_exec_ext in '' $ac_executable_extensions; do
5330 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5331 if test $ac_prog = install &&
5332 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5333 # AIX install. It has an incompatible calling convention.
5334 :
5335 elif test $ac_prog = install &&
5336 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5337 # program-specific install script used by HP pwplus--don't use.
5338 :
5339 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005340 rm -rf conftest.one conftest.two conftest.dir
5341 echo one > conftest.one
5342 echo two > conftest.two
5343 mkdir conftest.dir
5344 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5345 test -s conftest.one && test -s conftest.two &&
5346 test -s conftest.dir/conftest.one &&
5347 test -s conftest.dir/conftest.two
5348 then
5349 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5350 break 3
5351 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005352 fi
5353 fi
5354 done
5355 done
5356 ;;
5357esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005358
5359 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005360IFS=$as_save_IFS
5361
Matthias Kloseb9621712010-04-24 17:59:49 +00005362rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005363
5364fi
5365 if test "${ac_cv_path_install+set}" = set; then
5366 INSTALL=$ac_cv_path_install
5367 else
5368 # As a last resort, use the slow shell script. Don't cache a
5369 # value for INSTALL within a source directory, because that will
5370 # break other packages using the cache if that directory is
5371 # removed, or if the value is a relative name.
5372 INSTALL=$ac_install_sh
5373 fi
5374fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5376$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005377
5378# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5379# It thinks the first close brace ends the variable substitution.
5380test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5381
5382test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5383
5384test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5385
5386
5387# Not every filesystem supports hard links
5388
5389if test -z "$LN" ; then
5390 case $ac_sys_system in
5391 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005392 *) LN=ln;;
5393 esac
5394fi
5395
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005396# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005397
5398ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005399
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005400# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5402$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005403
5404# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005405if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005406 withval=$with_pydebug;
5407if test "$withval" != no
5408then
5409
Matthias Kloseb9621712010-04-24 17:59:49 +00005410$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005411
Matthias Kloseb9621712010-04-24 17:59:49 +00005412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5413$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005414 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005415 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005416else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5417$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005418fi
5419else
Matthias Kloseb9621712010-04-24 17:59:49 +00005420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5421$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005422fi
5423
5424
5425# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5426# merged with this chunk of code?
5427
5428# Optimizer/debugger flags
5429# ------------------------
5430# (The following bit of code is complicated enough - please keep things
5431# indented properly. Just pretend you're editing Python code. ;-)
5432
5433# There are two parallel sets of case statements below, one that checks to
5434# see if OPT was set and one that does BASECFLAGS setting based upon
5435# compiler and platform. BASECFLAGS tweaks need to be made even if the
5436# user set OPT.
5437
5438# tweak OPT based on compiler and platform, only if the user didn't set
5439# it on the command line
5440
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005441if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005442then
5443 case $GCC in
5444 yes)
5445 if test "$CC" != 'g++' ; then
5446 STRICT_PROTO="-Wstrict-prototypes"
5447 fi
5448 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5449 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5450 WRAP="-fwrapv"
5451 fi
5452 case $ac_cv_prog_cc_g in
5453 yes)
5454 if test "$Py_DEBUG" = 'true' ; then
5455 # Optimization messes up debuggers, so turn it off for
5456 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005457 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005458 else
5459 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5460 fi
5461 ;;
5462 *)
5463 OPT="-O3 -Wall $STRICT_PROTO"
5464 ;;
5465 esac
5466 case $ac_sys_system in
5467 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5468 ;;
5469 esac
5470 ;;
5471
5472 *)
5473 OPT="-O"
5474 ;;
5475 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005476fi
5477
5478
5479
5480# The -arch flags for universal builds on OSX
5481UNIVERSAL_ARCH_FLAGS=
5482
5483
5484# tweak BASECFLAGS based on compiler and platform
5485case $GCC in
5486yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005487 # Python doesn't violate C99 aliasing rules, but older versions of
5488 # GCC produce warnings for legal Python code. Enable
5489 # -fno-strict-aliasing on versions of GCC that support but produce
5490 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5492$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005493 ac_save_cc="$CC"
5494 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005495 save_CFLAGS="$CFLAGS"
Antoine Pitrou37009202011-07-08 23:47:50 +02005496 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005497 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005498else
Matthias Kloseb9621712010-04-24 17:59:49 +00005499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005500/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005501
Matthias Kloseb159a552010-04-25 21:00:44 +00005502
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005503int
5504main ()
5505{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005506
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005507 ;
5508 return 0;
5509}
Matthias Kloseb159a552010-04-25 21:00:44 +00005510
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005512if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005513
5514 CC="$ac_save_cc -fstrict-aliasing"
5515 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005517/* end confdefs.h. */
5518
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005519 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005520int
5521main ()
5522{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005523double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005524 ;
5525 return 0;
5526}
Matthias Kloseb159a552010-04-25 21:00:44 +00005527
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005529if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005530
5531 ac_cv_no_strict_aliasing=no
5532
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005533else
Matthias Kloseb159a552010-04-25 21:00:44 +00005534
5535 ac_cv_no_strict_aliasing=yes
5536
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005537fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005539
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005540else
Matthias Kloseb159a552010-04-25 21:00:44 +00005541
5542 ac_cv_no_strict_aliasing=no
5543
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005544fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005546fi
5547
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005548 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005549 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5551$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005552 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005553 then
5554 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5555 fi
5556
5557 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5558 # support. Without this, treatment of subnormals doesn't follow
5559 # the standard.
5560 case $ac_sys_machine in
5561 alpha*)
5562 BASECFLAGS="$BASECFLAGS -mieee"
5563 ;;
5564 esac
5565
5566 case $ac_sys_system in
5567 SCO_SV*)
5568 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5569 ;;
5570 # is there any other compiler on Darwin besides gcc?
5571 Darwin*)
5572 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5573 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005574 if test "${CC}" = gcc
5575 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5577$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005578 case "${UNIVERSALSDK}" in
5579 */MacOSX10.4u.sdk)
5580 # Build using 10.4 SDK, force usage of gcc when the
5581 # compiler is gcc, otherwise the user will get very
5582 # confusing error messages when building on OSX 10.6
5583 CC=gcc-4.0
5584 CPP=cpp-4.0
5585 ;;
5586 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5588$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005589 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005590
5591
5592 if test "${enable_universalsdk}"; then
5593 UNIVERSAL_ARCH_FLAGS=""
5594 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5595 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5596 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005597 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005598 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5599 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005600 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005601 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005602
5603 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5604 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005605 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005606 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005607
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005608 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5609 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005610 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005611 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005612
5613 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5614 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005615 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005616 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005617
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005618 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005619 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 +00005620
5621 fi
5622
5623
Ronald Oussoren666028b2010-04-18 19:07:43 +00005624 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5625 if test "${UNIVERSALSDK}" != "/"
5626 then
5627 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5628 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005629 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005630 fi
5631 fi
5632
5633 # Calculate the right deployment target for this build.
5634 #
5635 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5636 if test ${cur_target} '>' 10.2; then
5637 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005638 if test ${enable_universalsdk}; then
5639 if test "${UNIVERSAL_ARCHS}" = "all"; then
5640 # Ensure that the default platform for a
5641 # 4-way universal build is OSX 10.5,
5642 # that's the first OS release where
5643 # 4-way builds make sense.
5644 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005645
5646 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5647 cur_target='10.5'
5648
5649 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5650 cur_target='10.5'
5651
5652 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5653 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005654 fi
5655 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005656 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005657 # On Intel macs default to a deployment
5658 # target of 10.4, that's the first OSX
5659 # release with Intel support.
5660 cur_target="10.4"
5661 fi
5662 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005663 fi
5664 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5665
5666 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5667 # environment with a value that is the same as what we'll use
5668 # in the Makefile to ensure that we'll get the same compiler
5669 # environment during configure and build time.
5670 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5671 export MACOSX_DEPLOYMENT_TARGET
5672 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5673
5674 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675 esac
5676 ;;
5677
5678*)
5679 case $ac_sys_system in
5680 OpenUNIX*|UnixWare*)
5681 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5682 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683 SCO_SV*)
5684 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5685 ;;
5686 esac
5687 ;;
5688esac
5689
5690if test "$Py_DEBUG" = 'true'; then
5691 :
5692else
5693 OPT="-DNDEBUG $OPT"
5694fi
5695
5696if test "$ac_arch_flags"
5697then
5698 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5699fi
5700
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701# Check whether GCC supports PyArg_ParseTuple format
5702if test "$GCC" = "yes"
5703then
Matthias Kloseb9621712010-04-24 17:59:49 +00005704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5705$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706 save_CFLAGS=$CFLAGS
5707 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005709/* end confdefs.h. */
5710
5711 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712int
5713main ()
5714{
5715
5716 ;
5717 return 0;
5718}
Matthias Kloseb159a552010-04-25 21:00:44 +00005719
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005721if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005722
Matthias Kloseb159a552010-04-25 21:00:44 +00005723
Matthias Kloseb9621712010-04-24 17:59:49 +00005724$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725
Matthias Kloseb159a552010-04-25 21:00:44 +00005726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005727$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005728
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729else
Matthias Kloseb159a552010-04-25 21:00:44 +00005730
5731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005732$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733
5734fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5736 CFLAGS=$save_CFLAGS
5737fi
5738
5739# On some compilers, pthreads are available without further options
5740# (e.g. MacOS X). On some of these systems, the compiler will not
5741# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5742# So we have to see first whether pthreads are available without
5743# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5745$as_echo_n "checking whether pthreads are available without options... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02005746if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005747 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005748else
Matthias Kloseb9621712010-04-24 17:59:49 +00005749 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005750 ac_cv_pthread_is_default=no
5751else
Matthias Kloseb9621712010-04-24 17:59:49 +00005752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005753/* end confdefs.h. */
5754
5755#include <pthread.h>
5756
5757void* routine(void* p){return NULL;}
5758
5759int main(){
5760 pthread_t p;
5761 if(pthread_create(&p,NULL,routine,NULL)!=0)
5762 return 1;
5763 (void)pthread_detach(p);
5764 return 0;
5765}
5766
5767_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005768if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769
5770 ac_cv_pthread_is_default=yes
5771 ac_cv_kthread=no
5772 ac_cv_pthread=no
5773
5774else
Matthias Kloseb9621712010-04-24 17:59:49 +00005775 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5778 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005779fi
5780
5781
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782fi
5783
Matthias Kloseb9621712010-04-24 17:59:49 +00005784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5785$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005786
5787
5788if test $ac_cv_pthread_is_default = yes
5789then
5790 ac_cv_kpthread=no
5791else
5792# -Kpthread, if available, provides the right #defines
5793# and linker options to make pthread_create available
5794# Some compilers won't report that they do not support -Kpthread,
5795# so we need to run a program to see whether it really made the
5796# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5798$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02005799if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005800 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801else
5802 ac_save_cc="$CC"
5803CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005804if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005805 ac_cv_kpthread=no
5806else
Matthias Kloseb9621712010-04-24 17:59:49 +00005807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005808/* end confdefs.h. */
5809
5810#include <pthread.h>
5811
5812void* routine(void* p){return NULL;}
5813
5814int main(){
5815 pthread_t p;
5816 if(pthread_create(&p,NULL,routine,NULL)!=0)
5817 return 1;
5818 (void)pthread_detach(p);
5819 return 0;
5820}
5821
5822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005823if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005824 ac_cv_kpthread=yes
5825else
Matthias Kloseb9621712010-04-24 17:59:49 +00005826 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005828rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5829 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005830fi
5831
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005832CC="$ac_save_cc"
5833fi
5834
Matthias Kloseb9621712010-04-24 17:59:49 +00005835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5836$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837fi
5838
5839if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5840then
5841# -Kthread, if available, provides the right #defines
5842# and linker options to make pthread_create available
5843# Some compilers won't report that they do not support -Kthread,
5844# so we need to run a program to see whether it really made the
5845# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5847$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02005848if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005849 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850else
5851 ac_save_cc="$CC"
5852CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005853if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854 ac_cv_kthread=no
5855else
Matthias Kloseb9621712010-04-24 17:59:49 +00005856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005857/* end confdefs.h. */
5858
5859#include <pthread.h>
5860
5861void* routine(void* p){return NULL;}
5862
5863int main(){
5864 pthread_t p;
5865 if(pthread_create(&p,NULL,routine,NULL)!=0)
5866 return 1;
5867 (void)pthread_detach(p);
5868 return 0;
5869}
5870
5871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005872if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873 ac_cv_kthread=yes
5874else
Matthias Kloseb9621712010-04-24 17:59:49 +00005875 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005877rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5878 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879fi
5880
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881CC="$ac_save_cc"
5882fi
5883
Matthias Kloseb9621712010-04-24 17:59:49 +00005884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5885$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886fi
5887
5888if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5889then
5890# -pthread, if available, provides the right #defines
5891# and linker options to make pthread_create available
5892# Some compilers won't report that they do not support -pthread,
5893# so we need to run a program to see whether it really made the
5894# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5896$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02005897if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005898 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899else
5900 ac_save_cc="$CC"
5901CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005902if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903 ac_cv_pthread=no
5904else
Matthias Kloseb9621712010-04-24 17:59:49 +00005905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906/* end confdefs.h. */
5907
5908#include <pthread.h>
5909
5910void* routine(void* p){return NULL;}
5911
5912int main(){
5913 pthread_t p;
5914 if(pthread_create(&p,NULL,routine,NULL)!=0)
5915 return 1;
5916 (void)pthread_detach(p);
5917 return 0;
5918}
5919
5920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005921if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922 ac_cv_pthread=yes
5923else
Matthias Kloseb9621712010-04-24 17:59:49 +00005924 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005926rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5927 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928fi
5929
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005930CC="$ac_save_cc"
5931fi
5932
Matthias Kloseb9621712010-04-24 17:59:49 +00005933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5934$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935fi
5936
5937# If we have set a CC compiler flag for thread support then
5938# check if it works for CXX, too.
5939ac_cv_cxx_thread=no
5940if test ! -z "$CXX"
5941then
Matthias Kloseb9621712010-04-24 17:59:49 +00005942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5943$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944ac_save_cxx="$CXX"
5945
5946if test "$ac_cv_kpthread" = "yes"
5947then
5948 CXX="$CXX -Kpthread"
5949 ac_cv_cxx_thread=yes
5950elif test "$ac_cv_kthread" = "yes"
5951then
5952 CXX="$CXX -Kthread"
5953 ac_cv_cxx_thread=yes
5954elif test "$ac_cv_pthread" = "yes"
5955then
5956 CXX="$CXX -pthread"
5957 ac_cv_cxx_thread=yes
5958fi
5959
5960if test $ac_cv_cxx_thread = yes
5961then
5962 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5963 $CXX -c conftest.$ac_ext 2>&5
5964 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5965 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5966 then
5967 ac_cv_cxx_thread=yes
5968 else
5969 ac_cv_cxx_thread=no
5970 fi
5971 rm -fr conftest*
5972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5974$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975fi
5976CXX="$ac_save_cxx"
5977
5978
5979# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5981$as_echo_n "checking for ANSI C header files... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02005982if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005983 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984else
Matthias Kloseb9621712010-04-24 17:59:49 +00005985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005986/* end confdefs.h. */
5987#include <stdlib.h>
5988#include <stdarg.h>
5989#include <string.h>
5990#include <float.h>
5991
5992int
5993main ()
5994{
5995
5996 ;
5997 return 0;
5998}
5999_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006000if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006001 ac_cv_header_stdc=yes
6002else
Matthias Kloseb9621712010-04-24 17:59:49 +00006003 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006004fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6006
6007if test $ac_cv_header_stdc = yes; then
6008 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006010/* end confdefs.h. */
6011#include <string.h>
6012
6013_ACEOF
6014if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006015 $EGREP "memchr" >/dev/null 2>&1; then :
6016
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006017else
6018 ac_cv_header_stdc=no
6019fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006020rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006021
6022fi
6023
6024if test $ac_cv_header_stdc = yes; then
6025 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006027/* end confdefs.h. */
6028#include <stdlib.h>
6029
6030_ACEOF
6031if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006032 $EGREP "free" >/dev/null 2>&1; then :
6033
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006034else
6035 ac_cv_header_stdc=no
6036fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006037rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006038
6039fi
6040
6041if test $ac_cv_header_stdc = yes; then
6042 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006043 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006044 :
6045else
Matthias Kloseb9621712010-04-24 17:59:49 +00006046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006047/* end confdefs.h. */
6048#include <ctype.h>
6049#include <stdlib.h>
6050#if ((' ' & 0x0FF) == 0x020)
6051# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6052# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6053#else
6054# define ISLOWER(c) \
6055 (('a' <= (c) && (c) <= 'i') \
6056 || ('j' <= (c) && (c) <= 'r') \
6057 || ('s' <= (c) && (c) <= 'z'))
6058# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6059#endif
6060
6061#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6062int
6063main ()
6064{
6065 int i;
6066 for (i = 0; i < 256; i++)
6067 if (XOR (islower (i), ISLOWER (i))
6068 || toupper (i) != TOUPPER (i))
6069 return 2;
6070 return 0;
6071}
6072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006073if ac_fn_c_try_run "$LINENO"; then :
6074
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006075else
Matthias Kloseb9621712010-04-24 17:59:49 +00006076 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006077fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006078rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6079 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006080fi
6081
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006082fi
6083fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6085$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006086if test $ac_cv_header_stdc = yes; then
6087
Matthias Kloseb9621712010-04-24 17:59:49 +00006088$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006089
6090fi
6091
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006092for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6093fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006094ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Antoine Pitrou37009202011-07-08 23:47:50 +02006095shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006096unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006097sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6098sys/lock.h sys/mkdev.h sys/modem.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006099sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
6100sys/stat.h sys/termio.h sys/time.h \
6101sys/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 -07006102libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006103bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006104do :
6105 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6106ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006107if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006108 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006109#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006110_ACEOF
6111
6112fi
6113
Guido van Rossum627b2d71993-12-24 10:39:16 +00006114done
6115
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006116ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006117for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006118 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6120$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02006121if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006122 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006123else
Matthias Kloseb9621712010-04-24 17:59:49 +00006124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006125/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006126#include <sys/types.h>
6127#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006128
Martin v. Löwis11437992002-04-12 09:54:03 +00006129int
6130main ()
6131{
6132if ((DIR *) 0)
6133return 0;
6134 ;
6135 return 0;
6136}
6137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006138if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006139 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006140else
Matthias Kloseb9621712010-04-24 17:59:49 +00006141 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006142fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006145eval ac_res=\$$as_ac_Header
6146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6147$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006148if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006149 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006150#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006151_ACEOF
6152
6153ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006154fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006155
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006156done
6157# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6158if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6160$as_echo_n "checking for library containing opendir... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02006161if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006162 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006163else
Martin v. Löwis11437992002-04-12 09:54:03 +00006164 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006166/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006167
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006168/* Override any GCC internal prototype to avoid an error.
6169 Use char because int might match the return type of a GCC
6170 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006171#ifdef __cplusplus
6172extern "C"
6173#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006174char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006175int
6176main ()
6177{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006178return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006179 ;
6180 return 0;
6181}
6182_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006183for ac_lib in '' dir; do
6184 if test -z "$ac_lib"; then
6185 ac_res="none required"
6186 else
6187 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006188 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006189 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006190 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006191 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006192fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006193rm -f core conftest.err conftest.$ac_objext \
6194 conftest$ac_exeext
Antoine Pitrou37009202011-07-08 23:47:50 +02006195 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006196 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006197fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006198done
Antoine Pitrou37009202011-07-08 23:47:50 +02006199if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006200
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006201else
6202 ac_cv_search_opendir=no
6203fi
6204rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006205LIBS=$ac_func_search_save_LIBS
6206fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6208$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006209ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006210if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006211 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006212
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006213fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006214
Michael W. Hudson54241132001-12-07 15:38:26 +00006215else
Matthias Kloseb9621712010-04-24 17:59:49 +00006216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6217$as_echo_n "checking for library containing opendir... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02006218if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006219 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006220else
6221 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006223/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006224
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006225/* Override any GCC internal prototype to avoid an error.
6226 Use char because int might match the return type of a GCC
6227 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006228#ifdef __cplusplus
6229extern "C"
6230#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006231char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006232int
6233main ()
6234{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006235return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006236 ;
6237 return 0;
6238}
6239_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006240for ac_lib in '' x; do
6241 if test -z "$ac_lib"; then
6242 ac_res="none required"
6243 else
6244 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006245 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006246 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006247 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006248 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006249fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006250rm -f core conftest.err conftest.$ac_objext \
6251 conftest$ac_exeext
Antoine Pitrou37009202011-07-08 23:47:50 +02006252 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006253 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006254fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006255done
Antoine Pitrou37009202011-07-08 23:47:50 +02006256if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006257
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006258else
6259 ac_cv_search_opendir=no
6260fi
6261rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006262LIBS=$ac_func_search_save_LIBS
6263fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6265$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006266ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006267if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006268 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006269
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006270fi
6271
6272fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006273
Matthias Kloseb9621712010-04-24 17:59:49 +00006274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6275$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02006276if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006277 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006278else
Matthias Kloseb9621712010-04-24 17:59:49 +00006279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006280/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006281#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006282int
6283main ()
6284{
6285return makedev(0, 0);
6286 ;
6287 return 0;
6288}
6289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006290if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006291 ac_cv_header_sys_types_h_makedev=yes
6292else
Matthias Kloseb9621712010-04-24 17:59:49 +00006293 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006294fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006295rm -f core conftest.err conftest.$ac_objext \
6296 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006297
6298fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6300$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006301
6302if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006303ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Antoine Pitrou37009202011-07-08 23:47:50 +02006304if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006305
Matthias Kloseb9621712010-04-24 17:59:49 +00006306$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006307
6308fi
6309
6310
6311
6312 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006313 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Antoine Pitrou37009202011-07-08 23:47:50 +02006314if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006315
Matthias Kloseb9621712010-04-24 17:59:49 +00006316$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006317
6318fi
6319
6320
6321 fi
6322fi
6323
Michael W. Hudson54241132001-12-07 15:38:26 +00006324
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006325# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
6326for ac_header in net/if.h
6327do :
6328 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
6329#ifdef STDC_HEADERS
6330# include <stdlib.h>
6331# include <stddef.h>
6332#else
6333# ifdef HAVE_STDLIB_H
6334# include <stdlib.h>
6335# endif
6336#endif
6337#ifdef HAVE_SYS_SOCKET_H
6338# include <sys/socket.h>
6339#endif
6340
6341"
Antoine Pitrou37009202011-07-08 23:47:50 +02006342if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006343 cat >>confdefs.h <<_ACEOF
6344#define HAVE_NET_IF_H 1
6345_ACEOF
6346
6347fi
6348
6349done
6350
6351
6352
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006353# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006354for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006355do :
6356 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006357#ifdef HAVE_CURSES_H
6358#include <curses.h>
6359#endif
6360
Matthias Kloseb9621712010-04-24 17:59:49 +00006361"
Antoine Pitrou37009202011-07-08 23:47:50 +02006362if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006363 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006364#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006365_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006366
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006367fi
6368
6369done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006370
6371
Martin v. Löwis11017b12006-01-14 18:12:57 +00006372# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006373for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006374do :
6375 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 +00006376#ifdef HAVE_ASM_TYPES_H
6377#include <asm/types.h>
6378#endif
6379#ifdef HAVE_SYS_SOCKET_H
6380#include <sys/socket.h>
6381#endif
6382
Matthias Kloseb9621712010-04-24 17:59:49 +00006383"
Antoine Pitrou37009202011-07-08 23:47:50 +02006384if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006385 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006386#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006387_ACEOF
6388
6389fi
6390
6391done
6392
6393
Guido van Rossum627b2d71993-12-24 10:39:16 +00006394# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006395was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6397$as_echo_n "checking for clock_t in time.h... " >&6; }
6398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006399/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006400#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006401
6402_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006403if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006404 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006405 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006406else
Martin v. Löwis11437992002-04-12 09:54:03 +00006407
6408
Matthias Kloseb9621712010-04-24 17:59:49 +00006409$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006410
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006411
Guido van Rossum627b2d71993-12-24 10:39:16 +00006412fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006413rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006414
Matthias Kloseb9621712010-04-24 17:59:49 +00006415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6416$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006417
Matthias Kloseb9621712010-04-24 17:59:49 +00006418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6419$as_echo_n "checking for makedev... " >&6; }
6420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006421/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006422
Jesus Cea740f53a2010-04-28 11:35:30 +00006423#if defined(MAJOR_IN_MKDEV)
6424#include <sys/mkdev.h>
6425#elif defined(MAJOR_IN_SYSMACROS)
6426#include <sys/sysmacros.h>
6427#else
6428#include <sys/types.h>
6429#endif
6430
Neal Norwitz11690112002-07-30 01:08:28 +00006431int
6432main ()
6433{
Jesus Cea740f53a2010-04-28 11:35:30 +00006434
6435 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006436 ;
6437 return 0;
6438}
Matthias Kloseb159a552010-04-25 21:00:44 +00006439
Neal Norwitz11690112002-07-30 01:08:28 +00006440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006441if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006442 ac_cv_has_makedev=yes
6443else
Matthias Kloseb9621712010-04-24 17:59:49 +00006444 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006445fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006446rm -f core conftest.err conftest.$ac_objext \
6447 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6449$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006450if test "$ac_cv_has_makedev" = "yes"; then
6451
Matthias Kloseb9621712010-04-24 17:59:49 +00006452$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006453
6454fi
6455
Martin v. Löwis399a6892002-10-04 10:22:02 +00006456# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6457# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6458# defined, but the compiler does not support pragma redefine_extname,
6459# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6460# structures (such as rlimit64) without declaring them. As a
6461# work-around, disable LFS on such configurations
6462
6463use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6465$as_echo_n "checking Solaris LFS bug... " >&6; }
6466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006467/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006468
6469#define _LARGEFILE_SOURCE 1
6470#define _FILE_OFFSET_BITS 64
6471#include <sys/resource.h>
6472
Martin v. Löwis399a6892002-10-04 10:22:02 +00006473int
6474main ()
6475{
6476struct rlimit foo;
6477 ;
6478 return 0;
6479}
6480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006481if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006482 sol_lfs_bug=no
6483else
Matthias Kloseb9621712010-04-24 17:59:49 +00006484 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006485fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6488$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006489if test "$sol_lfs_bug" = "yes"; then
6490 use_lfs=no
6491fi
6492
6493if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006494# Two defines needed to enable largefile support on various platforms
6495# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006496case $ac_sys_system/$ac_sys_release in
6497AIX*)
6498
6499$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6500
6501 ;;
6502esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006503
Matthias Kloseb9621712010-04-24 17:59:49 +00006504$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006505
6506
Matthias Kloseb9621712010-04-24 17:59:49 +00006507$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006508
Martin v. Löwis399a6892002-10-04 10:22:02 +00006509fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006510
Guido van Rossum84e7b241996-08-19 21:59:00 +00006511# Add some code to confdefs.h so that the test for off_t works on SCO
6512cat >> confdefs.h <<\EOF
6513#if defined(SCO_DS)
6514#undef _OFF_T
6515#endif
6516EOF
6517
Guido van Rossumef2255b2000-03-10 22:30:29 +00006518# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006519ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Antoine Pitrou37009202011-07-08 23:47:50 +02006520if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006521
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006522else
Martin v. Löwis11437992002-04-12 09:54:03 +00006523
6524cat >>confdefs.h <<_ACEOF
6525#define mode_t int
6526_ACEOF
6527
6528fi
6529
Matthias Kloseb9621712010-04-24 17:59:49 +00006530ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Antoine Pitrou37009202011-07-08 23:47:50 +02006531if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006532
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006533else
Martin v. Löwis11437992002-04-12 09:54:03 +00006534
6535cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006536#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006537_ACEOF
6538
6539fi
6540
Matthias Kloseb9621712010-04-24 17:59:49 +00006541ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Antoine Pitrou37009202011-07-08 23:47:50 +02006542if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006543
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006544else
Martin v. Löwis11437992002-04-12 09:54:03 +00006545
6546cat >>confdefs.h <<_ACEOF
6547#define pid_t int
6548_ACEOF
6549
6550fi
6551
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006552
Martin v. Löwis11437992002-04-12 09:54:03 +00006553cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006554#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006555_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006556
Matthias Kloseb9621712010-04-24 17:59:49 +00006557ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Antoine Pitrou37009202011-07-08 23:47:50 +02006558if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006559
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006560else
Martin v. Löwis11437992002-04-12 09:54:03 +00006561
6562cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006563#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006564_ACEOF
6565
6566fi
6567
Matthias Kloseb9621712010-04-24 17:59:49 +00006568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6569$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02006570if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006571 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006572else
Matthias Kloseb9621712010-04-24 17:59:49 +00006573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006574/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006575#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006576
6577_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006578if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006579 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006580 ac_cv_type_uid_t=yes
6581else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006582 ac_cv_type_uid_t=no
6583fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006584rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006585
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006586fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6588$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006589if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006590
Matthias Kloseb9621712010-04-24 17:59:49 +00006591$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006592
6593
Matthias Kloseb9621712010-04-24 17:59:49 +00006594$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006595
6596fi
6597
Matthias Kloseb9621712010-04-24 17:59:49 +00006598ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6599case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006600 no|yes) ;; #(
6601 *)
6602
Matthias Kloseb9621712010-04-24 17:59:49 +00006603$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006604
6605
6606cat >>confdefs.h <<_ACEOF
6607#define uint32_t $ac_cv_c_uint32_t
6608_ACEOF
6609;;
6610 esac
6611
Matthias Kloseb9621712010-04-24 17:59:49 +00006612ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6613case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006614 no|yes) ;; #(
6615 *)
6616
Matthias Kloseb9621712010-04-24 17:59:49 +00006617$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006618
6619
6620cat >>confdefs.h <<_ACEOF
6621#define uint64_t $ac_cv_c_uint64_t
6622_ACEOF
6623;;
6624 esac
6625
Matthias Kloseb9621712010-04-24 17:59:49 +00006626ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6627case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006628 no|yes) ;; #(
6629 *)
6630
6631cat >>confdefs.h <<_ACEOF
6632#define int32_t $ac_cv_c_int32_t
6633_ACEOF
6634;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006635esac
6636
Matthias Kloseb9621712010-04-24 17:59:49 +00006637ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6638case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006639 no|yes) ;; #(
6640 *)
6641
6642cat >>confdefs.h <<_ACEOF
6643#define int64_t $ac_cv_c_int64_t
6644_ACEOF
6645;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006646esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006647
Matthias Kloseb9621712010-04-24 17:59:49 +00006648ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Antoine Pitrou37009202011-07-08 23:47:50 +02006649if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006650
Matthias Kloseb9621712010-04-24 17:59:49 +00006651$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006652
6653fi
6654
Jack Jansendd19cf82001-12-06 22:36:17 +00006655
Michael W. Hudson54241132001-12-07 15:38:26 +00006656# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006657# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006658# The cast to long int works around a bug in the HP C Compiler
6659# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6660# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6661# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6663$as_echo_n "checking size of int... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02006664if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006665 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006666else
Matthias Kloseb9621712010-04-24 17:59:49 +00006667 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 +00006668
Martin v. Löwis11437992002-04-12 09:54:03 +00006669else
Matthias Kloseb9621712010-04-24 17:59:49 +00006670 if test "$ac_cv_type_int" = yes; then
6671 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6672$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006673as_fn_error 77 "cannot compute sizeof (int)
Antoine Pitrou37009202011-07-08 23:47:50 +02006674See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006675 else
6676 ac_cv_sizeof_int=0
6677 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006679
Martin v. Löwis11437992002-04-12 09:54:03 +00006680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6682$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006683
6684
6685
Martin v. Löwis11437992002-04-12 09:54:03 +00006686cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006687#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006688_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006689
6690
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006691# The cast to long int works around a bug in the HP C Compiler
6692# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6693# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6694# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6696$as_echo_n "checking size of long... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02006697if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006698 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006699else
Matthias Kloseb9621712010-04-24 17:59:49 +00006700 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 +00006701
Martin v. Löwis11437992002-04-12 09:54:03 +00006702else
Matthias Kloseb9621712010-04-24 17:59:49 +00006703 if test "$ac_cv_type_long" = yes; then
6704 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6705$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006706as_fn_error 77 "cannot compute sizeof (long)
Antoine Pitrou37009202011-07-08 23:47:50 +02006707See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006708 else
6709 ac_cv_sizeof_long=0
6710 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006711fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006712
Martin v. Löwis11437992002-04-12 09:54:03 +00006713fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6715$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006716
6717
6718
Martin v. Löwis11437992002-04-12 09:54:03 +00006719cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006720#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006721_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006722
6723
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006724# The cast to long int works around a bug in the HP C Compiler
6725# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6726# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6727# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6729$as_echo_n "checking size of void *... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02006730if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006731 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006732else
Matthias Kloseb9621712010-04-24 17:59:49 +00006733 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 +00006734
Martin v. Löwis11437992002-04-12 09:54:03 +00006735else
Matthias Kloseb9621712010-04-24 17:59:49 +00006736 if test "$ac_cv_type_void_p" = yes; then
6737 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6738$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006739as_fn_error 77 "cannot compute sizeof (void *)
Antoine Pitrou37009202011-07-08 23:47:50 +02006740See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006741 else
6742 ac_cv_sizeof_void_p=0
6743 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006744fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006745
Martin v. Löwis11437992002-04-12 09:54:03 +00006746fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6748$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006749
6750
6751
Martin v. Löwis11437992002-04-12 09:54:03 +00006752cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006753#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006754_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006755
6756
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006757# The cast to long int works around a bug in the HP C Compiler
6758# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6759# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6760# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6762$as_echo_n "checking size of short... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02006763if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006764 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006765else
Matthias Kloseb9621712010-04-24 17:59:49 +00006766 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 +00006767
Martin v. Löwis11437992002-04-12 09:54:03 +00006768else
Matthias Kloseb9621712010-04-24 17:59:49 +00006769 if test "$ac_cv_type_short" = yes; then
6770 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6771$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006772as_fn_error 77 "cannot compute sizeof (short)
Antoine Pitrou37009202011-07-08 23:47:50 +02006773See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006774 else
6775 ac_cv_sizeof_short=0
6776 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006777fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006778
Martin v. Löwis11437992002-04-12 09:54:03 +00006779fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6781$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006782
6783
6784
Martin v. Löwis11437992002-04-12 09:54:03 +00006785cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006786#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006787_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006788
6789
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006790# The cast to long int works around a bug in the HP C Compiler
6791# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6792# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6793# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6795$as_echo_n "checking size of float... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02006796if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006797 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006798else
Matthias Kloseb9621712010-04-24 17:59:49 +00006799 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 +00006800
Martin v. Löwis11437992002-04-12 09:54:03 +00006801else
Matthias Kloseb9621712010-04-24 17:59:49 +00006802 if test "$ac_cv_type_float" = yes; then
6803 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6804$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006805as_fn_error 77 "cannot compute sizeof (float)
Antoine Pitrou37009202011-07-08 23:47:50 +02006806See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006807 else
6808 ac_cv_sizeof_float=0
6809 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006811
Martin v. Löwis11437992002-04-12 09:54:03 +00006812fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6814$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006815
6816
6817
Martin v. Löwis11437992002-04-12 09:54:03 +00006818cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006819#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006820_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006821
6822
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006823# The cast to long int works around a bug in the HP C Compiler
6824# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6825# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6826# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6828$as_echo_n "checking size of double... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02006829if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006830 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006831else
Matthias Kloseb9621712010-04-24 17:59:49 +00006832 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 +00006833
Martin v. Löwis11437992002-04-12 09:54:03 +00006834else
Matthias Kloseb9621712010-04-24 17:59:49 +00006835 if test "$ac_cv_type_double" = yes; then
6836 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6837$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006838as_fn_error 77 "cannot compute sizeof (double)
Antoine Pitrou37009202011-07-08 23:47:50 +02006839See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006840 else
6841 ac_cv_sizeof_double=0
6842 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006843fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006844
Martin v. Löwis11437992002-04-12 09:54:03 +00006845fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6847$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006848
6849
6850
Martin v. Löwis11437992002-04-12 09:54:03 +00006851cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006852#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006853_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006854
6855
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006856# The cast to long int works around a bug in the HP C Compiler
6857# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6858# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6859# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6861$as_echo_n "checking size of fpos_t... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02006862if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006863 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006864else
Matthias Kloseb9621712010-04-24 17:59:49 +00006865 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 +00006866
Martin v. Löwis11437992002-04-12 09:54:03 +00006867else
Matthias Kloseb9621712010-04-24 17:59:49 +00006868 if test "$ac_cv_type_fpos_t" = yes; then
6869 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6870$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006871as_fn_error 77 "cannot compute sizeof (fpos_t)
Antoine Pitrou37009202011-07-08 23:47:50 +02006872See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006873 else
6874 ac_cv_sizeof_fpos_t=0
6875 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006877
Martin v. Löwis11437992002-04-12 09:54:03 +00006878fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6880$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006881
6882
6883
Martin v. Löwis11437992002-04-12 09:54:03 +00006884cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006885#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006886_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006887
Michael W. Hudson54241132001-12-07 15:38:26 +00006888
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006889# The cast to long int works around a bug in the HP C Compiler
6890# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6891# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6892# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6894$as_echo_n "checking size of size_t... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02006895if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006896 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006897else
Matthias Kloseb9621712010-04-24 17:59:49 +00006898 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 +00006899
Martin v. Löwis18e16552006-02-15 17:27:45 +00006900else
Matthias Kloseb9621712010-04-24 17:59:49 +00006901 if test "$ac_cv_type_size_t" = yes; then
6902 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6903$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006904as_fn_error 77 "cannot compute sizeof (size_t)
Antoine Pitrou37009202011-07-08 23:47:50 +02006905See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006906 else
6907 ac_cv_sizeof_size_t=0
6908 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006909fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006910
Martin v. Löwis18e16552006-02-15 17:27:45 +00006911fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6913$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006914
6915
6916
Martin v. Löwis18e16552006-02-15 17:27:45 +00006917cat >>confdefs.h <<_ACEOF
6918#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6919_ACEOF
6920
6921
Christian Heimes400adb02008-02-01 08:12:03 +00006922# The cast to long int works around a bug in the HP C Compiler
6923# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6924# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6925# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6927$as_echo_n "checking size of pid_t... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02006928if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006929 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006930else
Matthias Kloseb9621712010-04-24 17:59:49 +00006931 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 +00006932
Christian Heimes400adb02008-02-01 08:12:03 +00006933else
Matthias Kloseb9621712010-04-24 17:59:49 +00006934 if test "$ac_cv_type_pid_t" = yes; then
6935 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6936$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006937as_fn_error 77 "cannot compute sizeof (pid_t)
Antoine Pitrou37009202011-07-08 23:47:50 +02006938See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00006939 else
6940 ac_cv_sizeof_pid_t=0
6941 fi
6942fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006943
Christian Heimes400adb02008-02-01 08:12:03 +00006944fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6946$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006947
6948
6949
6950cat >>confdefs.h <<_ACEOF
6951#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6952_ACEOF
6953
6954
Michael W. Hudson54241132001-12-07 15:38:26 +00006955
Matthias Kloseb9621712010-04-24 17:59:49 +00006956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6957$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006958have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006960/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006961
Martin v. Löwis11437992002-04-12 09:54:03 +00006962int
6963main ()
6964{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006965long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006966 ;
6967 return 0;
6968}
6969_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006970if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006971
6972
Matthias Kloseb9621712010-04-24 17:59:49 +00006973$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006974
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006975 have_long_long=yes
6976
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006977fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6980$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006981if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006982# The cast to long int works around a bug in the HP C Compiler
6983# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6984# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6985# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6987$as_echo_n "checking size of long long... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02006988if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006989 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006990else
Matthias Kloseb9621712010-04-24 17:59:49 +00006991 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 +00006992
Martin v. Löwis11437992002-04-12 09:54:03 +00006993else
Matthias Kloseb9621712010-04-24 17:59:49 +00006994 if test "$ac_cv_type_long_long" = yes; then
6995 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6996$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006997as_fn_error 77 "cannot compute sizeof (long long)
Antoine Pitrou37009202011-07-08 23:47:50 +02006998See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006999 else
7000 ac_cv_sizeof_long_long=0
7001 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007002fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007003
Martin v. Löwis11437992002-04-12 09:54:03 +00007004fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7006$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007007
7008
7009
Martin v. Löwis11437992002-04-12 09:54:03 +00007010cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007011#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007012_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007013
Michael W. Hudson54241132001-12-07 15:38:26 +00007014
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007015fi
7016
Matthias Kloseb9621712010-04-24 17:59:49 +00007017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7018$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007019have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007021/* end confdefs.h. */
7022
7023int
7024main ()
7025{
7026long double x; x = (long double)0;
7027 ;
7028 return 0;
7029}
7030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007031if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007032
7033
Matthias Kloseb9621712010-04-24 17:59:49 +00007034$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007035
7036 have_long_double=yes
7037
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007038fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7041$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007042if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007043# The cast to long int works around a bug in the HP C Compiler
7044# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7045# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7046# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7048$as_echo_n "checking size of long double... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02007049if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007050 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007051else
Matthias Kloseb9621712010-04-24 17:59:49 +00007052 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 +00007053
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007054else
Matthias Kloseb9621712010-04-24 17:59:49 +00007055 if test "$ac_cv_type_long_double" = yes; then
7056 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7057$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007058as_fn_error 77 "cannot compute sizeof (long double)
Antoine Pitrou37009202011-07-08 23:47:50 +02007059See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007060 else
7061 ac_cv_sizeof_long_double=0
7062 fi
7063fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007064
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007065fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7067$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007068
7069
7070
7071cat >>confdefs.h <<_ACEOF
7072#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7073_ACEOF
7074
7075
7076fi
7077
7078
Matthias Kloseb9621712010-04-24 17:59:49 +00007079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7080$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007081have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007083/* end confdefs.h. */
7084
7085int
7086main ()
7087{
7088_Bool x; x = (_Bool)0;
7089 ;
7090 return 0;
7091}
7092_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007093if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007094
7095
Matthias Kloseb9621712010-04-24 17:59:49 +00007096$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007097
7098 have_c99_bool=yes
7099
Thomas Woutersb2137042007-02-01 18:02:27 +00007100fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7103$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007104if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007105# The cast to long int works around a bug in the HP C Compiler
7106# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7107# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7108# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7110$as_echo_n "checking size of _Bool... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02007111if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007112 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007113else
Matthias Kloseb9621712010-04-24 17:59:49 +00007114 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 +00007115
Thomas Woutersb2137042007-02-01 18:02:27 +00007116else
Matthias Kloseb9621712010-04-24 17:59:49 +00007117 if test "$ac_cv_type__Bool" = yes; then
7118 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7119$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007120as_fn_error 77 "cannot compute sizeof (_Bool)
Antoine Pitrou37009202011-07-08 23:47:50 +02007121See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007122 else
7123 ac_cv_sizeof__Bool=0
7124 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007125fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007126
Thomas Woutersb2137042007-02-01 18:02:27 +00007127fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7129$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007130
7131
7132
Thomas Woutersb2137042007-02-01 18:02:27 +00007133cat >>confdefs.h <<_ACEOF
7134#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7135_ACEOF
7136
7137
7138fi
7139
Matthias Kloseb9621712010-04-24 17:59:49 +00007140ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007141 #include <stdint.h>
7142 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007143 #ifdef HAVE_INTTYPES_H
7144 #include <inttypes.h>
7145 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007146"
Antoine Pitrou37009202011-07-08 23:47:50 +02007147if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007148
7149cat >>confdefs.h <<_ACEOF
7150#define HAVE_UINTPTR_T 1
7151_ACEOF
7152
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007153# The cast to long int works around a bug in the HP C Compiler
7154# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7155# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7156# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7158$as_echo_n "checking size of uintptr_t... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02007159if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007160 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007161else
Matthias Kloseb9621712010-04-24 17:59:49 +00007162 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 +00007163
Martin v. Löwis11437992002-04-12 09:54:03 +00007164else
Matthias Kloseb9621712010-04-24 17:59:49 +00007165 if test "$ac_cv_type_uintptr_t" = yes; then
7166 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7167$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007168as_fn_error 77 "cannot compute sizeof (uintptr_t)
Antoine Pitrou37009202011-07-08 23:47:50 +02007169See \`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; }
Antoine Pitrou37009202011-07-08 23:47:50 +02007195if ${ac_cv_sizeof_off_t+:} false; 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;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007209as_fn_error 77 "cannot compute sizeof (off_t)
Antoine Pitrou37009202011-07-08 23:47:50 +02007210See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007211 else
7212 ac_cv_sizeof_off_t=0
7213 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007214fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007215
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007216fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7218$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007219
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007220
7221
Martin v. Löwis11437992002-04-12 09:54:03 +00007222cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007223#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007224_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007225
Michael W. Hudson54241132001-12-07 15:38:26 +00007226
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007227
Matthias Kloseb9621712010-04-24 17:59:49 +00007228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7229$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007230if test "$have_long_long" = yes
7231then
7232if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007233 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007234
Matthias Kloseb9621712010-04-24 17:59:49 +00007235$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007236
Matthias Kloseb9621712010-04-24 17:59:49 +00007237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7238$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007239else
Matthias Kloseb9621712010-04-24 17:59:49 +00007240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7241$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007242fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007243else
Matthias Kloseb9621712010-04-24 17:59:49 +00007244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7245$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007246fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007247
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007248# The cast to long int works around a bug in the HP C Compiler
7249# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7250# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7251# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7253$as_echo_n "checking size of time_t... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02007254if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007255 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007256else
Matthias Kloseb9621712010-04-24 17:59:49 +00007257 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007258#ifdef HAVE_SYS_TYPES_H
7259#include <sys/types.h>
7260#endif
7261#ifdef HAVE_TIME_H
7262#include <time.h>
7263#endif
7264
Matthias Kloseb9621712010-04-24 17:59:49 +00007265"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007266
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007267else
Matthias Kloseb9621712010-04-24 17:59:49 +00007268 if test "$ac_cv_type_time_t" = yes; then
7269 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7270$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007271as_fn_error 77 "cannot compute sizeof (time_t)
Antoine Pitrou37009202011-07-08 23:47:50 +02007272See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007273 else
7274 ac_cv_sizeof_time_t=0
7275 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007276fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007277
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7280$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007281
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007282
7283
Martin v. Löwis11437992002-04-12 09:54:03 +00007284cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007285#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007286_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007287
Michael W. Hudson54241132001-12-07 15:38:26 +00007288
7289
Trent Mick635f6fb2000-08-23 21:33:05 +00007290# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007291ac_save_cc="$CC"
7292if test "$ac_cv_kpthread" = "yes"
7293then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007294elif test "$ac_cv_kthread" = "yes"
7295then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007296elif test "$ac_cv_pthread" = "yes"
7297then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007298fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007299
Matthias Kloseb9621712010-04-24 17:59:49 +00007300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7301$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007302have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007304/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007305
7306 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007307int
7308main ()
7309{
Guido van Rossum12580492000-09-24 16:47:19 +00007310pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007311 ;
7312 return 0;
7313}
Matthias Kloseb159a552010-04-25 21:00:44 +00007314
Martin v. Löwis11437992002-04-12 09:54:03 +00007315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007316if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007317 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7321$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007322if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007323 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007324# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7325# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7326# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7328$as_echo_n "checking size of pthread_t... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02007329if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007330 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007331else
Matthias Kloseb9621712010-04-24 17:59:49 +00007332 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007333#ifdef HAVE_PTHREAD_H
7334#include <pthread.h>
7335#endif
7336
Matthias Kloseb9621712010-04-24 17:59:49 +00007337"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007338
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007339else
Matthias Kloseb9621712010-04-24 17:59:49 +00007340 if test "$ac_cv_type_pthread_t" = yes; then
7341 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7342$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007343as_fn_error 77 "cannot compute sizeof (pthread_t)
Antoine Pitrou37009202011-07-08 23:47:50 +02007344See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007345 else
7346 ac_cv_sizeof_pthread_t=0
7347 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007348fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007349
Trent Mick635f6fb2000-08-23 21:33:05 +00007350fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7352$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007353
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007354
7355
Martin v. Löwis11437992002-04-12 09:54:03 +00007356cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007357#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007358_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007359
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007360
Trent Mick635f6fb2000-08-23 21:33:05 +00007361fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007362CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007363
Michael W. Hudson54241132001-12-07 15:38:26 +00007364
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007365case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007366 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007367 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7368 ;;
7369 Darwin/*)
7370 OTHER_LIBTOOL_OPT=""
7371 ;;
7372esac
7373
7374
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007375ARCH_RUN_32BIT=""
7376
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007377case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007378 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007379 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7380 if test "${enable_universalsdk}"; then
7381 :
7382 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007383 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007384 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007385 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007386 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007387 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007388 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007389 if test ${gcc_version} '<' 4.0
7390 then
7391 LIBTOOL_CRUFT="-lcc_dynamic"
7392 else
7393 LIBTOOL_CRUFT=""
7394 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007395 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007396 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007397else
Matthias Kloseb9621712010-04-24 17:59:49 +00007398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007399/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007400
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007401 #include <unistd.h>
7402 int main(int argc, char*argv[])
7403 {
7404 if (sizeof(long) == 4) {
7405 return 0;
7406 } else {
7407 return 1;
7408 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007409 }
7410
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007412if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007413 ac_osx_32bit=yes
7414else
Matthias Kloseb9621712010-04-24 17:59:49 +00007415 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007416fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007417rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7418 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007419fi
7420
7421
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007422 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007423 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007424 i386)
7425 MACOSX_DEFAULT_ARCH="i386"
7426 ;;
7427 ppc)
7428 MACOSX_DEFAULT_ARCH="ppc"
7429 ;;
7430 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007431 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007432 ;;
7433 esac
7434 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007435 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007436 i386)
7437 MACOSX_DEFAULT_ARCH="x86_64"
7438 ;;
7439 ppc)
7440 MACOSX_DEFAULT_ARCH="ppc64"
7441 ;;
7442 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007443 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007444 ;;
7445 esac
7446
7447 #ARCH_RUN_32BIT="true"
7448 fi
7449
7450 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007451 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007452 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007453esac
7454
Matthias Kloseb9621712010-04-24 17:59:49 +00007455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7456$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007457if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007458then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007459 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007460 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007461 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007462
Matthias Kloseb9621712010-04-24 17:59:49 +00007463$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007464
Matthias Kloseb9621712010-04-24 17:59:49 +00007465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7466$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007467 if test $enable_shared = "yes"
7468 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007469 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 +00007470 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007471else
Matthias Kloseb9621712010-04-24 17:59:49 +00007472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7473$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007474fi
7475
Matthias Kloseb9621712010-04-24 17:59:49 +00007476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7477$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007478case $ac_sys_system/$ac_sys_release in
7479 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007480
Matthias Kloseb9621712010-04-24 17:59:49 +00007481$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007482
Matthias Kloseb9621712010-04-24 17:59:49 +00007483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7484$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007485 ;;
7486 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7488$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007489 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007490esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007491
Guido van Rossum0a516c91994-09-12 10:58:40 +00007492# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007493
Michael W. Hudson54241132001-12-07 15:38:26 +00007494
7495
7496
7497
Benjamin Peterson99f03762010-04-11 22:15:28 +00007498
Thomas Wouters477c8d52006-05-27 19:21:47 +00007499
Georg Brandlb1441c72009-01-03 22:33:39 +00007500
Thomas Wouters477c8d52006-05-27 19:21:47 +00007501cat >>confdefs.h <<_ACEOF
7502#define SHLIB_EXT "$SO"
7503_ACEOF
7504
Guido van Rossum0a516c91994-09-12 10:58:40 +00007505# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007506# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007507# (Shared libraries in this instance are shared modules to be loaded into
7508# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7510$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007511if test -z "$LDSHARED"
7512then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007513 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007514 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007515 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007516 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007517 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007518 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007519 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007520 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007521 if test "$GCC" = "yes" ; then
7522 LDSHARED='$(CC) -shared'
7523 LDCXXSHARED='$(CXX) -shared'
7524 else
7525 LDSHARED='$(CC) -G'
7526 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007527 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007528 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007529 if test "$GCC" = "yes" ; then
7530 LDSHARED='$(CC) -shared'
7531 LDCXXSHARED='$(CXX) -shared'
7532 else
7533 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007534 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00007535 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007536 LDSHARED='$(CC) -bundle'
7537 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007538 if test "$enable_framework" ; then
7539 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007540 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7541 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007542 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007543 else
7544 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007545 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007546 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007547 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007548 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007549 LDSHARED='$(CC) -bundle'
7550 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007551 if test "$enable_framework" ; then
7552 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007553 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7554 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007555 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007556 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007557 # No framework, use the Python app as bundle-loader
7558 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007559 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007560 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007561 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007562 Darwin/*)
7563 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7564 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007565
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007566 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007567 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007568 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007569 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007570 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007571 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7572 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007573 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007574 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007575 LDSHARED='$(CC) -bundle'
7576 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007577 if test "$enable_framework" ; then
7578 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007579 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7580 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007581 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007582 else
7583 # No framework, use the Python app as bundle-loader
7584 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7585 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007586 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007587 fi
7588 fi
7589 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007590 Linux*|GNU*|QNX*)
7591 LDSHARED='$(CC) -shared'
7592 LDCXXSHARED='$(CXX) -shared';;
7593 BSD/OS*/4*)
7594 LDSHARED="gcc -shared"
7595 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007596 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007597 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007598 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007599 LDSHARED='$(CC) -shared'
7600 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007601 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007602 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007603 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007604 OpenBSD*)
7605 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7606 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007607 LDSHARED='$(CC) -shared $(CCSHARED)'
7608 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007609 else
7610 case `uname -r` in
7611 [01].* | 2.[0-7] | 2.[0-7].*)
7612 LDSHARED="ld -Bshareable ${LDFLAGS}"
7613 ;;
7614 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007615 LDSHARED='$(CC) -shared $(CCSHARED)'
7616 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007617 ;;
7618 esac
7619 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007620 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007621 LDSHARED='$(CC) -shared'
7622 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007623 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007624 if test "$GCC" = "yes" ; then
7625 LDSHARED='$(CC) -shared'
7626 LDCXXSHARED='$(CXX) -shared'
7627 else
7628 LDSHARED='$(CC) -G'
7629 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007630 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007631 SCO_SV*)
7632 LDSHARED='$(CC) -Wl,-G,-Bexport'
7633 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7634 CYGWIN*)
7635 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7636 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007637 *) LDSHARED="ld";;
7638 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007639fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7641$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007642LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007643BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007644# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007645# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7647$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007648if test -z "$CCSHARED"
7649then
Guido van Rossum07397971997-04-29 21:49:50 +00007650 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007651 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007652 then CCSHARED="-fPIC";
7653 elif test `uname -p` = sparc;
7654 then CCSHARED="-xcode=pic32";
7655 else CCSHARED="-Kpic";
7656 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007657 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007658 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007659 else CCSHARED="+z";
7660 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007661 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007662 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007663 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007664 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007665 if test "$GCC" = "yes"
7666 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007667 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007668 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007669 SCO_SV*)
7670 if test "$GCC" = "yes"
7671 then CCSHARED="-fPIC"
7672 else CCSHARED="-Kpic -belf"
7673 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007674 IRIX*/6*) case $CC in
7675 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007676 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007677 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007678 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7681$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007682# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007683# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7685$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007686if test -z "$LINKFORSHARED"
7687then
Guido van Rossum07397971997-04-29 21:49:50 +00007688 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007689 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007690 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007691 LINKFORSHARED="-Wl,-E -Wl,+s";;
7692# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007693 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007694 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007695 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007696 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007697 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007698 if test "$enable_framework"
7699 then
Jack Jansenda49e192005-01-07 13:08:22 +00007700 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007701 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007702 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007703 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007704 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007705 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007706 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007707 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7708 then
7709 LINKFORSHARED="-Wl,--export-dynamic"
7710 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007711 SunOS/5*) case $CC in
7712 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007713 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007714 then
7715 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007716 fi;;
7717 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007718 CYGWIN*)
7719 if test $enable_shared = "no"
7720 then
7721 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7722 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007723 QNX*)
7724 # -Wl,-E causes the symbols to be added to the dynamic
7725 # symbol table so that they can be found when a module
7726 # is loaded. -N 2048K causes the stack size to be set
7727 # to 2048 kilobytes so that the stack doesn't overflow
7728 # when running test_compile.py.
7729 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007730 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7733$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007734
Michael W. Hudson54241132001-12-07 15:38:26 +00007735
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007736
Matthias Kloseb9621712010-04-24 17:59:49 +00007737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7738$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007739if test ! "$LIBRARY" = "$LDLIBRARY"
7740then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007741 case $ac_sys_system in
7742 CYGWIN*)
7743 # Cygwin needs CCSHARED when building extension DLLs
7744 # but not when building the interpreter DLL.
7745 CFLAGSFORSHARED='';;
7746 *)
7747 CFLAGSFORSHARED='$(CCSHARED)'
7748 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7751$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007752
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007753# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7754# library (with --enable-shared).
7755# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007756# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7757# if it is not required, since it creates a dependency of the shared library
7758# to LIBS. This, in turn, means that applications linking the shared libpython
7759# don't need to link LIBS explicitly. The default should be only changed
7760# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007761
Matthias Kloseb9621712010-04-24 17:59:49 +00007762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7763$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007764case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007765 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007766 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007767esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7769$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007770
7771
Guido van Rossum627b2d71993-12-24 10:39:16 +00007772# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00007773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
7774$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02007775if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007776 $as_echo_n "(cached) " >&6
7777else
7778 ac_check_lib_save_LIBS=$LIBS
7779LIBS="-lsendfile $LIBS"
7780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7781/* end confdefs.h. */
7782
7783/* Override any GCC internal prototype to avoid an error.
7784 Use char because int might match the return type of a GCC
7785 builtin and then its argument prototype would still apply. */
7786#ifdef __cplusplus
7787extern "C"
7788#endif
7789char sendfile ();
7790int
7791main ()
7792{
7793return sendfile ();
7794 ;
7795 return 0;
7796}
7797_ACEOF
7798if ac_fn_c_try_link "$LINENO"; then :
7799 ac_cv_lib_sendfile_sendfile=yes
7800else
7801 ac_cv_lib_sendfile_sendfile=no
7802fi
7803rm -f core conftest.err conftest.$ac_objext \
7804 conftest$ac_exeext conftest.$ac_ext
7805LIBS=$ac_check_lib_save_LIBS
7806fi
7807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
7808$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02007809if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007810 cat >>confdefs.h <<_ACEOF
7811#define HAVE_LIBSENDFILE 1
7812_ACEOF
7813
7814 LIBS="-lsendfile $LIBS"
7815
7816fi
7817
Matthias Kloseb9621712010-04-24 17:59:49 +00007818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7819$as_echo_n "checking for dlopen in -ldl... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02007820if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007821 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007822else
Martin v. Löwis11437992002-04-12 09:54:03 +00007823 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007824LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007826/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007827
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007828/* Override any GCC internal prototype to avoid an error.
7829 Use char because int might match the return type of a GCC
7830 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007831#ifdef __cplusplus
7832extern "C"
7833#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007834char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007835int
7836main ()
7837{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007838return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007839 ;
7840 return 0;
7841}
7842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007843if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007844 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007845else
Matthias Kloseb9621712010-04-24 17:59:49 +00007846 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007848rm -f core conftest.err conftest.$ac_objext \
7849 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007850LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7853$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02007854if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007855 cat >>confdefs.h <<_ACEOF
7856#define HAVE_LIBDL 1
7857_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007858
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007859 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007860
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007861fi
7862 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7864$as_echo_n "checking for shl_load in -ldld... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02007865if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007866 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007867else
Martin v. Löwis11437992002-04-12 09:54:03 +00007868 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007869LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007871/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007872
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007873/* Override any GCC internal prototype to avoid an error.
7874 Use char because int might match the return type of a GCC
7875 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007876#ifdef __cplusplus
7877extern "C"
7878#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007879char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007880int
7881main ()
7882{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007883return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007884 ;
7885 return 0;
7886}
7887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007888if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007889 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007890else
Matthias Kloseb9621712010-04-24 17:59:49 +00007891 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007892fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007893rm -f core conftest.err conftest.$ac_objext \
7894 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007895LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007896fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7898$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02007899if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007900 cat >>confdefs.h <<_ACEOF
7901#define HAVE_LIBDLD 1
7902_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007903
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007904 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007905
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007906fi
7907 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007908
Georg Brandlb1441c72009-01-03 22:33:39 +00007909# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007910if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7912$as_echo_n "checking for library containing sem_init... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02007913if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007914 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007915else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007916 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007918/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007919
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007920/* Override any GCC internal prototype to avoid an error.
7921 Use char because int might match the return type of a GCC
7922 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007923#ifdef __cplusplus
7924extern "C"
7925#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007926char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007927int
7928main ()
7929{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007930return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007931 ;
7932 return 0;
7933}
7934_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007935for ac_lib in '' pthread rt posix4; do
7936 if test -z "$ac_lib"; then
7937 ac_res="none required"
7938 else
7939 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007940 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007941 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007942 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007943 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007944fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007945rm -f core conftest.err conftest.$ac_objext \
7946 conftest$ac_exeext
Antoine Pitrou37009202011-07-08 23:47:50 +02007947 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007948 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007949fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007950done
Antoine Pitrou37009202011-07-08 23:47:50 +02007951if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007952
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007953else
7954 ac_cv_search_sem_init=no
7955fi
7956rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007957LIBS=$ac_func_search_save_LIBS
7958fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7960$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007961ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007962if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007963 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007964
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007965fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007966 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007967 # posix4 on Solaris 2.6
7968 # pthread (first!) on Linux
7969fi
7970
Martin v. Löwis19d17342003-06-14 21:03:05 +00007971# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7973$as_echo_n "checking for textdomain in -lintl... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02007974if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007975 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007976else
7977 ac_check_lib_save_LIBS=$LIBS
7978LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007980/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007981
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007982/* Override any GCC internal prototype to avoid an error.
7983 Use char because int might match the return type of a GCC
7984 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007985#ifdef __cplusplus
7986extern "C"
7987#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007988char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007989int
7990main ()
7991{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007992return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007993 ;
7994 return 0;
7995}
7996_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007997if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007998 ac_cv_lib_intl_textdomain=yes
7999else
Matthias Kloseb9621712010-04-24 17:59:49 +00008000 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008002rm -f core conftest.err conftest.$ac_objext \
8003 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008004LIBS=$ac_check_lib_save_LIBS
8005fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8007$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02008008if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008009
Matthias Kloseb9621712010-04-24 17:59:49 +00008010$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008011
Brett Cannonc6d936e2009-06-07 20:09:53 +00008012 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008013fi
8014
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008015
8016# checks for system dependent C++ extensions support
8017case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008018 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8019$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008021/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008022
Georg Brandl59e87bd2011-02-15 19:48:59 +00008023 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008024int
8025main ()
8026{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008027loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008028 ;
8029 return 0;
8030}
Matthias Kloseb159a552010-04-25 21:00:44 +00008031
Martin v. Löwis11437992002-04-12 09:54:03 +00008032_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008033if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008034
Matthias Kloseb159a552010-04-25 21:00:44 +00008035
Matthias Kloseb9621712010-04-24 17:59:49 +00008036$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008037
Matthias Kloseb159a552010-04-25 21:00:44 +00008038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008039$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008040
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008041else
Matthias Kloseb159a552010-04-25 21:00:44 +00008042
8043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008044$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008045
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008046fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008047rm -f core conftest.err conftest.$ac_objext \
8048 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008049 *) ;;
8050esac
8051
Guido van Rossum70c7f481998-03-26 18:44:10 +00008052# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8054$as_echo_n "checking for t_open in -lnsl... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02008055if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008056 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008057else
Martin v. Löwis11437992002-04-12 09:54:03 +00008058 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008059LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008061/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008062
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008063/* Override any GCC internal prototype to avoid an error.
8064 Use char because int might match the return type of a GCC
8065 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008066#ifdef __cplusplus
8067extern "C"
8068#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008069char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008070int
8071main ()
8072{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008073return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008074 ;
8075 return 0;
8076}
8077_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008078if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008079 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008080else
Matthias Kloseb9621712010-04-24 17:59:49 +00008081 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008082fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008083rm -f core conftest.err conftest.$ac_objext \
8084 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008085LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008086fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8088$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02008089if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008090 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008091fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008092 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8094$as_echo_n "checking for socket in -lsocket... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02008095if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008096 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008097else
Martin v. Löwis11437992002-04-12 09:54:03 +00008098 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008099LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008101/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008102
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008103/* Override any GCC internal prototype to avoid an error.
8104 Use char because int might match the return type of a GCC
8105 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008106#ifdef __cplusplus
8107extern "C"
8108#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008109char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008110int
8111main ()
8112{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008113return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008114 ;
8115 return 0;
8116}
8117_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008118if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008119 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008120else
Matthias Kloseb9621712010-04-24 17:59:49 +00008121 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008122fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008123rm -f core conftest.err conftest.$ac_objext \
8124 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008125LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008126fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8128$as_echo "$ac_cv_lib_socket_socket" >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02008129if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008130 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008131fi
8132 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008133
Matthias Kloseb9621712010-04-24 17:59:49 +00008134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8135$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008136
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008137# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008138if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008139 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8141$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008142LIBS="$withval $LIBS"
8143
8144else
Matthias Kloseb9621712010-04-24 17:59:49 +00008145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8146$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008147fi
8148
Guido van Rossum7f43da71994-08-01 12:15:30 +00008149
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008150if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008151 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8152set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8154$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02008155if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008156 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008157else
8158 case $PKG_CONFIG in
8159 [\\/]* | ?:[\\/]*)
8160 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8161 ;;
8162 *)
8163 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8164for as_dir in $PATH
8165do
8166 IFS=$as_save_IFS
8167 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008168 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008169 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8170 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008171 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008172 break 2
8173 fi
8174done
Matthias Kloseb9621712010-04-24 17:59:49 +00008175 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008176IFS=$as_save_IFS
8177
8178 ;;
8179esac
8180fi
8181PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8182if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8184$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008185else
Matthias Kloseb9621712010-04-24 17:59:49 +00008186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8187$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008188fi
8189
8190
8191fi
8192if test -z "$ac_cv_path_PKG_CONFIG"; then
8193 ac_pt_PKG_CONFIG=$PKG_CONFIG
8194 # Extract the first word of "pkg-config", so it can be a program name with args.
8195set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8197$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02008198if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008199 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008200else
8201 case $ac_pt_PKG_CONFIG in
8202 [\\/]* | ?:[\\/]*)
8203 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8204 ;;
8205 *)
8206 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8207for as_dir in $PATH
8208do
8209 IFS=$as_save_IFS
8210 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008211 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008212 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8213 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008214 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008215 break 2
8216 fi
8217done
Matthias Kloseb9621712010-04-24 17:59:49 +00008218 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008219IFS=$as_save_IFS
8220
8221 ;;
8222esac
8223fi
8224ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8225if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8227$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008228else
Matthias Kloseb9621712010-04-24 17:59:49 +00008229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8230$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008231fi
8232
8233 if test "x$ac_pt_PKG_CONFIG" = x; then
8234 PKG_CONFIG=""
8235 else
8236 case $cross_compiling:$ac_tool_warned in
8237yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008238{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8239$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008240ac_tool_warned=yes ;;
8241esac
8242 PKG_CONFIG=$ac_pt_PKG_CONFIG
8243 fi
8244else
8245 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8246fi
8247
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008248
8249# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8251$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008252
8253# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008254if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008255 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008256else
8257 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008258fi
8259
8260
Matthias Kloseb9621712010-04-24 17:59:49 +00008261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8262$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008263
8264# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8266$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008267
8268# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008269if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008270 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008271else
8272 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008273fi
8274
8275
8276if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008277 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8278else
8279 LIBFFI_INCLUDEDIR=""
8280fi
8281
8282
Matthias Kloseb9621712010-04-24 17:59:49 +00008283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8284$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008285
Benjamin Peterson076ed002010-10-31 17:11:02 +00008286# Check for support for loadable sqlite extensions
8287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8288$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8289# Check whether --enable-loadable-sqlite-extensions was given.
8290if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8291 enableval=$enable_loadable_sqlite_extensions;
8292else
8293 enable_loadable_sqlite_extensions="no"
8294fi
8295
8296
8297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8298$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8299
Matthias Klose55708cc2009-04-30 08:06:49 +00008300# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8302$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008303
8304# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008305if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008306 withval=$with_dbmliborder;
8307if test x$with_dbmliborder = xyes
8308then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008309as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008310else
8311 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8312 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8313 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008314 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008315 fi
8316 done
8317fi
8318fi
8319
Matthias Kloseb9621712010-04-24 17:59:49 +00008320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8321$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008322
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008323# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008324
8325
Matthias Kloseb9621712010-04-24 17:59:49 +00008326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8327$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008328
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008329# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008330if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008331 withval=$with_signal_module;
8332fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008333
8334
8335if test -z "$with_signal_module"
8336then with_signal_module="yes"
8337fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8339$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008340
8341if test "${with_signal_module}" = "yes"; then
8342 USE_SIGNAL_MODULE=""
8343 SIGNAL_OBJS=""
8344else
8345 USE_SIGNAL_MODULE="#"
8346 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8347fi
8348
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008349# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008350
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008351USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008352
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008353
Martin v. Löwis11437992002-04-12 09:54:03 +00008354
8355# Templates for things AC_DEFINEd more than once.
8356# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008357
8358
Martin v. Löwis11437992002-04-12 09:54:03 +00008359
Matthias Kloseb9621712010-04-24 17:59:49 +00008360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8361$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008362
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008363# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008364if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008365 withval=$with_threads;
8366fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008367
8368
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008369# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008370
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008371# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008372if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008373 withval=$with_thread; with_threads=$with_thread
8374fi
8375
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008376
8377if test -z "$with_threads"
8378then with_threads="yes"
8379fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8381$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008382
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008383
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008384if test "$with_threads" = "no"
8385then
8386 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008387elif test "$ac_cv_pthread_is_default" = yes
8388then
Matthias Kloseb9621712010-04-24 17:59:49 +00008389 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008390
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008391 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008392 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008393
8394 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008395 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008396elif test "$ac_cv_kpthread" = "yes"
8397then
8398 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008399 if test "$ac_cv_cxx_thread" = "yes"; then
8400 CXX="$CXX -Kpthread"
8401 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008402 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008403
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008404 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008405 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008406elif test "$ac_cv_kthread" = "yes"
8407then
8408 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008409 if test "$ac_cv_cxx_thread" = "yes"; then
8410 CXX="$CXX -Kthread"
8411 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008412 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008413
8414 posix_threads=yes
8415 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008416elif test "$ac_cv_pthread" = "yes"
8417then
8418 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008419 if test "$ac_cv_cxx_thread" = "yes"; then
8420 CXX="$CXX -pthread"
8421 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008422 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008423
8424 posix_threads=yes
8425 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008426else
8427 if test ! -z "$with_threads" -a -d "$with_threads"
8428 then LDFLAGS="$LDFLAGS -L$with_threads"
8429 fi
8430 if test ! -z "$withval" -a -d "$withval"
8431 then LDFLAGS="$LDFLAGS -L$withval"
8432 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008433
8434 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008435 # define _POSIX_THREADS in unistd.h. Some apparently don't
8436 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8438$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008440/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008441
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008442#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008443#ifdef _POSIX_THREADS
8444yes
8445#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008446
8447_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008448if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008449 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008450 unistd_defines_pthreads=yes
8451else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008452 unistd_defines_pthreads=no
8453fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008454rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008455
Matthias Kloseb9621712010-04-24 17:59:49 +00008456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8457$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008458
Matthias Kloseb9621712010-04-24 17:59:49 +00008459 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008460
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008461 # Just looking for pthread_create in libpthread is not enough:
8462 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8463 # So we really have to include pthread.h, and then link.
8464 _libs=$LIBS
8465 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8467$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008469/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008470#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008471
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008472void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008473int
8474main ()
8475{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008476
8477pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008478 ;
8479 return 0;
8480}
8481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008482if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008483
Matthias Kloseb9621712010-04-24 17:59:49 +00008484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8485$as_echo "yes" >&6; }
8486 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008487
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008488 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008489 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008490else
Martin v. Löwis11437992002-04-12 09:54:03 +00008491
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008492 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008493 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Antoine Pitrou37009202011-07-08 23:47:50 +02008494if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008495 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008496
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008497 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008498 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008499else
Guido van Rossumad678af1998-10-02 14:42:15 +00008500
Matthias Kloseb9621712010-04-24 17:59:49 +00008501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8502$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02008503if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008504 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008505else
Martin v. Löwis11437992002-04-12 09:54:03 +00008506 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008507LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008509/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008510
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008511/* Override any GCC internal prototype to avoid an error.
8512 Use char because int might match the return type of a GCC
8513 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008514#ifdef __cplusplus
8515extern "C"
8516#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008517char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008518int
8519main ()
8520{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008521return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008522 ;
8523 return 0;
8524}
8525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008526if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008527 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008528else
Matthias Kloseb9621712010-04-24 17:59:49 +00008529 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008530fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008531rm -f core conftest.err conftest.$ac_objext \
8532 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008533LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008534fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8536$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02008537if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008538 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008539
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008540 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008541 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008542 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008543else
Greg Steinadf63d62000-07-05 10:38:09 +00008544
Matthias Kloseb9621712010-04-24 17:59:49 +00008545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8546$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02008547if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008548 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008549else
Martin v. Löwis11437992002-04-12 09:54:03 +00008550 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008551LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008553/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008554
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008555/* Override any GCC internal prototype to avoid an error.
8556 Use char because int might match the return type of a GCC
8557 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008558#ifdef __cplusplus
8559extern "C"
8560#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008561char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008562int
8563main ()
8564{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008565return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008566 ;
8567 return 0;
8568}
8569_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008570if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008571 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008572else
Matthias Kloseb9621712010-04-24 17:59:49 +00008573 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008574fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008575rm -f core conftest.err conftest.$ac_objext \
8576 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008577LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008578fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8580$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02008581if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008582 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008583
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008584 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008585 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008586 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008587else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008588
Matthias Kloseb9621712010-04-24 17:59:49 +00008589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8590$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02008591if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008592 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008593else
Martin v. Löwis11437992002-04-12 09:54:03 +00008594 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008595LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008597/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008598
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008599/* Override any GCC internal prototype to avoid an error.
8600 Use char because int might match the return type of a GCC
8601 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008602#ifdef __cplusplus
8603extern "C"
8604#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008605char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008606int
8607main ()
8608{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008609return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008610 ;
8611 return 0;
8612}
8613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008614if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008615 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008616else
Matthias Kloseb9621712010-04-24 17:59:49 +00008617 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008618fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008619rm -f core conftest.err conftest.$ac_objext \
8620 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008621LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008622fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8624$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02008625if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008626 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008627
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008628 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008629 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008630 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008631else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008632
Matthias Kloseb9621712010-04-24 17:59:49 +00008633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8634$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02008635if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008636 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008637else
Martin v. Löwis11437992002-04-12 09:54:03 +00008638 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008639LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008640cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008641/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008642
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008643/* Override any GCC internal prototype to avoid an error.
8644 Use char because int might match the return type of a GCC
8645 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008646#ifdef __cplusplus
8647extern "C"
8648#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008649char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008650int
8651main ()
8652{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008653return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008654 ;
8655 return 0;
8656}
8657_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008658if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008659 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008660else
Matthias Kloseb9621712010-04-24 17:59:49 +00008661 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008662fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008663rm -f core conftest.err conftest.$ac_objext \
8664 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008665LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008666fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8668$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02008669if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008670 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008671
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008672 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008673 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008674 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008675else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008676
Martin v. Löwis130fb172001-07-19 11:00:41 +00008677 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008678fi
8679
Guido van Rossum627b2d71993-12-24 10:39:16 +00008680
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008681fi
8682
Guido van Rossum0be3e491997-05-22 20:33:33 +00008683fi
8684
Guido van Rossum49545951997-12-02 19:28:29 +00008685fi
8686
Guido van Rossumb93a8621998-05-07 13:27:32 +00008687fi
8688
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008689fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008690rm -f core conftest.err conftest.$ac_objext \
8691 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008692
Matthias Kloseb9621712010-04-24 17:59:49 +00008693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8694$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02008695if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008696 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008697else
Martin v. Löwis11437992002-04-12 09:54:03 +00008698 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008699LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008700cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008701/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008702
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008703/* Override any GCC internal prototype to avoid an error.
8704 Use char because int might match the return type of a GCC
8705 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008706#ifdef __cplusplus
8707extern "C"
8708#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008709char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008710int
8711main ()
8712{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008713return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008714 ;
8715 return 0;
8716}
8717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008718if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008719 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008720else
Matthias Kloseb9621712010-04-24 17:59:49 +00008721 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008722fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008723rm -f core conftest.err conftest.$ac_objext \
8724 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008725LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008726fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8728$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02008729if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008730 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008731
Martin v. Löwis130fb172001-07-19 11:00:41 +00008732 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008733 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008734 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008735fi
8736
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008737
Neal Norwitza978ab02002-11-02 16:58:05 +00008738 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8740$as_echo_n "checking for thr_create in -lthread... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02008741if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008742 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008743else
Martin v. Löwis11437992002-04-12 09:54:03 +00008744 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008745LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008747/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008748
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008749/* Override any GCC internal prototype to avoid an error.
8750 Use char because int might match the return type of a GCC
8751 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008752#ifdef __cplusplus
8753extern "C"
8754#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008755char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008756int
8757main ()
8758{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008759return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008760 ;
8761 return 0;
8762}
8763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008764if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008765 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008766else
Matthias Kloseb9621712010-04-24 17:59:49 +00008767 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008768fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008769rm -f core conftest.err conftest.$ac_objext \
8770 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008771LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008772fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8774$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02008775if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008776 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008777
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008778 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008779 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008780 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008781fi
8782
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008783 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008784fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008785
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008786if test "$posix_threads" = "yes"; then
8787 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008788
Matthias Kloseb9621712010-04-24 17:59:49 +00008789$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008790
8791 fi
8792
8793 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8794 case $ac_sys_system/$ac_sys_release in
8795 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008796$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008797
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008798 ;;
8799 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008800$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008801
8802 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008803 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008804$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008805
8806 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008807 AIX/6)
8808$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8809
8810 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008811 esac
8812
Matthias Kloseb9621712010-04-24 17:59:49 +00008813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8814$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02008815 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008816 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008817else
Matthias Kloseb9621712010-04-24 17:59:49 +00008818 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008819 ac_cv_pthread_system_supported=no
8820else
Matthias Kloseb9621712010-04-24 17:59:49 +00008821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008822/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008823#include <pthread.h>
8824 void *foo(void *parm) {
8825 return NULL;
8826 }
8827 main() {
8828 pthread_attr_t attr;
8829 pthread_t id;
8830 if (pthread_attr_init(&attr)) exit(-1);
8831 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8832 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8833 exit(0);
8834 }
8835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008836if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008837 ac_cv_pthread_system_supported=yes
8838else
Matthias Kloseb9621712010-04-24 17:59:49 +00008839 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008841rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8842 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008843fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008844
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008845
Guido van Rossum627b2d71993-12-24 10:39:16 +00008846fi
8847
Matthias Kloseb9621712010-04-24 17:59:49 +00008848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8849$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008850 if test "$ac_cv_pthread_system_supported" = "yes"; then
8851
Matthias Kloseb9621712010-04-24 17:59:49 +00008852$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008853
8854 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008855 for ac_func in pthread_sigmask
8856do :
8857 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Antoine Pitrou37009202011-07-08 23:47:50 +02008858if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008859 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008860#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008861_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008862 case $ac_sys_system in
8863 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008864
Matthias Kloseb9621712010-04-24 17:59:49 +00008865$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008866
8867 ;;
8868 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008869fi
8870done
8871
8872fi
8873
8874
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008875# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008876
Matthias Kloseb9621712010-04-24 17:59:49 +00008877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8878$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008879# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008880if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008881 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008882 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8884$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008885 ipv6=no
8886 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008887 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8888$as_echo "yes" >&6; }
8889 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008890
8891 ipv6=yes
8892 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008893 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008894else
Martin v. Löwis11437992002-04-12 09:54:03 +00008895
Matthias Kloseb9621712010-04-24 17:59:49 +00008896 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008897
Matthias Kloseb9621712010-04-24 17:59:49 +00008898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8899$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008900 ipv6=no
8901
8902else
Matthias Kloseb9621712010-04-24 17:59:49 +00008903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008904/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008905 /* AF_INET6 available check */
8906#include <sys/types.h>
8907#include <sys/socket.h>
8908main()
8909{
8910 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8911 exit(1);
8912 else
8913 exit(0);
8914}
8915
Martin v. Löwis11437992002-04-12 09:54:03 +00008916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008917if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008918
Matthias Kloseb9621712010-04-24 17:59:49 +00008919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8920$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008921 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008922
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008923else
Matthias Kloseb159a552010-04-25 21:00:44 +00008924
Matthias Kloseb9621712010-04-24 17:59:49 +00008925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8926$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008927 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008928
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008929fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008930rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8931 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008932fi
8933
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008934
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008935if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8937$as_echo_n "checking if RFC2553 API is available... " >&6; }
8938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008939/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008940
8941 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008942#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008943int
8944main ()
8945{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008946struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008947 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008948 ;
8949 return 0;
8950}
Matthias Kloseb159a552010-04-25 21:00:44 +00008951
Martin v. Löwis11437992002-04-12 09:54:03 +00008952_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008953if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008954
8955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008956$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008957 ipv6=yes
8958
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008959else
Matthias Kloseb159a552010-04-25 21:00:44 +00008960
8961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008962$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008963 ipv6=no
8964
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008967fi
8968
8969if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008970 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008971
8972fi
8973
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008974fi
8975
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008976
8977ipv6type=unknown
8978ipv6lib=none
8979ipv6trylibc=no
8980
8981if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8983$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008984 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8985 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008986 case $i in
8987 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008989/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008990
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008991#include <netinet/in.h>
8992#ifdef IPV6_INRIA_VERSION
8993yes
8994#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008995_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008996if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008997 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008998 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008999fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009000rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009001
9002 ;;
9003 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009005/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009006
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009007#include <netinet/in.h>
9008#ifdef __KAME__
9009yes
9010#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009011_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009012if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009013 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009014 ipv6type=$i;
9015 ipv6lib=inet6
9016 ipv6libdir=/usr/local/v6/lib
9017 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009018fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009019rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009020
9021 ;;
9022 linux-glibc)
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 <features.h>
9027#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
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öwisa2ac6022001-08-09 11:40:14 +00009033 ipv6type=$i;
9034 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009035fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009036rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009037
9038 ;;
9039 linux-inet6)
9040 if test -d /usr/inet6; then
9041 ipv6type=$i
9042 ipv6lib=inet6
9043 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009044 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009045 fi
9046 ;;
9047 solaris)
9048 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009049 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009050 ipv6type=$i
9051 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009052 fi
9053 fi
9054 ;;
9055 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009057/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009058
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009059#include <sys/param.h>
9060#ifdef _TOSHIBA_INET6
9061yes
9062#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009063_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009064if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009065 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009066 ipv6type=$i;
9067 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009068 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009069fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009070rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009071
9072 ;;
9073 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009075/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009076
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009077#include </usr/local/v6/include/sys/v6config.h>
9078#ifdef __V6D__
9079yes
9080#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009081_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009082if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009083 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009084 ipv6type=$i;
9085 ipv6lib=v6;
9086 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009087 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009088fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009089rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009090
9091 ;;
9092 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009094/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009095
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009096#include <sys/param.h>
9097#ifdef _ZETA_MINAMI_INET6
9098yes
9099#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009100_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009101if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009102 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009103 ipv6type=$i;
9104 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009105 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009106fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009107rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009108
9109 ;;
9110 esac
9111 if test "$ipv6type" != "unknown"; then
9112 break
9113 fi
9114 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9116$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009117fi
9118
9119if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9120 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9121 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9122 echo "using lib$ipv6lib"
9123 else
9124 if test $ipv6trylibc = "yes"; then
9125 echo "using libc"
9126 else
9127 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9128 echo "You need to fetch lib$ipv6lib.a from appropriate"
9129 echo 'ipv6 kit and compile beforehand.'
9130 exit 1
9131 fi
9132 fi
9133fi
9134
Matthias Kloseb9621712010-04-24 17:59:49 +00009135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9136$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009138/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009139
9140 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009141int
9142main ()
9143{
9144FSIORefNum fRef = 0
9145 ;
9146 return 0;
9147}
Matthias Kloseb159a552010-04-25 21:00:44 +00009148
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009149_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009150if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009151
Matthias Kloseb159a552010-04-25 21:00:44 +00009152
Matthias Kloseb9621712010-04-24 17:59:49 +00009153$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009154
Matthias Kloseb9621712010-04-24 17:59:49 +00009155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9156$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009157
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009158else
Matthias Kloseb159a552010-04-25 21:00:44 +00009159
Matthias Kloseb9621712010-04-24 17:59:49 +00009160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9161$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009162
9163fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9165
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009166# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9168$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009169
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009170# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009171if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009172 withval=$with_doc_strings;
9173fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009174
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009175
9176if test -z "$with_doc_strings"
9177then with_doc_strings="yes"
9178fi
9179if test "$with_doc_strings" != "no"
9180then
9181
Matthias Kloseb9621712010-04-24 17:59:49 +00009182$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009183
9184fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9186$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009187
Antoine Pitrou042b1282010-08-13 21:15:58 +00009188# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9190$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009191
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009192# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009193if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009194 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009195if test "$withval" != no
9196then
9197
Matthias Kloseb9621712010-04-24 17:59:49 +00009198$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009199
Matthias Kloseb9621712010-04-24 17:59:49 +00009200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9201$as_echo "yes" >&6; }
9202else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9203$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009204fi
9205else
Matthias Kloseb9621712010-04-24 17:59:49 +00009206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9207$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009208fi
9209
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009210
9211# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9213$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009214
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009215# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009216if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009217 withval=$with_pymalloc;
9218fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009219
Neil Schemenauera35c6882001-02-27 04:45:05 +00009220
Neil Schemenauer16c22972002-03-22 15:34:49 +00009221if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009222then
9223 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009224 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009225fi
9226if test "$with_pymalloc" != "no"
9227then
Martin v. Löwis11437992002-04-12 09:54:03 +00009228
Matthias Kloseb9621712010-04-24 17:59:49 +00009229$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009230
9231fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9233$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009234
Benjamin Peterson05159c42009-12-03 03:01:27 +00009235# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9237$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009238
9239# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009240if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009241 withval=$with_valgrind;
9242else
9243 with_valgrind=no
9244fi
9245
Matthias Kloseb9621712010-04-24 17:59:49 +00009246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9247$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009248if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009249 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Antoine Pitrou37009202011-07-08 23:47:50 +02009250if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009251
Matthias Kloseb9621712010-04-24 17:59:49 +00009252$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009253
9254else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009255 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009256
9257fi
9258
9259
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009260 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009261fi
9262
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009263# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009264
Guido van Rossum98935bf2001-09-05 19:13:16 +00009265DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009266
Guido van Rossume97ee181999-12-20 21:27:22 +00009267# the dlopen() function means we might want to use dynload_shlib.o. some
9268# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009269for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009270do :
9271 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Antoine Pitrou37009202011-07-08 23:47:50 +02009272if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009273 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009274#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009275_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009276
Guido van Rossume97ee181999-12-20 21:27:22 +00009277fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009278done
Guido van Rossume97ee181999-12-20 21:27:22 +00009279
Michael W. Hudson54241132001-12-07 15:38:26 +00009280
Guido van Rossume97ee181999-12-20 21:27:22 +00009281# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9282# loading of modules.
9283
Matthias Kloseb9621712010-04-24 17:59:49 +00009284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9285$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009286if test -z "$DYNLOADFILE"
9287then
9288 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009289 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9290 if test "$ac_cv_func_dlopen" = yes
9291 then DYNLOADFILE="dynload_shlib.o"
9292 else DYNLOADFILE="dynload_aix.o"
9293 fi
9294 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009295 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009296 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9297 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009298 *)
9299 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9300 # out any dynamic loading
9301 if test "$ac_cv_func_dlopen" = yes
9302 then DYNLOADFILE="dynload_shlib.o"
9303 else DYNLOADFILE="dynload_stub.o"
9304 fi
9305 ;;
9306 esac
9307fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9309$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009310if test "$DYNLOADFILE" != "dynload_stub.o"
9311then
Martin v. Löwis11437992002-04-12 09:54:03 +00009312
Matthias Kloseb9621712010-04-24 17:59:49 +00009313$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009314
9315fi
9316
Neil Schemenauer4e425612001-06-19 15:44:15 +00009317# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9318
Michael W. Hudson54241132001-12-07 15:38:26 +00009319
Matthias Kloseb9621712010-04-24 17:59:49 +00009320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9321$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009322if test -z "$MACHDEP_OBJS"
9323then
Jack Jansene578a632001-08-15 01:27:14 +00009324 MACHDEP_OBJS=$extra_machdep_objs
9325else
9326 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009327fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9329$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009330
Guido van Rossum627b2d71993-12-24 10:39:16 +00009331# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009332for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Antoine Pitrou8250e232011-02-25 23:41:16 +00009333 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009334 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009335 futimens futimes gai_strerror \
9336 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009337 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07009338 if_nameindex \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009339 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +02009340 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009341 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009342 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009343 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009344 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009345 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Ross Lagerwallbc808222011-06-25 12:13:40 +02009346 sigaction sigaltstack siginterrupt sigpending sigrelse \
9347 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009348 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009349 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
9350 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009351do :
9352 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9353ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009354if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009355 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009356#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009357_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009358
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009359fi
9360done
9361
Michael W. Hudson54241132001-12-07 15:38:26 +00009362
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009363# For some functions, having a definition is not sufficient, since
9364# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9366$as_echo_n "checking for chroot... " >&6; }
9367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009368/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009369#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009370int
9371main ()
9372{
9373void *x=chroot
9374 ;
9375 return 0;
9376}
9377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009378if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009379
Matthias Kloseb9621712010-04-24 17:59:49 +00009380$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009381
Matthias Kloseb159a552010-04-25 21:00:44 +00009382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009383$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009384else
Matthias Kloseb9621712010-04-24 17:59:49 +00009385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9386$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009387
9388fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9391$as_echo_n "checking for link... " >&6; }
9392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009393/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009394#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009395int
9396main ()
9397{
9398void *x=link
9399 ;
9400 return 0;
9401}
9402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009403if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009404
Matthias Kloseb9621712010-04-24 17:59:49 +00009405$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009406
Matthias Kloseb159a552010-04-25 21:00:44 +00009407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009408$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009409else
Matthias Kloseb9621712010-04-24 17:59:49 +00009410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9411$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009412
9413fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9416$as_echo_n "checking for symlink... " >&6; }
9417cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009418/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009419#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009420int
9421main ()
9422{
9423void *x=symlink
9424 ;
9425 return 0;
9426}
9427_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009428if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009429
Matthias Kloseb9621712010-04-24 17:59:49 +00009430$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009431
Matthias Kloseb159a552010-04-25 21:00:44 +00009432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009433$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009434else
Matthias Kloseb9621712010-04-24 17:59:49 +00009435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9436$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009437
9438fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9441$as_echo_n "checking for fchdir... " >&6; }
9442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009443/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009444#include <unistd.h>
9445int
9446main ()
9447{
9448void *x=fchdir
9449 ;
9450 return 0;
9451}
9452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009453if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009454
Matthias Kloseb9621712010-04-24 17:59:49 +00009455$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009456
Matthias Kloseb159a552010-04-25 21:00:44 +00009457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009458$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009459else
Matthias Kloseb9621712010-04-24 17:59:49 +00009460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9461$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009462
9463fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9466$as_echo_n "checking for fsync... " >&6; }
9467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009468/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009469#include <unistd.h>
9470int
9471main ()
9472{
9473void *x=fsync
9474 ;
9475 return 0;
9476}
9477_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009478if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009479
Matthias Kloseb9621712010-04-24 17:59:49 +00009480$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009481
Matthias Kloseb159a552010-04-25 21:00:44 +00009482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009483$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009484else
Matthias Kloseb9621712010-04-24 17:59:49 +00009485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9486$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009487
9488fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9491$as_echo_n "checking for fdatasync... " >&6; }
9492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009493/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009494#include <unistd.h>
9495int
9496main ()
9497{
9498void *x=fdatasync
9499 ;
9500 return 0;
9501}
9502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009503if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009504
Matthias Kloseb9621712010-04-24 17:59:49 +00009505$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009506
Matthias Kloseb159a552010-04-25 21:00:44 +00009507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009508$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009509else
Matthias Kloseb9621712010-04-24 17:59:49 +00009510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9511$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009512
9513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9516$as_echo_n "checking for epoll... " >&6; }
9517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009518/* end confdefs.h. */
9519#include <sys/epoll.h>
9520int
9521main ()
9522{
9523void *x=epoll_create
9524 ;
9525 return 0;
9526}
9527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009528if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009529
Matthias Kloseb9621712010-04-24 17:59:49 +00009530$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009531
Matthias Kloseb159a552010-04-25 21:00:44 +00009532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009533$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009534else
Matthias Kloseb9621712010-04-24 17:59:49 +00009535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9536$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009537
9538fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9541$as_echo_n "checking for kqueue... " >&6; }
9542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009543/* end confdefs.h. */
9544
9545#include <sys/types.h>
9546#include <sys/event.h>
9547
9548int
9549main ()
9550{
9551int x=kqueue()
9552 ;
9553 return 0;
9554}
9555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009556if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009557
Matthias Kloseb9621712010-04-24 17:59:49 +00009558$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009559
Matthias Kloseb159a552010-04-25 21:00:44 +00009560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009561$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009562else
Matthias Kloseb9621712010-04-24 17:59:49 +00009563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9564$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009565
9566fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009568# On some systems (eg. FreeBSD 5), we would find a definition of the
9569# functions ctermid_r, setgroups in the library, but no prototype
9570# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9571# address to avoid compiler warnings and potential miscompilations
9572# because of the missing prototypes.
9573
Matthias Kloseb9621712010-04-24 17:59:49 +00009574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9575$as_echo_n "checking for ctermid_r... " >&6; }
9576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009577/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009578
Martin v. Löwisd5843682002-11-21 20:41:28 +00009579#include <stdio.h>
9580
Martin v. Löwisd5843682002-11-21 20:41:28 +00009581int
9582main ()
9583{
9584void* p = ctermid_r
9585 ;
9586 return 0;
9587}
9588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009589if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009590
Matthias Kloseb9621712010-04-24 17:59:49 +00009591$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009592
Matthias Kloseb159a552010-04-25 21:00:44 +00009593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009594$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009595else
Matthias Kloseb9621712010-04-24 17:59:49 +00009596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9597$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009598
9599fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9601
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9603$as_echo_n "checking for flock declaration... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02009604if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009605 $as_echo_n "(cached) " >&6
9606else
9607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009608/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009609#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009610int
9611main ()
9612{
9613void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009614
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009615 ;
9616 return 0;
9617}
9618_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009619if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009620 ac_cv_flock_decl=yes
9621else
9622 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009623
9624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009626
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009627fi
9628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9629$as_echo "$ac_cv_flock_decl" >&6; }
9630if test "x${ac_cv_flock_decl}" = xyes; then
9631 for ac_func in flock
9632do :
9633 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Antoine Pitrou37009202011-07-08 23:47:50 +02009634if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009635 cat >>confdefs.h <<_ACEOF
9636#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009637_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009638
Antoine Pitroua3000072010-09-07 14:52:42 +00009639else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009641$as_echo_n "checking for flock in -lbsd... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02009642if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009643 $as_echo_n "(cached) " >&6
9644else
9645 ac_check_lib_save_LIBS=$LIBS
9646LIBS="-lbsd $LIBS"
9647cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9648/* end confdefs.h. */
9649
9650/* Override any GCC internal prototype to avoid an error.
9651 Use char because int might match the return type of a GCC
9652 builtin and then its argument prototype would still apply. */
9653#ifdef __cplusplus
9654extern "C"
9655#endif
9656char flock ();
9657int
9658main ()
9659{
9660return flock ();
9661 ;
9662 return 0;
9663}
9664_ACEOF
9665if ac_fn_c_try_link "$LINENO"; then :
9666 ac_cv_lib_bsd_flock=yes
9667else
9668 ac_cv_lib_bsd_flock=no
9669fi
9670rm -f core conftest.err conftest.$ac_objext \
9671 conftest$ac_exeext conftest.$ac_ext
9672LIBS=$ac_check_lib_save_LIBS
9673fi
9674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9675$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02009676if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009677 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009678
9679
9680$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9681
9682
9683fi
9684
9685
9686fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009687done
9688
Antoine Pitroua3000072010-09-07 14:52:42 +00009689fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009690
Matthias Kloseb9621712010-04-24 17:59:49 +00009691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9692$as_echo_n "checking for getpagesize... " >&6; }
9693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009694/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009695
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009696#include <unistd.h>
9697
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009698int
9699main ()
9700{
9701void* p = getpagesize
9702 ;
9703 return 0;
9704}
9705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009706if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009707
Matthias Kloseb9621712010-04-24 17:59:49 +00009708$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009709
Matthias Kloseb159a552010-04-25 21:00:44 +00009710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009711$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009712else
Matthias Kloseb9621712010-04-24 17:59:49 +00009713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9714$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009715
9716fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009718
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mallopt can set malloc mmap threshold" >&5
9720$as_echo_n "checking whether mallopt can set malloc mmap threshold... " >&6; }
9721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9722/* end confdefs.h. */
9723
9724#include <malloc.h>
9725
9726int
9727main ()
9728{
9729mallopt(M_MMAP_THRESHOLD, 256 * 1024)
9730 ;
9731 return 0;
9732}
9733_ACEOF
9734if ac_fn_c_try_compile "$LINENO"; then :
9735
9736$as_echo "#define HAVE_MALLOPT_MMAP_THRESHOLD 1" >>confdefs.h
9737
9738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9739$as_echo "yes" >&6; }
9740else
9741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9742$as_echo "no" >&6; }
9743
9744fi
9745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9746
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009747for ac_prog in true
9748do
9749 # Extract the first word of "$ac_prog", so it can be a program name with args.
9750set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9752$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02009753if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009754 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009755else
9756 if test -n "$TRUE"; then
9757 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9758else
9759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9760for as_dir in $PATH
9761do
9762 IFS=$as_save_IFS
9763 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009764 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009765 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 +00009766 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009767 $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 +00009768 break 2
9769 fi
9770done
Matthias Kloseb9621712010-04-24 17:59:49 +00009771 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009772IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009773
9774fi
9775fi
9776TRUE=$ac_cv_prog_TRUE
9777if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9779$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009780else
Matthias Kloseb9621712010-04-24 17:59:49 +00009781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9782$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009783fi
9784
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009785
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009786 test -n "$TRUE" && break
9787done
9788test -n "$TRUE" || TRUE="/bin/true"
9789
9790
Matthias Kloseb9621712010-04-24 17:59:49 +00009791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9792$as_echo_n "checking for inet_aton in -lc... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02009793if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009794 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009795else
9796 ac_check_lib_save_LIBS=$LIBS
9797LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009799/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009800
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009801/* Override any GCC internal prototype to avoid an error.
9802 Use char because int might match the return type of a GCC
9803 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009804#ifdef __cplusplus
9805extern "C"
9806#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009807char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009808int
9809main ()
9810{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009811return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009812 ;
9813 return 0;
9814}
9815_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009816if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009817 ac_cv_lib_c_inet_aton=yes
9818else
Matthias Kloseb9621712010-04-24 17:59:49 +00009819 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009820fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009821rm -f core conftest.err conftest.$ac_objext \
9822 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009823LIBS=$ac_check_lib_save_LIBS
9824fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9826$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02009827if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009828 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009829else
Matthias Kloseb9621712010-04-24 17:59:49 +00009830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9831$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02009832if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009833 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009834else
9835 ac_check_lib_save_LIBS=$LIBS
9836LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009838/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009839
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009840/* Override any GCC internal prototype to avoid an error.
9841 Use char because int might match the return type of a GCC
9842 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009843#ifdef __cplusplus
9844extern "C"
9845#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009846char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009847int
9848main ()
9849{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009850return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009851 ;
9852 return 0;
9853}
9854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009855if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009856 ac_cv_lib_resolv_inet_aton=yes
9857else
Matthias Kloseb9621712010-04-24 17:59:49 +00009858 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009860rm -f core conftest.err conftest.$ac_objext \
9861 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009862LIBS=$ac_check_lib_save_LIBS
9863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9865$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02009866if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009867 cat >>confdefs.h <<_ACEOF
9868#define HAVE_LIBRESOLV 1
9869_ACEOF
9870
9871 LIBS="-lresolv $LIBS"
9872
9873fi
9874
9875
9876fi
9877
9878
Christian Heimesd0764e22007-12-04 15:00:33 +00009879# On Tru64, chflags seems to be present, but calling it will
9880# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9882$as_echo_n "checking for chflags... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02009883if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009884 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009885else
Matthias Kloseb9621712010-04-24 17:59:49 +00009886 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009887 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009888else
Matthias Kloseb9621712010-04-24 17:59:49 +00009889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009890/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009891
Christian Heimesd0764e22007-12-04 15:00:33 +00009892#include <sys/stat.h>
9893#include <unistd.h>
9894int main(int argc, char*argv[])
9895{
9896 if(chflags(argv[0], 0) != 0)
9897 return 1;
9898 return 0;
9899}
Ned Deily3eb67d52011-06-28 00:00:28 -07009900
Christian Heimesd0764e22007-12-04 15:00:33 +00009901_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009902if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009903 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009904else
Matthias Kloseb9621712010-04-24 17:59:49 +00009905 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009906fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009907rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9908 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009909fi
9910
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009911
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9914$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009915if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009916 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Antoine Pitrou37009202011-07-08 23:47:50 +02009917if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009918 ac_cv_have_chflags="yes"
9919else
9920 ac_cv_have_chflags="no"
9921fi
9922
9923fi
9924if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009925
Matthias Kloseb9621712010-04-24 17:59:49 +00009926$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009927
9928fi
9929
Matthias Kloseb9621712010-04-24 17:59:49 +00009930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9931$as_echo_n "checking for lchflags... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02009932if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009933 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009934else
Matthias Kloseb9621712010-04-24 17:59:49 +00009935 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009936 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009937else
Matthias Kloseb9621712010-04-24 17:59:49 +00009938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009939/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009940
Christian Heimesd0764e22007-12-04 15:00:33 +00009941#include <sys/stat.h>
9942#include <unistd.h>
9943int main(int argc, char*argv[])
9944{
9945 if(lchflags(argv[0], 0) != 0)
9946 return 1;
9947 return 0;
9948}
Ned Deily3eb67d52011-06-28 00:00:28 -07009949
Christian Heimesd0764e22007-12-04 15:00:33 +00009950_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009951if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009952 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009953else
Matthias Kloseb9621712010-04-24 17:59:49 +00009954 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009955fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009956rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9957 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009958fi
9959
9960
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009961fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9963$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009964if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009965 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Antoine Pitrou37009202011-07-08 23:47:50 +02009966if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009967 ac_cv_have_lchflags="yes"
9968else
9969 ac_cv_have_lchflags="no"
9970fi
9971
9972fi
9973if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009974
Matthias Kloseb9621712010-04-24 17:59:49 +00009975$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009976
9977fi
9978
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009979case $ac_sys_system/$ac_sys_release in
9980Darwin/*)
9981 _CUR_CFLAGS="${CFLAGS}"
9982 _CUR_LDFLAGS="${LDFLAGS}"
9983 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9984 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9985 ;;
9986esac
9987
Matthias Kloseb9621712010-04-24 17:59:49 +00009988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9989$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +02009990if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009991 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009992else
9993 ac_check_lib_save_LIBS=$LIBS
9994LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009996/* end confdefs.h. */
9997
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009998/* Override any GCC internal prototype to avoid an error.
9999 Use char because int might match the return type of a GCC
10000 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010001#ifdef __cplusplus
10002extern "C"
10003#endif
10004char inflateCopy ();
10005int
10006main ()
10007{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010008return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010009 ;
10010 return 0;
10011}
10012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010013if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010014 ac_cv_lib_z_inflateCopy=yes
10015else
Matthias Kloseb9621712010-04-24 17:59:49 +000010016 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010017fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010018rm -f core conftest.err conftest.$ac_objext \
10019 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010020LIBS=$ac_check_lib_save_LIBS
10021fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10023$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020010024if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010025
Matthias Kloseb9621712010-04-24 17:59:49 +000010026$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010027
10028fi
10029
10030
10031case $ac_sys_system/$ac_sys_release in
10032Darwin/*)
10033 CFLAGS="${_CUR_CFLAGS}"
10034 LDFLAGS="${_CUR_LDFLAGS}"
10035 ;;
10036esac
10037
Matthias Kloseb9621712010-04-24 17:59:49 +000010038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10039$as_echo_n "checking for hstrerror... " >&6; }
10040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010041/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010042
Martin v. Löwise9416172003-05-03 10:12:45 +000010043#include <netdb.h>
10044
Martin v. Löwise9416172003-05-03 10:12:45 +000010045int
10046main ()
10047{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010048void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010049 ;
10050 return 0;
10051}
10052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010053if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010054
Matthias Kloseb9621712010-04-24 17:59:49 +000010055$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010056
Matthias Kloseb159a552010-04-25 21:00:44 +000010057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010058$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010059else
Matthias Kloseb9621712010-04-24 17:59:49 +000010060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10061$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010062
10063fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010064rm -f core conftest.err conftest.$ac_objext \
10065 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010066
Matthias Kloseb9621712010-04-24 17:59:49 +000010067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10068$as_echo_n "checking for inet_aton... " >&6; }
10069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010070/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010071
Martin v. Löwis86d66262006-02-17 08:40:11 +000010072#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010073#include <sys/socket.h>
10074#include <netinet/in.h>
10075#include <arpa/inet.h>
10076
Martin v. Löwise9416172003-05-03 10:12:45 +000010077int
10078main ()
10079{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010080void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010081 ;
10082 return 0;
10083}
10084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010085if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010086
Matthias Kloseb9621712010-04-24 17:59:49 +000010087$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010088
Matthias Kloseb159a552010-04-25 21:00:44 +000010089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010090$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010091else
Matthias Kloseb9621712010-04-24 17:59:49 +000010092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10093$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010094
10095fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010096rm -f core conftest.err conftest.$ac_objext \
10097 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010098
Matthias Kloseb9621712010-04-24 17:59:49 +000010099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10100$as_echo_n "checking for inet_pton... " >&6; }
10101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010102/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010103
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010104#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010105#include <sys/socket.h>
10106#include <netinet/in.h>
10107#include <arpa/inet.h>
10108
Martin v. Löwise9416172003-05-03 10:12:45 +000010109int
10110main ()
10111{
10112void* p = inet_pton
10113 ;
10114 return 0;
10115}
10116_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010117if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010118
Matthias Kloseb9621712010-04-24 17:59:49 +000010119$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010120
Matthias Kloseb159a552010-04-25 21:00:44 +000010121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010122$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010123else
Matthias Kloseb9621712010-04-24 17:59:49 +000010124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10125$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010126
10127fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010129
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010130# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10132$as_echo_n "checking for setgroups... " >&6; }
10133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010134/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010135
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010136#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010137#ifdef HAVE_GRP_H
10138#include <grp.h>
10139#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010140
Martin v. Löwisd5843682002-11-21 20:41:28 +000010141int
10142main ()
10143{
10144void* p = setgroups
10145 ;
10146 return 0;
10147}
10148_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010149if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010150
Matthias Kloseb9621712010-04-24 17:59:49 +000010151$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010152
Matthias Kloseb159a552010-04-25 21:00:44 +000010153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010154$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010155else
Matthias Kloseb9621712010-04-24 17:59:49 +000010156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10157$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010158
10159fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010161
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010162# check for openpty and forkpty
10163
10164for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010165do :
10166 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Antoine Pitrou37009202011-07-08 23:47:50 +020010167if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010168 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010169#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010170_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010171
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010172else
Matthias Kloseb9621712010-04-24 17:59:49 +000010173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10174$as_echo_n "checking for openpty in -lutil... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020010175if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010176 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010177else
Martin v. Löwis11437992002-04-12 09:54:03 +000010178 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010179LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010181/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010182
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010183/* Override any GCC internal prototype to avoid an error.
10184 Use char because int might match the return type of a GCC
10185 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010186#ifdef __cplusplus
10187extern "C"
10188#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010189char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010190int
10191main ()
10192{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010193return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010194 ;
10195 return 0;
10196}
10197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010198if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010199 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010200else
Matthias Kloseb9621712010-04-24 17:59:49 +000010201 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010202fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010203rm -f core conftest.err conftest.$ac_objext \
10204 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010205LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010206fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10208$as_echo "$ac_cv_lib_util_openpty" >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020010209if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010210 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010211 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010212else
Matthias Kloseb9621712010-04-24 17:59:49 +000010213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10214$as_echo_n "checking for openpty in -lbsd... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020010215if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010216 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010217else
10218 ac_check_lib_save_LIBS=$LIBS
10219LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010221/* end confdefs.h. */
10222
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010223/* Override any GCC internal prototype to avoid an error.
10224 Use char because int might match the return type of a GCC
10225 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010226#ifdef __cplusplus
10227extern "C"
10228#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010229char openpty ();
10230int
10231main ()
10232{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010233return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010234 ;
10235 return 0;
10236}
10237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010238if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010239 ac_cv_lib_bsd_openpty=yes
10240else
Matthias Kloseb9621712010-04-24 17:59:49 +000010241 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010243rm -f core conftest.err conftest.$ac_objext \
10244 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010245LIBS=$ac_check_lib_save_LIBS
10246fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10248$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020010249if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010250 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010251 LIBS="$LIBS -lbsd"
10252fi
10253
10254
10255fi
10256
Fred Drake8cef4cf2000-06-28 16:40:38 +000010257
10258fi
10259done
10260
10261for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010262do :
10263 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Antoine Pitrou37009202011-07-08 23:47:50 +020010264if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010265 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010266#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010267_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010268
Fred Drake8cef4cf2000-06-28 16:40:38 +000010269else
Matthias Kloseb9621712010-04-24 17:59:49 +000010270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10271$as_echo_n "checking for forkpty in -lutil... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020010272if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010273 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010274else
Martin v. Löwis11437992002-04-12 09:54:03 +000010275 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010276LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010278/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010279
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010280/* Override any GCC internal prototype to avoid an error.
10281 Use char because int might match the return type of a GCC
10282 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010283#ifdef __cplusplus
10284extern "C"
10285#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010286char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010287int
10288main ()
10289{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010290return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010291 ;
10292 return 0;
10293}
10294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010295if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010296 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010297else
Matthias Kloseb9621712010-04-24 17:59:49 +000010298 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010299fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010300rm -f core conftest.err conftest.$ac_objext \
10301 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010302LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010303fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10305$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020010306if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010307 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010308 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010309else
Matthias Kloseb9621712010-04-24 17:59:49 +000010310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10311$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020010312if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010313 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010314else
10315 ac_check_lib_save_LIBS=$LIBS
10316LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010318/* end confdefs.h. */
10319
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010320/* Override any GCC internal prototype to avoid an error.
10321 Use char because int might match the return type of a GCC
10322 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010323#ifdef __cplusplus
10324extern "C"
10325#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010326char forkpty ();
10327int
10328main ()
10329{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010330return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010331 ;
10332 return 0;
10333}
10334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010335if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010336 ac_cv_lib_bsd_forkpty=yes
10337else
Matthias Kloseb9621712010-04-24 17:59:49 +000010338 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010339fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010340rm -f core conftest.err conftest.$ac_objext \
10341 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010342LIBS=$ac_check_lib_save_LIBS
10343fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10345$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020010346if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010347 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010348 LIBS="$LIBS -lbsd"
10349fi
10350
10351
10352fi
10353
Fred Drake8cef4cf2000-06-28 16:40:38 +000010354
10355fi
10356done
10357
Jack Jansendd19cf82001-12-06 22:36:17 +000010358
Christian Heimesb186d002008-03-18 15:15:01 +000010359# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010360for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010361do :
10362 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Antoine Pitrou37009202011-07-08 23:47:50 +020010363if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010364 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010365#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010366_ACEOF
10367
10368fi
10369done
10370
10371
Michael W. Hudson54241132001-12-07 15:38:26 +000010372# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010373for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010374do :
10375 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10376ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010377if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010378 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010379#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010380_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010381
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010382fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010383done
10384
Michael W. Hudson54241132001-12-07 15:38:26 +000010385
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010386ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Antoine Pitrou37009202011-07-08 23:47:50 +020010387if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010388 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010389
Martin v. Löwis1142de32002-03-29 16:28:31 +000010390else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010391 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010392 *" dup2.$ac_objext "* ) ;;
10393 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010394 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010395esac
10396
Martin v. Löwis1142de32002-03-29 16:28:31 +000010397fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010398
10399ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Antoine Pitrou37009202011-07-08 23:47:50 +020010400if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010401 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10402
10403else
10404 case " $LIBOBJS " in
10405 *" getcwd.$ac_objext "* ) ;;
10406 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10407 ;;
10408esac
10409
10410fi
10411
10412ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Antoine Pitrou37009202011-07-08 23:47:50 +020010413if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010414 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10415
10416else
10417 case " $LIBOBJS " in
10418 *" strdup.$ac_objext "* ) ;;
10419 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10420 ;;
10421esac
10422
10423fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010424
10425
10426for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010427do :
10428 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Antoine Pitrou37009202011-07-08 23:47:50 +020010429if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010430 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010431#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010432_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010434/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010435#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010436int
10437main ()
10438{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010439getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010440 ;
10441 return 0;
10442}
10443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010444if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010445
Matthias Kloseb9621712010-04-24 17:59:49 +000010446$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010447
Guido van Rossum627b2d71993-12-24 10:39:16 +000010448fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010450
Guido van Rossum627b2d71993-12-24 10:39:16 +000010451fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010452done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010453
Jack Jansen150753c2003-03-29 22:07:47 +000010454for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010455do :
10456 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Antoine Pitrou37009202011-07-08 23:47:50 +020010457if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010458 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010459#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010462/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010463#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010464int
10465main ()
10466{
10467setpgrp(0,0);
10468 ;
10469 return 0;
10470}
10471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010472if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010473
Matthias Kloseb9621712010-04-24 17:59:49 +000010474$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010475
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010476fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010478
10479fi
10480done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010481
Thomas Wouters3a584202000-08-05 23:28:51 +000010482for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010483do :
10484 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Antoine Pitrou37009202011-07-08 23:47:50 +020010485if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010486 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010487#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010490/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010491#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010492int
10493main ()
10494{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010495gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010496 ;
10497 return 0;
10498}
10499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010500if ac_fn_c_try_compile "$LINENO"; then :
10501
Guido van Rossum627b2d71993-12-24 10:39:16 +000010502else
Skip Montanaro6dead952003-09-25 14:50:04 +000010503
Matthias Kloseb9621712010-04-24 17:59:49 +000010504$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010505
Martin v. Löwis11437992002-04-12 09:54:03 +000010506
Guido van Rossum627b2d71993-12-24 10:39:16 +000010507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010509
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010510fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010511done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010512
Michael W. Hudson54241132001-12-07 15:38:26 +000010513
Matthias Kloseb9621712010-04-24 17:59:49 +000010514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10515$as_echo_n "checking for major... " >&6; }
10516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010517/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010518
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010519#if defined(MAJOR_IN_MKDEV)
10520#include <sys/mkdev.h>
10521#elif defined(MAJOR_IN_SYSMACROS)
10522#include <sys/sysmacros.h>
10523#else
10524#include <sys/types.h>
10525#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010526
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010527int
10528main ()
10529{
10530
10531 makedev(major(0),minor(0));
10532
10533 ;
10534 return 0;
10535}
10536_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010537if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010538
10539
Matthias Kloseb9621712010-04-24 17:59:49 +000010540$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010541
Matthias Kloseb9621712010-04-24 17:59:49 +000010542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10543$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010544
10545else
Skip Montanaro6dead952003-09-25 14:50:04 +000010546
Matthias Kloseb9621712010-04-24 17:59:49 +000010547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10548$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010549
10550fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010551rm -f core conftest.err conftest.$ac_objext \
10552 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010553
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010554# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010555# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10557$as_echo_n "checking for getaddrinfo... " >&6; }
10558cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010559/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010560
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010561#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010562#include <sys/socket.h>
10563#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010564#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010565
Martin v. Löwis11437992002-04-12 09:54:03 +000010566int
10567main ()
10568{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010569getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010570 ;
10571 return 0;
10572}
10573_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010574if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010575 have_getaddrinfo=yes
10576else
Matthias Kloseb9621712010-04-24 17:59:49 +000010577 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010578fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010579rm -f core conftest.err conftest.$ac_objext \
10580 conftest$ac_exeext conftest.$ac_ext
10581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10582$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010583if test $have_getaddrinfo = yes
10584then
Matthias Kloseb9621712010-04-24 17:59:49 +000010585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10586$as_echo_n "checking getaddrinfo bug... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020010587 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010588 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010589else
Matthias Kloseb9621712010-04-24 17:59:49 +000010590 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010591 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010592else
Matthias Kloseb9621712010-04-24 17:59:49 +000010593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010594/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010595
10596#include <sys/types.h>
10597#include <netdb.h>
10598#include <string.h>
10599#include <sys/socket.h>
10600#include <netinet/in.h>
10601
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010602int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010603{
10604 int passive, gaierr, inet4 = 0, inet6 = 0;
10605 struct addrinfo hints, *ai, *aitop;
10606 char straddr[INET6_ADDRSTRLEN], strport[16];
10607
10608 for (passive = 0; passive <= 1; passive++) {
10609 memset(&hints, 0, sizeof(hints));
10610 hints.ai_family = AF_UNSPEC;
10611 hints.ai_flags = passive ? AI_PASSIVE : 0;
10612 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010613 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010614 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10615 (void)gai_strerror(gaierr);
10616 goto bad;
10617 }
10618 for (ai = aitop; ai; ai = ai->ai_next) {
10619 if (ai->ai_addr == NULL ||
10620 ai->ai_addrlen == 0 ||
10621 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10622 straddr, sizeof(straddr), strport, sizeof(strport),
10623 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10624 goto bad;
10625 }
10626 switch (ai->ai_family) {
10627 case AF_INET:
10628 if (strcmp(strport, "54321") != 0) {
10629 goto bad;
10630 }
10631 if (passive) {
10632 if (strcmp(straddr, "0.0.0.0") != 0) {
10633 goto bad;
10634 }
10635 } else {
10636 if (strcmp(straddr, "127.0.0.1") != 0) {
10637 goto bad;
10638 }
10639 }
10640 inet4++;
10641 break;
10642 case AF_INET6:
10643 if (strcmp(strport, "54321") != 0) {
10644 goto bad;
10645 }
10646 if (passive) {
10647 if (strcmp(straddr, "::") != 0) {
10648 goto bad;
10649 }
10650 } else {
10651 if (strcmp(straddr, "::1") != 0) {
10652 goto bad;
10653 }
10654 }
10655 inet6++;
10656 break;
10657 case AF_UNSPEC:
10658 goto bad;
10659 break;
10660 default:
10661 /* another family support? */
10662 break;
10663 }
10664 }
10665 }
10666
10667 if (!(inet4 == 0 || inet4 == 2))
10668 goto bad;
10669 if (!(inet6 == 0 || inet6 == 2))
10670 goto bad;
10671
10672 if (aitop)
10673 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010674 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010675
10676 bad:
10677 if (aitop)
10678 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010679 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010680}
10681
Martin v. Löwis11437992002-04-12 09:54:03 +000010682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010683if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010684 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010685else
Matthias Kloseb9621712010-04-24 17:59:49 +000010686 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010687fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010688rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10689 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010690fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010691
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010692fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010693
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010694fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010695
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10697$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10698
Mark Dickinson2df5d282009-12-31 21:22:50 +000010699if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010700then
10701 if test $ipv6 = yes
10702 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010703 echo 'Fatal: You must get working getaddrinfo() function.'
10704 echo ' or you can specify "--disable-ipv6"'.
10705 exit 1
10706 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010707else
Martin v. Löwis11437992002-04-12 09:54:03 +000010708
Matthias Kloseb9621712010-04-24 17:59:49 +000010709$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010710
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010711fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010712
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010713for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010714do :
10715 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Antoine Pitrou37009202011-07-08 23:47:50 +020010716if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010717 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010718#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010719_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010720
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010721fi
10722done
10723
Michael W. Hudson54241132001-12-07 15:38:26 +000010724
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010725# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10727$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020010728if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010729 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010730else
Matthias Kloseb9621712010-04-24 17:59:49 +000010731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010732/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010733#include <sys/types.h>
10734#include <sys/time.h>
10735#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010736
Martin v. Löwis11437992002-04-12 09:54:03 +000010737int
10738main ()
10739{
10740if ((struct tm *) 0)
10741return 0;
10742 ;
10743 return 0;
10744}
10745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010746if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010747 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010748else
Matthias Kloseb9621712010-04-24 17:59:49 +000010749 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010750fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010752fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10754$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010755if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010756
Matthias Kloseb9621712010-04-24 17:59:49 +000010757$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010758
10759fi
10760
Matthias Kloseb9621712010-04-24 17:59:49 +000010761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10762$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020010763if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010764 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010765else
Matthias Kloseb9621712010-04-24 17:59:49 +000010766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010767/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010768#include <sys/types.h>
10769#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010770
Martin v. Löwis11437992002-04-12 09:54:03 +000010771int
10772main ()
10773{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010774struct tm tm;
10775 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010776 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010777 ;
10778 return 0;
10779}
10780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010781if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010782 ac_cv_struct_tm=time.h
10783else
Matthias Kloseb9621712010-04-24 17:59:49 +000010784 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010785fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010787fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10789$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010790if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010791
Matthias Kloseb9621712010-04-24 17:59:49 +000010792$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010793
10794fi
10795
Matthias Kloseb9621712010-04-24 17:59:49 +000010796ac_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 +000010797#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010798
Matthias Kloseb9621712010-04-24 17:59:49 +000010799"
Antoine Pitrou37009202011-07-08 23:47:50 +020010800if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010801
10802cat >>confdefs.h <<_ACEOF
10803#define HAVE_STRUCT_TM_TM_ZONE 1
10804_ACEOF
10805
10806
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010807fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010808
Martin v. Löwis11437992002-04-12 09:54:03 +000010809if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10810
Matthias Kloseb9621712010-04-24 17:59:49 +000010811$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010812
10813else
Matthias Kloseb9621712010-04-24 17:59:49 +000010814 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10815"
Antoine Pitrou37009202011-07-08 23:47:50 +020010816if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010817 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010818else
Matthias Kloseb9621712010-04-24 17:59:49 +000010819 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010820fi
10821
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010822cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010823#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010824_ACEOF
10825
Matthias Kloseb9621712010-04-24 17:59:49 +000010826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10827$as_echo_n "checking for tzname... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020010828if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010829 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010830else
Matthias Kloseb9621712010-04-24 17:59:49 +000010831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010832/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010833#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010834#if !HAVE_DECL_TZNAME
10835extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010836#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010837
Martin v. Löwis11437992002-04-12 09:54:03 +000010838int
10839main ()
10840{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010841return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010842 ;
10843 return 0;
10844}
10845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010846if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010847 ac_cv_var_tzname=yes
10848else
Matthias Kloseb9621712010-04-24 17:59:49 +000010849 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010850fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010851rm -f core conftest.err conftest.$ac_objext \
10852 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010853fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10855$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010856 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010857
Matthias Kloseb9621712010-04-24 17:59:49 +000010858$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010859
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010860 fi
10861fi
10862
Matthias Kloseb9621712010-04-24 17:59:49 +000010863ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Antoine Pitrou37009202011-07-08 23:47:50 +020010864if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010865
10866cat >>confdefs.h <<_ACEOF
10867#define HAVE_STRUCT_STAT_ST_RDEV 1
10868_ACEOF
10869
10870
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010871fi
10872
Matthias Kloseb9621712010-04-24 17:59:49 +000010873ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Antoine Pitrou37009202011-07-08 23:47:50 +020010874if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010875
Martin v. Löwis11437992002-04-12 09:54:03 +000010876cat >>confdefs.h <<_ACEOF
10877#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10878_ACEOF
10879
10880
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010881fi
10882
Matthias Kloseb9621712010-04-24 17:59:49 +000010883ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Antoine Pitrou37009202011-07-08 23:47:50 +020010884if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010885
10886cat >>confdefs.h <<_ACEOF
10887#define HAVE_STRUCT_STAT_ST_FLAGS 1
10888_ACEOF
10889
10890
10891fi
10892
Matthias Kloseb9621712010-04-24 17:59:49 +000010893ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Antoine Pitrou37009202011-07-08 23:47:50 +020010894if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010895
10896cat >>confdefs.h <<_ACEOF
10897#define HAVE_STRUCT_STAT_ST_GEN 1
10898_ACEOF
10899
10900
10901fi
10902
Matthias Kloseb9621712010-04-24 17:59:49 +000010903ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Antoine Pitrou37009202011-07-08 23:47:50 +020010904if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010905
10906cat >>confdefs.h <<_ACEOF
10907#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10908_ACEOF
10909
10910
10911fi
10912
Matthias Kloseb9621712010-04-24 17:59:49 +000010913ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Antoine Pitrou37009202011-07-08 23:47:50 +020010914if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010915
Martin v. Löwis11437992002-04-12 09:54:03 +000010916cat >>confdefs.h <<_ACEOF
10917#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10918_ACEOF
10919
10920
Matthias Kloseb9621712010-04-24 17:59:49 +000010921$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010922
10923else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010924 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010925 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010926 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10927 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010928esac
10929
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010930fi
10931
Michael W. Hudson54241132001-12-07 15:38:26 +000010932
Martin v. Löwis11437992002-04-12 09:54:03 +000010933
Matthias Kloseb9621712010-04-24 17:59:49 +000010934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10935$as_echo_n "checking for time.h that defines altzone... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020010936if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010937 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010938else
Matthias Kloseb159a552010-04-25 21:00:44 +000010939
Matthias Kloseb9621712010-04-24 17:59:49 +000010940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010941/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010942#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010943int
10944main ()
10945{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010946return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010947 ;
10948 return 0;
10949}
10950_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010951if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010952 ac_cv_header_time_altzone=yes
10953else
Matthias Kloseb9621712010-04-24 17:59:49 +000010954 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010955fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010957
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010958fi
10959
Matthias Kloseb9621712010-04-24 17:59:49 +000010960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10961$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010962if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010963
Matthias Kloseb9621712010-04-24 17:59:49 +000010964$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010965
10966fi
10967
Guido van Rossumda88dad1995-01-26 00:46:29 +000010968was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10970$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010972/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010973
10974#include <sys/types.h>
10975#include <sys/select.h>
10976#include <sys/time.h>
10977
Martin v. Löwis11437992002-04-12 09:54:03 +000010978int
10979main ()
10980{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010981;
Martin v. Löwis11437992002-04-12 09:54:03 +000010982 ;
10983 return 0;
10984}
10985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010986if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010987
10988
Matthias Kloseb9621712010-04-24 17:59:49 +000010989$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010990
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010991 was_it_defined=yes
10992
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010993fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10996$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010997
Matthias Kloseb9621712010-04-24 17:59:49 +000010998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10999$as_echo_n "checking for addrinfo... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020011000if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011001 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011002else
Matthias Kloseb9621712010-04-24 17:59:49 +000011003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011004/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011005#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011006int
11007main ()
11008{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011009struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011010 ;
11011 return 0;
11012}
11013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011014if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011015 ac_cv_struct_addrinfo=yes
11016else
Matthias Kloseb9621712010-04-24 17:59:49 +000011017 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011018fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11020fi
11021
Matthias Kloseb9621712010-04-24 17:59:49 +000011022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11023$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011024if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011025
Matthias Kloseb9621712010-04-24 17:59:49 +000011026$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011027
11028fi
11029
Matthias Kloseb9621712010-04-24 17:59:49 +000011030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11031$as_echo_n "checking for sockaddr_storage... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020011032if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011033 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011034else
Matthias Kloseb9621712010-04-24 17:59:49 +000011035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011036/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011037
11038# include <sys/types.h>
11039# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011040int
11041main ()
11042{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011043struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011044 ;
11045 return 0;
11046}
11047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011048if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011049 ac_cv_struct_sockaddr_storage=yes
11050else
Matthias Kloseb9621712010-04-24 17:59:49 +000011051 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011052fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11054fi
11055
Matthias Kloseb9621712010-04-24 17:59:49 +000011056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11057$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011058if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011059
Matthias Kloseb9621712010-04-24 17:59:49 +000011060$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011061
11062fi
11063
Guido van Rossum627b2d71993-12-24 10:39:16 +000011064# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011065
Matthias Kloseb9621712010-04-24 17:59:49 +000011066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11067$as_echo_n "checking whether char is unsigned... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020011068if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011069 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011070else
Matthias Kloseb9621712010-04-24 17:59:49 +000011071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011072/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011073$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011074int
11075main ()
11076{
11077static int test_array [1 - 2 * !(((char) -1) < 0)];
11078test_array [0] = 0
11079
11080 ;
11081 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011082}
Martin v. Löwis11437992002-04-12 09:54:03 +000011083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011084if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011085 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011086else
Matthias Kloseb9621712010-04-24 17:59:49 +000011087 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011088fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011090fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11092$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011093if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011094 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011095
11096fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011097
Matthias Kloseb9621712010-04-24 17:59:49 +000011098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11099$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020011100if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011101 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011102else
Matthias Kloseb9621712010-04-24 17:59:49 +000011103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011104/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011105
Martin v. Löwis11437992002-04-12 09:54:03 +000011106int
11107main ()
11108{
11109/* FIXME: Include the comments suggested by Paul. */
11110#ifndef __cplusplus
11111 /* Ultrix mips cc rejects this. */
11112 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011113 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011114 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011115 char const *const *pcpcc;
11116 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011117 /* NEC SVR4.0.2 mips cc rejects this. */
11118 struct point {int x, y;};
11119 static struct point const zero = {0,0};
11120 /* AIX XL C 1.02.0.0 rejects this.
11121 It does not let you subtract one const X* pointer from another in
11122 an arm of an if-expression whose if-part is not a constant
11123 expression */
11124 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011125 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011126 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011127 ++pcpcc;
11128 ppc = (char**) pcpcc;
11129 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011130 { /* SCO 3.2v4 cc rejects this. */
11131 char *t;
11132 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011133
Martin v. Löwis11437992002-04-12 09:54:03 +000011134 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011135 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011136 }
11137 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11138 int x[] = {25, 17};
11139 const int *foo = &x[0];
11140 ++foo;
11141 }
11142 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11143 typedef const int *iptr;
11144 iptr p = 0;
11145 ++p;
11146 }
11147 { /* AIX XL C 1.02.0.0 rejects this saying
11148 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11149 struct s { int j; const int *ap[3]; };
11150 struct s *b; b->j = 5;
11151 }
11152 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11153 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011154 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011155 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011156 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011157#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011158
Martin v. Löwis11437992002-04-12 09:54:03 +000011159 ;
11160 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011161}
Martin v. Löwis11437992002-04-12 09:54:03 +000011162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011163if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011164 ac_cv_c_const=yes
11165else
Matthias Kloseb9621712010-04-24 17:59:49 +000011166 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011167fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011169fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11171$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011172if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011173
Matthias Kloseb9621712010-04-24 17:59:49 +000011174$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011175
11176fi
11177
Michael W. Hudson54241132001-12-07 15:38:26 +000011178
Guido van Rossumda88dad1995-01-26 00:46:29 +000011179works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11181$as_echo_n "checking for working volatile... " >&6; }
11182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011183/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011184
Martin v. Löwis11437992002-04-12 09:54:03 +000011185int
11186main ()
11187{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011188volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011189 ;
11190 return 0;
11191}
11192_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011193if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011194 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011195else
Skip Montanaro6dead952003-09-25 14:50:04 +000011196
Matthias Kloseb9621712010-04-24 17:59:49 +000011197$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011198
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011199
Guido van Rossum627b2d71993-12-24 10:39:16 +000011200fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11203$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011204
Guido van Rossumda88dad1995-01-26 00:46:29 +000011205works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11207$as_echo_n "checking for working signed char... " >&6; }
11208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011209/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011210
Martin v. Löwis11437992002-04-12 09:54:03 +000011211int
11212main ()
11213{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011214signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011215 ;
11216 return 0;
11217}
11218_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011219if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011220 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011221else
Skip Montanaro6dead952003-09-25 14:50:04 +000011222
Matthias Kloseb9621712010-04-24 17:59:49 +000011223$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011224
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011225
Guido van Rossum7f43da71994-08-01 12:15:30 +000011226fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11229$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011230
Guido van Rossumda88dad1995-01-26 00:46:29 +000011231have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11233$as_echo_n "checking for prototypes... " >&6; }
11234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011235/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011236int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011237int
11238main ()
11239{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011240return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011241 ;
11242 return 0;
11243}
11244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011245if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011246
Matthias Kloseb9621712010-04-24 17:59:49 +000011247$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011248
Matthias Kloseb159a552010-04-25 21:00:44 +000011249 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11253$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011254
Guido van Rossumda88dad1995-01-26 00:46:29 +000011255works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11257$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011259/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011260
11261#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011262int foo(int x, ...) {
11263 va_list va;
11264 va_start(va, x);
11265 va_arg(va, int);
11266 va_arg(va, char *);
11267 va_arg(va, double);
11268 return 0;
11269}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011270
Martin v. Löwis11437992002-04-12 09:54:03 +000011271int
11272main ()
11273{
Guido van Rossum90eea071996-08-30 20:58:57 +000011274return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011275 ;
11276 return 0;
11277}
11278_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011279if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011280
11281
Matthias Kloseb9621712010-04-24 17:59:49 +000011282$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011283
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011284 works=yes
11285
Guido van Rossum627b2d71993-12-24 10:39:16 +000011286fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11289$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011290
Martin v. Löwisd6320502004-08-12 13:45:08 +000011291# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11293$as_echo_n "checking for socketpair... " >&6; }
11294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011295/* end confdefs.h. */
11296
11297#include <sys/types.h>
11298#include <sys/socket.h>
11299
11300int
11301main ()
11302{
11303void *x=socketpair
11304 ;
11305 return 0;
11306}
11307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011308if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011309
Matthias Kloseb9621712010-04-24 17:59:49 +000011310$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011311
Matthias Kloseb159a552010-04-25 21:00:44 +000011312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011313$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011314else
Matthias Kloseb9621712010-04-24 17:59:49 +000011315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11316$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011317
11318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011320
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011321# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11323$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011325/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011326#include <sys/types.h>
11327#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011328int
11329main ()
11330{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011331struct sockaddr x;
11332x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011333 ;
11334 return 0;
11335}
11336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011337if ac_fn_c_try_compile "$LINENO"; then :
11338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11339$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011340
Matthias Kloseb9621712010-04-24 17:59:49 +000011341$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011342
11343else
Matthias Kloseb9621712010-04-24 17:59:49 +000011344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11345$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011346
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011349
Guido van Rossumda88dad1995-01-26 00:46:29 +000011350va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11352$as_echo_n "checking whether va_list is an array... " >&6; }
11353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011354/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011355
11356#ifdef HAVE_STDARG_PROTOTYPES
11357#include <stdarg.h>
11358#else
11359#include <varargs.h>
11360#endif
11361
Martin v. Löwis11437992002-04-12 09:54:03 +000011362int
11363main ()
11364{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011365va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011366 ;
11367 return 0;
11368}
11369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011370if ac_fn_c_try_compile "$LINENO"; then :
11371
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011372else
Skip Montanaro6dead952003-09-25 14:50:04 +000011373
Martin v. Löwis11437992002-04-12 09:54:03 +000011374
Matthias Kloseb9621712010-04-24 17:59:49 +000011375$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011376
Guido van Rossumda88dad1995-01-26 00:46:29 +000011377 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011378
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11382$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011383
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011384# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011385
11386
Matthias Kloseb9621712010-04-24 17:59:49 +000011387ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Antoine Pitrou37009202011-07-08 23:47:50 +020011388if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011389
Matthias Kloseb9621712010-04-24 17:59:49 +000011390 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011391
Matthias Kloseb9621712010-04-24 17:59:49 +000011392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11393$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011394 OLD_CFLAGS=$CFLAGS
11395 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011397/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011398
11399# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011400
Martin v. Löwis11437992002-04-12 09:54:03 +000011401int
11402main ()
11403{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011404
11405 char *name;
11406 struct hostent *he, *res;
11407 char buffer[2048];
11408 int buflen = 2048;
11409 int h_errnop;
11410
11411 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011412
11413 ;
11414 return 0;
11415}
11416_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011417if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011418
Matthias Kloseb9621712010-04-24 17:59:49 +000011419 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011420
Martin v. Löwis11437992002-04-12 09:54:03 +000011421
Matthias Kloseb9621712010-04-24 17:59:49 +000011422$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011423
Matthias Kloseb9621712010-04-24 17:59:49 +000011424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11425$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011426
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011427else
Skip Montanaro6dead952003-09-25 14:50:04 +000011428
Matthias Kloseb9621712010-04-24 17:59:49 +000011429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11430$as_echo "no" >&6; }
11431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11432$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011434/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011435
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011436# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011437
Martin v. Löwis11437992002-04-12 09:54:03 +000011438int
11439main ()
11440{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011441
11442 char *name;
11443 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011444 char buffer[2048];
11445 int buflen = 2048;
11446 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011447
Matthias Kloseb159a552010-04-25 21:00:44 +000011448 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011449
11450 ;
11451 return 0;
11452}
11453_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011454if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011455
Matthias Kloseb9621712010-04-24 17:59:49 +000011456 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011457
Martin v. Löwis11437992002-04-12 09:54:03 +000011458
Matthias Kloseb159a552010-04-25 21:00:44 +000011459$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011460
Matthias Kloseb9621712010-04-24 17:59:49 +000011461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11462$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011463
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011464else
Skip Montanaro6dead952003-09-25 14:50:04 +000011465
Matthias Kloseb9621712010-04-24 17:59:49 +000011466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11467$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11469$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11471/* end confdefs.h. */
11472
11473# include <netdb.h>
11474
11475int
11476main ()
11477{
11478
11479 char *name;
11480 struct hostent *he;
11481 struct hostent_data data;
11482
11483 (void) gethostbyname_r(name, he, &data);
11484
11485 ;
11486 return 0;
11487}
11488_ACEOF
11489if ac_fn_c_try_compile "$LINENO"; then :
11490
11491 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11492
11493
11494$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11495
11496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11497$as_echo "yes" >&6; }
11498
11499else
11500
11501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11502$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011503
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011504fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011506
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011509
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011510fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011512 CFLAGS=$OLD_CFLAGS
11513
11514else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011515
Matthias Kloseb9621712010-04-24 17:59:49 +000011516 for ac_func in gethostbyname
11517do :
11518 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Antoine Pitrou37009202011-07-08 23:47:50 +020011519if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011520 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011521#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011522_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011523
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011524fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011525done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011526
Michael W. Hudson54241132001-12-07 15:38:26 +000011527
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011528fi
11529
Michael W. Hudson54241132001-12-07 15:38:26 +000011530
11531
11532
11533
11534
11535
Guido van Rossum627b2d71993-12-24 10:39:16 +000011536# checks for system services
11537# (none yet)
11538
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011539# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011540ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Antoine Pitrou37009202011-07-08 23:47:50 +020011541if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011542
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011543else
Matthias Kloseb9621712010-04-24 17:59:49 +000011544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11545$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020011546if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011547 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011548else
Martin v. Löwis11437992002-04-12 09:54:03 +000011549 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011550LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011552/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011553
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011554/* Override any GCC internal prototype to avoid an error.
11555 Use char because int might match the return type of a GCC
11556 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011557#ifdef __cplusplus
11558extern "C"
11559#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011560char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011561int
11562main ()
11563{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011564return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011565 ;
11566 return 0;
11567}
11568_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011569if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011570 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011571else
Matthias Kloseb9621712010-04-24 17:59:49 +000011572 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011573fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011574rm -f core conftest.err conftest.$ac_objext \
11575 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011576LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011577fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11579$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020011580if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011581 cat >>confdefs.h <<_ACEOF
11582#define HAVE_LIBIEEE 1
11583_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011584
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011585 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011586
Guido van Rossum627b2d71993-12-24 10:39:16 +000011587fi
11588
Michael W. Hudson54241132001-12-07 15:38:26 +000011589
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011590fi
11591
Michael W. Hudson54241132001-12-07 15:38:26 +000011592
Guido van Rossum7f253911997-05-09 02:42:48 +000011593# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11595$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011596
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011597# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011598if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011599 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011600if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011601then
11602
Matthias Kloseb9621712010-04-24 17:59:49 +000011603$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011604
Matthias Kloseb9621712010-04-24 17:59:49 +000011605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11606$as_echo "yes" >&6; }
11607else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11608$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011609fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011610else
Matthias Kloseb9621712010-04-24 17:59:49 +000011611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11612$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011613fi
11614
Guido van Rossum7f253911997-05-09 02:42:48 +000011615
Guido van Rossum7f43da71994-08-01 12:15:30 +000011616# check for --with-libm=...
11617
Guido van Rossum563e7081996-09-10 18:20:48 +000011618case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011619Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011620*) LIBM=-lm
11621esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11623$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011624
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011625# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011626if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011627 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011628if test "$withval" = no
11629then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11631$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011632elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011633then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11635$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011636else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011637fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011638else
Matthias Kloseb9621712010-04-24 17:59:49 +000011639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11640$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011641fi
11642
Guido van Rossum7f43da71994-08-01 12:15:30 +000011643
11644# check for --with-libc=...
11645
Matthias Kloseb9621712010-04-24 17:59:49 +000011646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11647$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011648
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011649# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011650if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011651 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011652if test "$withval" = no
11653then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11655$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011656elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011657then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11659$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011660else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011661fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011662else
Matthias Kloseb9621712010-04-24 17:59:49 +000011663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11664$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011665fi
11666
Guido van Rossum7f43da71994-08-01 12:15:30 +000011667
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011668# **************************************************
11669# * Check for various properties of floating point *
11670# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011671
Matthias Kloseb9621712010-04-24 17:59:49 +000011672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11673$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020011674if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011675 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011676else
11677
Matthias Kloseb9621712010-04-24 17:59:49 +000011678if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011679 ac_cv_little_endian_double=no
11680else
Matthias Kloseb9621712010-04-24 17:59:49 +000011681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011682/* end confdefs.h. */
11683
11684#include <string.h>
11685int main() {
11686 double x = 9006104071832581.0;
11687 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11688 return 0;
11689 else
11690 return 1;
11691}
11692
11693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011694if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011695 ac_cv_little_endian_double=yes
11696else
Matthias Kloseb9621712010-04-24 17:59:49 +000011697 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011698fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011699rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11700 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011701fi
11702
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011703fi
11704
Matthias Kloseb9621712010-04-24 17:59:49 +000011705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11706$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011707if test "$ac_cv_little_endian_double" = yes
11708then
11709
Matthias Kloseb9621712010-04-24 17:59:49 +000011710$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011711
11712fi
11713
Matthias Kloseb9621712010-04-24 17:59:49 +000011714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11715$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020011716if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011717 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011718else
11719
Matthias Kloseb9621712010-04-24 17:59:49 +000011720if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011721 ac_cv_big_endian_double=no
11722else
Matthias Kloseb9621712010-04-24 17:59:49 +000011723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011724/* end confdefs.h. */
11725
11726#include <string.h>
11727int main() {
11728 double x = 9006104071832581.0;
11729 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11730 return 0;
11731 else
11732 return 1;
11733}
11734
11735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011736if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011737 ac_cv_big_endian_double=yes
11738else
Matthias Kloseb9621712010-04-24 17:59:49 +000011739 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011740fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011741rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11742 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011743fi
11744
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011745fi
11746
Matthias Kloseb9621712010-04-24 17:59:49 +000011747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11748$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011749if test "$ac_cv_big_endian_double" = yes
11750then
11751
Matthias Kloseb9621712010-04-24 17:59:49 +000011752$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011753
11754fi
11755
11756# Some ARM platforms use a mixed-endian representation for doubles.
11757# While Python doesn't currently have full support for these platforms
11758# (see e.g., issue 1762561), we can at least make sure that float <-> string
11759# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11761$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020011762if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011763 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011764else
11765
Matthias Kloseb9621712010-04-24 17:59:49 +000011766if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011767 ac_cv_mixed_endian_double=no
11768else
Matthias Kloseb9621712010-04-24 17:59:49 +000011769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011770/* end confdefs.h. */
11771
11772#include <string.h>
11773int main() {
11774 double x = 9006104071832581.0;
11775 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11776 return 0;
11777 else
11778 return 1;
11779}
11780
11781_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011782if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011783 ac_cv_mixed_endian_double=yes
11784else
Matthias Kloseb9621712010-04-24 17:59:49 +000011785 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011786fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011787rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11788 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011789fi
11790
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011791fi
11792
Matthias Kloseb9621712010-04-24 17:59:49 +000011793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11794$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011795if test "$ac_cv_mixed_endian_double" = yes
11796then
11797
Matthias Kloseb9621712010-04-24 17:59:49 +000011798$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011799
11800fi
11801
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011802# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011803# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011804# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011805# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011806# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011807# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011808
11809# This inline assembler syntax may also work for suncc and icc,
11810# so we try it on all platforms.
11811
Matthias Kloseb9621712010-04-24 17:59:49 +000011812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11813$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011815/* end confdefs.h. */
11816
11817int
11818main ()
11819{
11820
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011821 unsigned short cw;
11822 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11823 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011824
11825 ;
11826 return 0;
11827}
11828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011829if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011830 have_gcc_asm_for_x87=yes
11831else
Matthias Kloseb9621712010-04-24 17:59:49 +000011832 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011833fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11836$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011837if test "$have_gcc_asm_for_x87" = yes
11838then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011839
Matthias Kloseb9621712010-04-24 17:59:49 +000011840$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011841
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011842fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011843
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011844# Detect whether system arithmetic is subject to x87-style double
11845# rounding issues. The result of this test has little meaning on non
11846# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11847# mode is round-to-nearest and double rounding issues are present, and
11848# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11850$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011851# $BASECFLAGS may affect the result
11852ac_save_cc="$CC"
11853CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011854if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011855 ac_cv_x87_double_rounding=no
11856else
Matthias Kloseb9621712010-04-24 17:59:49 +000011857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011858/* end confdefs.h. */
11859
11860#include <stdlib.h>
11861#include <math.h>
11862int main() {
11863 volatile double x, y, z;
11864 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11865 x = 0.99999999999999989; /* 1-2**-53 */
11866 y = 1./x;
11867 if (y != 1.)
11868 exit(0);
11869 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11870 x = 1e16;
11871 y = 2.99999;
11872 z = x + y;
11873 if (z != 1e16+4.)
11874 exit(0);
11875 /* both tests show evidence of double rounding */
11876 exit(1);
11877}
11878
11879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011880if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011881 ac_cv_x87_double_rounding=no
11882else
Matthias Kloseb9621712010-04-24 17:59:49 +000011883 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011884fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011885rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11886 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011887fi
11888
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011889CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11891$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011892if test "$ac_cv_x87_double_rounding" = yes
11893then
11894
Matthias Kloseb9621712010-04-24 17:59:49 +000011895$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011896
11897fi
11898
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011899# ************************************
11900# * Check for mathematical functions *
11901# ************************************
11902
11903LIBS_SAVE=$LIBS
11904LIBS="$LIBS $LIBM"
11905
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011906for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11907do :
11908 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11909ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011910if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011911 cat >>confdefs.h <<_ACEOF
11912#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11913_ACEOF
11914
11915fi
11916done
11917
Victor Stinner8f9f8d62011-05-09 12:45:41 +020011918for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011919do :
11920 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11921ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011922if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011923 cat >>confdefs.h <<_ACEOF
11924#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11925_ACEOF
11926
11927fi
11928done
11929
11930ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11931"
Antoine Pitrou37009202011-07-08 23:47:50 +020011932if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011933 ac_have_decl=1
11934else
11935 ac_have_decl=0
11936fi
11937
11938cat >>confdefs.h <<_ACEOF
11939#define HAVE_DECL_ISINF $ac_have_decl
11940_ACEOF
11941ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11942"
Antoine Pitrou37009202011-07-08 23:47:50 +020011943if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011944 ac_have_decl=1
11945else
11946 ac_have_decl=0
11947fi
11948
11949cat >>confdefs.h <<_ACEOF
11950#define HAVE_DECL_ISNAN $ac_have_decl
11951_ACEOF
11952ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11953"
Antoine Pitrou37009202011-07-08 23:47:50 +020011954if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011955 ac_have_decl=1
11956else
11957 ac_have_decl=0
11958fi
11959
11960cat >>confdefs.h <<_ACEOF
11961#define HAVE_DECL_ISFINITE $ac_have_decl
11962_ACEOF
11963
11964
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011965# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11966# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11968$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020011969if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011970 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011971else
11972
Matthias Kloseb9621712010-04-24 17:59:49 +000011973if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011974 ac_cv_tanh_preserves_zero_sign=no
11975else
Matthias Kloseb9621712010-04-24 17:59:49 +000011976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011977/* end confdefs.h. */
11978
11979#include <math.h>
11980#include <stdlib.h>
11981int main() {
11982 /* return 0 if either negative zeros don't exist
11983 on this platform or if negative zeros exist
11984 and tanh(-0.) == -0. */
11985 if (atan2(0., -1.) == atan2(-0., -1.) ||
11986 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11987 else exit(1);
11988}
11989
11990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011991if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011992 ac_cv_tanh_preserves_zero_sign=yes
11993else
Matthias Kloseb9621712010-04-24 17:59:49 +000011994 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011995fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011996rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11997 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011998fi
11999
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012000fi
12001
Matthias Kloseb9621712010-04-24 17:59:49 +000012002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12003$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012004if test "$ac_cv_tanh_preserves_zero_sign" = yes
12005then
12006
Matthias Kloseb9621712010-04-24 17:59:49 +000012007$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012008
12009fi
12010
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012011if test "$ac_cv_func_log1p" = yes
12012then
12013 # On some versions of AIX, log1p(-0.) returns 0. instead of
12014 # -0. See issue #9920.
12015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12016$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020012017 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012018 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012019else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012020
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012021 if test "$cross_compiling" = yes; then :
12022 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012023else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12025/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012026
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012027 #include <math.h>
12028 #include <stdlib.h>
12029 int main() {
12030 /* Fail if the signs of log1p(-0.) and -0. can be
12031 distinguished. */
12032 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12033 return 0;
12034 else
12035 return 1;
12036 }
12037
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012038_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012039if ac_fn_c_try_run "$LINENO"; then :
12040 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012041else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012042 ac_cv_log1p_drops_zero_sign=yes
12043fi
12044rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12045 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012046fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012047
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012048fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012049
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12051$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12052fi
12053if test "$ac_cv_log1p_drops_zero_sign" = yes
12054then
12055
12056$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12057
12058fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012059
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012060LIBS=$LIBS_SAVE
12061
Mark Dickinsona614f042009-11-28 12:48:43 +000012062# For multiprocessing module, check that sem_open
12063# actually works. For FreeBSD versions <= 7.2,
12064# the kernel module that provides POSIX semaphores
12065# isn't loaded by default, so an attempt to call
12066# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12068$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020012069if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012070 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012071else
Matthias Kloseb9621712010-04-24 17:59:49 +000012072 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012073 ac_cv_posix_semaphores_enabled=yes
12074else
Matthias Kloseb9621712010-04-24 17:59:49 +000012075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012076/* end confdefs.h. */
12077
12078#include <unistd.h>
12079#include <fcntl.h>
12080#include <stdio.h>
12081#include <semaphore.h>
12082#include <sys/stat.h>
12083
12084int main(void) {
12085 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12086 if (a == SEM_FAILED) {
12087 perror("sem_open");
12088 return 1;
12089 }
12090 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012091 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012092 return 0;
12093}
12094
12095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012096if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012097 ac_cv_posix_semaphores_enabled=yes
12098else
Matthias Kloseb9621712010-04-24 17:59:49 +000012099 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012100fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012101rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12102 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012103fi
12104
12105
Mark Dickinsona614f042009-11-28 12:48:43 +000012106fi
12107
Matthias Kloseb9621712010-04-24 17:59:49 +000012108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12109$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012110if test $ac_cv_posix_semaphores_enabled = no
12111then
12112
Matthias Kloseb9621712010-04-24 17:59:49 +000012113$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012114
12115fi
12116
Mark Dickinson10683072009-04-18 21:18:19 +000012117# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12119$as_echo_n "checking for broken sem_getvalue... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020012120if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012121 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012122else
Matthias Kloseb9621712010-04-24 17:59:49 +000012123 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012124 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012125else
Matthias Kloseb9621712010-04-24 17:59:49 +000012126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012127/* end confdefs.h. */
12128
12129#include <unistd.h>
12130#include <fcntl.h>
12131#include <stdio.h>
12132#include <semaphore.h>
12133#include <sys/stat.h>
12134
12135int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012136 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012137 int count;
12138 int res;
12139 if(a==SEM_FAILED){
12140 perror("sem_open");
12141 return 1;
12142
12143 }
12144 res = sem_getvalue(a, &count);
12145 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012146 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012147 return res==-1 ? 1 : 0;
12148}
12149
Mark Dickinson10683072009-04-18 21:18:19 +000012150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012151if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012152 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012153else
Matthias Kloseb9621712010-04-24 17:59:49 +000012154 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012155fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012156rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12157 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012158fi
12159
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012160
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012161fi
12162
Matthias Kloseb9621712010-04-24 17:59:49 +000012163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12164$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012165if test $ac_cv_broken_sem_getvalue = yes
12166then
12167
Matthias Kloseb9621712010-04-24 17:59:49 +000012168$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012169
12170fi
12171
Mark Dickinsonbd792642009-03-18 20:06:12 +000012172# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12174$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012175# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012176if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012177 enableval=$enable_big_digits; case $enable_big_digits in
12178yes)
12179 enable_big_digits=30 ;;
12180no)
12181 enable_big_digits=15 ;;
1218215|30)
12183 ;;
12184*)
Antoine Pitrou37009202011-07-08 23:47:50 +020012185 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 +000012186esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12188$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012189
12190cat >>confdefs.h <<_ACEOF
12191#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12192_ACEOF
12193
12194
12195else
Matthias Kloseb9621712010-04-24 17:59:49 +000012196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12197$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012198fi
12199
12200
Guido van Rossumef2255b2000-03-10 22:30:29 +000012201# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012202ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Antoine Pitrou37009202011-07-08 23:47:50 +020012203if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012204
12205
Matthias Kloseb9621712010-04-24 17:59:49 +000012206$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012207
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012208 wchar_h="yes"
12209
Guido van Rossumef2255b2000-03-10 22:30:29 +000012210else
Martin v. Löwis11437992002-04-12 09:54:03 +000012211 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012212
12213fi
12214
Michael W. Hudson54241132001-12-07 15:38:26 +000012215
Martin v. Löwis11437992002-04-12 09:54:03 +000012216
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012217# determine wchar_t size
12218if test "$wchar_h" = yes
12219then
Matthias Kloseb9621712010-04-24 17:59:49 +000012220 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012221# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12222# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12223# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12225$as_echo_n "checking size of wchar_t... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020012226if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012227 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012228else
Matthias Kloseb9621712010-04-24 17:59:49 +000012229 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12230"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012231
Martin v. Löwis11437992002-04-12 09:54:03 +000012232else
Matthias Kloseb9621712010-04-24 17:59:49 +000012233 if test "$ac_cv_type_wchar_t" = yes; then
12234 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12235$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012236as_fn_error 77 "cannot compute sizeof (wchar_t)
Antoine Pitrou37009202011-07-08 23:47:50 +020012237See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012238 else
12239 ac_cv_sizeof_wchar_t=0
12240 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012241fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012242
Martin v. Löwis11437992002-04-12 09:54:03 +000012243fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12245$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012246
12247
12248
Martin v. Löwis11437992002-04-12 09:54:03 +000012249cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012250#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012251_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012252
Michael W. Hudson54241132001-12-07 15:38:26 +000012253
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012254fi
12255
Matthias Kloseb9621712010-04-24 17:59:49 +000012256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12257$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012258have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012259cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012260/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012261
12262#include <tcl.h>
12263#if TCL_UTF_MAX != 6
12264# error "NOT UCS4_TCL"
12265#endif
12266int
12267main ()
12268{
12269
12270 ;
12271 return 0;
12272}
12273_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012274if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012275
12276
Matthias Kloseb9621712010-04-24 17:59:49 +000012277$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012278
12279 have_ucs4_tcl=yes
12280
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012281fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12284$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012285
Skip Montanaro6dead952003-09-25 14:50:04 +000012286# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012287if test "$wchar_h" = yes
12288then
12289 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12291$as_echo_n "checking whether wchar_t is signed... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020012292 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012293 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012294else
12295
Matthias Kloseb9621712010-04-24 17:59:49 +000012296 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012297 ac_cv_wchar_t_signed=yes
12298else
Matthias Kloseb9621712010-04-24 17:59:49 +000012299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012300/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012301
12302 #include <wchar.h>
12303 int main()
12304 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012305 /* Success: exit code 0 */
12306 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012307 }
12308
12309_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012310if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012311 ac_cv_wchar_t_signed=yes
12312else
Matthias Kloseb9621712010-04-24 17:59:49 +000012313 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012314fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012315rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12316 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012317fi
12318
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012319fi
12320
Matthias Kloseb9621712010-04-24 17:59:49 +000012321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12322$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012323fi
12324
Matthias Kloseb9621712010-04-24 17:59:49 +000012325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12326$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012327
12328# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012329if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012330 withval=$with_wide_unicode;
12331if test "$withval" != no
12332then unicode_size="4"
12333else unicode_size="2"
12334fi
12335
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012336else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012337
Georg Brandl52d168a2008-01-07 18:10:24 +000012338case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012339 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012340 *) unicode_size="2" ;;
12341esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012342
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012343fi
12344
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012345
12346
Georg Brandl52d168a2008-01-07 18:10:24 +000012347case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012348 4)
12349 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12350
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012351 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012352 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012353 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012354 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012355esac
12356
Michael W. Hudson54241132001-12-07 15:38:26 +000012357
Martin v. Löwis11437992002-04-12 09:54:03 +000012358
Georg Brandl52d168a2008-01-07 18:10:24 +000012359# wchar_t is only usable if it maps to an unsigned type
12360if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012361 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012362then
12363 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012364
Matthias Kloseb9621712010-04-24 17:59:49 +000012365$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012366
Matthias Kloseb9621712010-04-24 17:59:49 +000012367 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012368
Georg Brandl52d168a2008-01-07 18:10:24 +000012369elif test "$ac_cv_sizeof_short" = "$unicode_size"
12370then
12371 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012372 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012373
Georg Brandl52d168a2008-01-07 18:10:24 +000012374elif test "$ac_cv_sizeof_long" = "$unicode_size"
12375then
12376 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012377 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012378
Georg Brandl52d168a2008-01-07 18:10:24 +000012379else
12380 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012381fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12383$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012384
12385# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12387$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020012388if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012389 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012390else
Matthias Kloseb9621712010-04-24 17:59:49 +000012391 ac_cv_c_bigendian=unknown
12392 # See if we're dealing with a universal compiler.
12393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12394/* end confdefs.h. */
12395#ifndef __APPLE_CC__
12396 not a universal capable compiler
12397 #endif
12398 typedef int dummy;
12399
Skip Montanaro6dead952003-09-25 14:50:04 +000012400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012401if ac_fn_c_try_compile "$LINENO"; then :
12402
12403 # Check for potential -arch flags. It is not universal unless
12404 # there are at least two -arch flags with different values.
12405 ac_arch=
12406 ac_prev=
12407 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12408 if test -n "$ac_prev"; then
12409 case $ac_word in
12410 i?86 | x86_64 | ppc | ppc64)
12411 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12412 ac_arch=$ac_word
12413 else
12414 ac_cv_c_bigendian=universal
12415 break
12416 fi
12417 ;;
12418 esac
12419 ac_prev=
12420 elif test "x$ac_word" = "x-arch"; then
12421 ac_prev=arch
12422 fi
12423 done
12424fi
12425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12426 if test $ac_cv_c_bigendian = unknown; then
12427 # See if sys/param.h defines the BYTE_ORDER macro.
12428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012429/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012430#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012431 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012432
Martin v. Löwis11437992002-04-12 09:54:03 +000012433int
12434main ()
12435{
Matthias Kloseb9621712010-04-24 17:59:49 +000012436#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12437 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12438 && LITTLE_ENDIAN)
12439 bogus endian macros
12440 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012441
12442 ;
12443 return 0;
12444}
12445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012446if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012447 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012449/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012450#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012451 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012452
Martin v. Löwis11437992002-04-12 09:54:03 +000012453int
12454main ()
12455{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012456#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012457 not big endian
12458 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012459
12460 ;
12461 return 0;
12462}
12463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012464if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012465 ac_cv_c_bigendian=yes
12466else
Matthias Kloseb9621712010-04-24 17:59:49 +000012467 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012470fi
12471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12472 fi
12473 if test $ac_cv_c_bigendian = unknown; then
12474 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012476/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012477#include <limits.h>
12478
Martin v. Löwis11437992002-04-12 09:54:03 +000012479int
12480main ()
12481{
Matthias Kloseb9621712010-04-24 17:59:49 +000012482#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12483 bogus endian macros
12484 #endif
12485
Martin v. Löwis11437992002-04-12 09:54:03 +000012486 ;
12487 return 0;
12488}
12489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012490if ac_fn_c_try_compile "$LINENO"; then :
12491 # It does; now see whether it defined to _BIG_ENDIAN or not.
12492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12493/* end confdefs.h. */
12494#include <limits.h>
12495
12496int
12497main ()
12498{
12499#ifndef _BIG_ENDIAN
12500 not big endian
12501 #endif
12502
12503 ;
12504 return 0;
12505}
12506_ACEOF
12507if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012508 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012509else
Matthias Kloseb9621712010-04-24 17:59:49 +000012510 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012511fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12513fi
12514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12515 fi
12516 if test $ac_cv_c_bigendian = unknown; then
12517 # Compile a test program.
12518 if test "$cross_compiling" = yes; then :
12519 # Try to guess by grepping values from an object file.
12520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12521/* end confdefs.h. */
12522short int ascii_mm[] =
12523 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12524 short int ascii_ii[] =
12525 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12526 int use_ascii (int i) {
12527 return ascii_mm[i] + ascii_ii[i];
12528 }
12529 short int ebcdic_ii[] =
12530 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12531 short int ebcdic_mm[] =
12532 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12533 int use_ebcdic (int i) {
12534 return ebcdic_mm[i] + ebcdic_ii[i];
12535 }
12536 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012537
Matthias Kloseb9621712010-04-24 17:59:49 +000012538int
12539main ()
12540{
12541return use_ascii (foo) == use_ebcdic (foo);
12542 ;
12543 return 0;
12544}
12545_ACEOF
12546if ac_fn_c_try_compile "$LINENO"; then :
12547 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12548 ac_cv_c_bigendian=yes
12549 fi
12550 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12551 if test "$ac_cv_c_bigendian" = unknown; then
12552 ac_cv_c_bigendian=no
12553 else
12554 # finding both strings is unlikely to happen, but who knows?
12555 ac_cv_c_bigendian=unknown
12556 fi
12557 fi
12558fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012560else
Matthias Kloseb9621712010-04-24 17:59:49 +000012561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012562/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012563$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012564int
12565main ()
12566{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012567
Matthias Kloseb9621712010-04-24 17:59:49 +000012568 /* Are we little or big endian? From Harbison&Steele. */
12569 union
12570 {
12571 long int l;
12572 char c[sizeof (long int)];
12573 } u;
12574 u.l = 1;
12575 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012576
12577 ;
12578 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012579}
Martin v. Löwis11437992002-04-12 09:54:03 +000012580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012581if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012582 ac_cv_c_bigendian=no
12583else
Matthias Kloseb9621712010-04-24 17:59:49 +000012584 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012585fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012586rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12587 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012588fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012589
Matthias Kloseb9621712010-04-24 17:59:49 +000012590 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012591fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12593$as_echo "$ac_cv_c_bigendian" >&6; }
12594 case $ac_cv_c_bigendian in #(
12595 yes)
12596 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12597;; #(
12598 no)
12599 ;; #(
12600 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012601
Matthias Kloseb9621712010-04-24 17:59:49 +000012602$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012603
Matthias Kloseb9621712010-04-24 17:59:49 +000012604 ;; #(
12605 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012606 as_fn_error $? "unknown endianness
Antoine Pitrou37009202011-07-08 23:47:50 +020012607 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012608 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012609
Michael W. Hudson54241132001-12-07 15:38:26 +000012610
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012611# ABI version string for Python extension modules. This appears between the
12612# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12613# from the following attributes which affect the ABI of this Python build (in
12614# this order):
12615#
12616# * The Python implementation (always 'cpython-' for us)
12617# * The major and minor version numbers
12618# * --with-pydebug (adds a 'd')
12619# * --with-pymalloc (adds a 'm')
12620# * --with-wide-unicode (adds a 'u')
12621#
12622# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012623# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12624# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012625
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12627$as_echo_n "checking ABIFLAGS... " >&6; }
12628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12629$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12631$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012632SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12634$as_echo "$SOABI" >&6; }
12635
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12637$as_echo_n "checking LDVERSION... " >&6; }
12638LDVERSION='$(VERSION)$(ABIFLAGS)'
12639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12640$as_echo "$LDVERSION" >&6; }
12641
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012642# SO is the extension of shared libraries `(including the dot!)
12643# -- usually .so, .sl on HP-UX, .dll on Cygwin
12644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12645$as_echo_n "checking SO... " >&6; }
12646if test -z "$SO"
12647then
12648 case $ac_sys_system in
12649 hp*|HP*)
12650 case `uname -m` in
12651 ia64) SO=.so;;
12652 *) SO=.sl;;
12653 esac
12654 ;;
12655 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012656 Linux*|GNU*)
12657 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012658 *) SO=.so;;
12659 esac
12660else
12661 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012662 echo
12663 echo '====================================================================='
12664 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012665 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012666 echo '+ Do you really mean to change the extension for shared libraries? +'
12667 echo '+ Continuing in 10 seconds to let you to ponder. +'
12668 echo '+ +'
12669 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012670 sleep 10
12671fi
12672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12673$as_echo "$SO" >&6; }
12674
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012675# Check whether right shifting a negative integer extends the sign bit
12676# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12678$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020012679if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012680 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012681else
Martin v. Löwis11437992002-04-12 09:54:03 +000012682
Matthias Kloseb9621712010-04-24 17:59:49 +000012683if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012684 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012685else
Matthias Kloseb9621712010-04-24 17:59:49 +000012686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012687/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012688
12689int main()
12690{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012691 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012692}
12693
Martin v. Löwis11437992002-04-12 09:54:03 +000012694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012695if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012696 ac_cv_rshift_extends_sign=yes
12697else
Matthias Kloseb9621712010-04-24 17:59:49 +000012698 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012699fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012700rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12701 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012702fi
12703
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012704fi
12705
Matthias Kloseb9621712010-04-24 17:59:49 +000012706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12707$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012708if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012709then
Martin v. Löwis11437992002-04-12 09:54:03 +000012710
Matthias Kloseb9621712010-04-24 17:59:49 +000012711$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012712
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012713fi
12714
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012715# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12717$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020012718if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012719 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012720else
Martin v. Löwis11437992002-04-12 09:54:03 +000012721
Matthias Kloseb9621712010-04-24 17:59:49 +000012722cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012723/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012724#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012725int
12726main ()
12727{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012728
12729 FILE *f = fopen("/dev/null", "r");
12730 flockfile(f);
12731 getc_unlocked(f);
12732 funlockfile(f);
12733
Martin v. Löwis11437992002-04-12 09:54:03 +000012734 ;
12735 return 0;
12736}
12737_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012738if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012739 ac_cv_have_getc_unlocked=yes
12740else
Matthias Kloseb9621712010-04-24 17:59:49 +000012741 ac_cv_have_getc_unlocked=no
12742fi
12743rm -f core conftest.err conftest.$ac_objext \
12744 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012745fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012746
Matthias Kloseb9621712010-04-24 17:59:49 +000012747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12748$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012749if test "$ac_cv_have_getc_unlocked" = yes
12750then
Martin v. Löwis11437992002-04-12 09:54:03 +000012751
Matthias Kloseb9621712010-04-24 17:59:49 +000012752$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012753
12754fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012755
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012756# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012757# save the value of LIBS so we don't actually link Python with readline
12758LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012759
Gregory P. Smith18820942008-09-07 06:24:49 +000012760# On some systems we need to link readline to a termcap compatible
12761# library. NOTE: Keep the precedence of listed libraries synchronised
12762# with setup.py.
12763py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12765$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012766for py_libtermcap in "" ncursesw ncurses curses termcap; do
12767 if test -z "$py_libtermcap"; then
12768 READLINE_LIBS="-lreadline"
12769 else
12770 READLINE_LIBS="-lreadline -l$py_libtermcap"
12771 fi
12772 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012774/* end confdefs.h. */
12775
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012776/* Override any GCC internal prototype to avoid an error.
12777 Use char because int might match the return type of a GCC
12778 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012779#ifdef __cplusplus
12780extern "C"
12781#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012782char readline ();
12783int
12784main ()
12785{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012786return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012787 ;
12788 return 0;
12789}
12790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012791if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012792 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012793fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012794rm -f core conftest.err conftest.$ac_objext \
12795 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012796 if test $py_cv_lib_readline = yes; then
12797 break
12798 fi
12799done
12800# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12801#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012802if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12804$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012805else
Matthias Kloseb9621712010-04-24 17:59:49 +000012806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12807$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012808
Matthias Kloseb9621712010-04-24 17:59:49 +000012809$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012810
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012811fi
12812
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012813# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12815$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020012816if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012817 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012818else
12819 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012820LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012822/* end confdefs.h. */
12823
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012824/* Override any GCC internal prototype to avoid an error.
12825 Use char because int might match the return type of a GCC
12826 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012827#ifdef __cplusplus
12828extern "C"
12829#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012830char rl_callback_handler_install ();
12831int
12832main ()
12833{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012834return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012835 ;
12836 return 0;
12837}
12838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012839if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012840 ac_cv_lib_readline_rl_callback_handler_install=yes
12841else
Matthias Kloseb9621712010-04-24 17:59:49 +000012842 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012843fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012844rm -f core conftest.err conftest.$ac_objext \
12845 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012846LIBS=$ac_check_lib_save_LIBS
12847fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12849$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020012850if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012851
Matthias Kloseb9621712010-04-24 17:59:49 +000012852$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012853
12854fi
12855
12856
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012857# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012859/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012860#include <readline/readline.h>
12861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012862if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012863 have_readline=yes
12864else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012865 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012866
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012867fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012868rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012869if test $have_readline = yes
12870then
Matthias Kloseb9621712010-04-24 17:59:49 +000012871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012872/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012873#include <readline/readline.h>
12874
12875_ACEOF
12876if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012877 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012878
Matthias Kloseb9621712010-04-24 17:59:49 +000012879$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012880
12881fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012882rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012883
Matthias Kloseb9621712010-04-24 17:59:49 +000012884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012885/* end confdefs.h. */
12886#include <readline/readline.h>
12887
12888_ACEOF
12889if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012890 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012891
Matthias Kloseb9621712010-04-24 17:59:49 +000012892$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012893
12894fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012895rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012896
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012897fi
12898
Martin v. Löwis0daad592001-09-30 21:09:59 +000012899# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12901$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020012902if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012903 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012904else
Martin v. Löwis11437992002-04-12 09:54:03 +000012905 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012906LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012908/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012909
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012910/* Override any GCC internal prototype to avoid an error.
12911 Use char because int might match the return type of a GCC
12912 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012913#ifdef __cplusplus
12914extern "C"
12915#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012916char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012917int
12918main ()
12919{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012920return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012921 ;
12922 return 0;
12923}
12924_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012925if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012926 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012927else
Matthias Kloseb9621712010-04-24 17:59:49 +000012928 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012929fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012930rm -f core conftest.err conftest.$ac_objext \
12931 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012932LIBS=$ac_check_lib_save_LIBS
12933fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12935$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020012936if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012937
Matthias Kloseb9621712010-04-24 17:59:49 +000012938$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012939
Martin v. Löwis0daad592001-09-30 21:09:59 +000012940fi
12941
Michael W. Hudson54241132001-12-07 15:38:26 +000012942
Thomas Wouters89d996e2007-09-08 17:39:28 +000012943# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12945$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020012946if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012947 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012948else
12949 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012950LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012951cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012952/* end confdefs.h. */
12953
12954/* Override any GCC internal prototype to avoid an error.
12955 Use char because int might match the return type of a GCC
12956 builtin and then its argument prototype would still apply. */
12957#ifdef __cplusplus
12958extern "C"
12959#endif
12960char rl_completion_display_matches_hook ();
12961int
12962main ()
12963{
12964return rl_completion_display_matches_hook ();
12965 ;
12966 return 0;
12967}
12968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012969if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012970 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12971else
Matthias Kloseb9621712010-04-24 17:59:49 +000012972 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012973fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012974rm -f core conftest.err conftest.$ac_objext \
12975 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012976LIBS=$ac_check_lib_save_LIBS
12977fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12979$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020012980if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012981
Matthias Kloseb9621712010-04-24 17:59:49 +000012982$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012983
12984fi
12985
12986
Martin v. Löwis0daad592001-09-30 21:09:59 +000012987# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12989$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020012990if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012991 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012992else
Martin v. Löwis11437992002-04-12 09:54:03 +000012993 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012994LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012996/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012997
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012998/* Override any GCC internal prototype to avoid an error.
12999 Use char because int might match the return type of a GCC
13000 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013001#ifdef __cplusplus
13002extern "C"
13003#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013004char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013005int
13006main ()
13007{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013008return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013009 ;
13010 return 0;
13011}
13012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013013if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013014 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013015else
Matthias Kloseb9621712010-04-24 17:59:49 +000013016 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013017fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013018rm -f core conftest.err conftest.$ac_objext \
13019 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013020LIBS=$ac_check_lib_save_LIBS
13021fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13023$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020013024if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013025
Matthias Kloseb9621712010-04-24 17:59:49 +000013026$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013027
Guido van Rossum353ae582001-07-10 16:45:32 +000013028fi
13029
Jack Jansendd19cf82001-12-06 22:36:17 +000013030
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013031# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013033/* end confdefs.h. */
13034#include <readline/readline.h>
13035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013036if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013037 have_readline=yes
13038else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013039 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013040
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013041fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013042rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013043if test $have_readline = yes
13044then
Matthias Kloseb9621712010-04-24 17:59:49 +000013045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013046/* end confdefs.h. */
13047#include <readline/readline.h>
13048
13049_ACEOF
13050if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013051 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013052
Matthias Kloseb9621712010-04-24 17:59:49 +000013053$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013054
13055fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013056rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013057
13058fi
13059
Martin v. Löwis82bca632006-02-10 20:49:30 +000013060# End of readline checks: restore LIBS
13061LIBS=$LIBS_no_readline
13062
Matthias Kloseb9621712010-04-24 17:59:49 +000013063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13064$as_echo_n "checking for broken nice()... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020013065if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013066 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013067else
Martin v. Löwis11437992002-04-12 09:54:03 +000013068
Matthias Kloseb9621712010-04-24 17:59:49 +000013069if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013070 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013071else
Matthias Kloseb9621712010-04-24 17:59:49 +000013072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013073/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013074
13075int main()
13076{
13077 int val1 = nice(1);
13078 if (val1 != -1 && val1 == nice(2))
13079 exit(0);
13080 exit(1);
13081}
13082
Martin v. Löwis11437992002-04-12 09:54:03 +000013083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013084if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013085 ac_cv_broken_nice=yes
13086else
Matthias Kloseb9621712010-04-24 17:59:49 +000013087 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013088fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013089rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13090 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013091fi
13092
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013093fi
13094
Matthias Kloseb9621712010-04-24 17:59:49 +000013095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13096$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013097if test "$ac_cv_broken_nice" = yes
13098then
Martin v. Löwis11437992002-04-12 09:54:03 +000013099
Matthias Kloseb9621712010-04-24 17:59:49 +000013100$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013101
13102fi
13103
Matthias Kloseb9621712010-04-24 17:59:49 +000013104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13105$as_echo_n "checking for broken poll()... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020013106if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013107 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013108else
Matthias Kloseb9621712010-04-24 17:59:49 +000013109 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013110 ac_cv_broken_poll=no
13111else
Matthias Kloseb9621712010-04-24 17:59:49 +000013112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013113/* end confdefs.h. */
13114
13115#include <poll.h>
13116
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013117int main()
13118{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013119 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013120 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013121
13122 close (42);
13123
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013124 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013125 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013126 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013127 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013128 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013129 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013130 return 1;
13131}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013132
13133_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013134if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013135 ac_cv_broken_poll=yes
13136else
Matthias Kloseb9621712010-04-24 17:59:49 +000013137 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013138fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013139rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13140 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013141fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013142
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013143fi
13144
Matthias Kloseb9621712010-04-24 17:59:49 +000013145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13146$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013147if test "$ac_cv_broken_poll" = yes
13148then
13149
Matthias Kloseb9621712010-04-24 17:59:49 +000013150$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013151
13152fi
13153
Brett Cannon43802422005-02-10 20:48:03 +000013154# 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 +000013155# (which is not required by ISO C or UNIX spec) and/or if we support
13156# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013157ac_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 +000013158#include <$ac_cv_struct_tm>
13159
Matthias Kloseb9621712010-04-24 17:59:49 +000013160"
Antoine Pitrou37009202011-07-08 23:47:50 +020013161if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013162
13163cat >>confdefs.h <<_ACEOF
13164#define HAVE_STRUCT_TM_TM_ZONE 1
13165_ACEOF
13166
13167
13168fi
13169
13170if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13171
Matthias Kloseb9621712010-04-24 17:59:49 +000013172$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013173
13174else
Matthias Kloseb9621712010-04-24 17:59:49 +000013175 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13176"
Antoine Pitrou37009202011-07-08 23:47:50 +020013177if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013178 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013179else
Matthias Kloseb9621712010-04-24 17:59:49 +000013180 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013181fi
13182
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013183cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013184#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013185_ACEOF
13186
Matthias Kloseb9621712010-04-24 17:59:49 +000013187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13188$as_echo_n "checking for tzname... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020013189if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013190 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013191else
Matthias Kloseb9621712010-04-24 17:59:49 +000013192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013193/* end confdefs.h. */
13194#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013195#if !HAVE_DECL_TZNAME
13196extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013197#endif
13198
13199int
13200main ()
13201{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013202return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013203 ;
13204 return 0;
13205}
13206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013207if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013208 ac_cv_var_tzname=yes
13209else
Matthias Kloseb9621712010-04-24 17:59:49 +000013210 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013211fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013212rm -f core conftest.err conftest.$ac_objext \
13213 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013214fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13216$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013217 if test $ac_cv_var_tzname = yes; then
13218
Matthias Kloseb9621712010-04-24 17:59:49 +000013219$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013220
13221 fi
13222fi
13223
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013224
Martin v. Löwis1d459062005-03-14 21:23:33 +000013225# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13227$as_echo_n "checking for working tzset()... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020013228if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013229 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013230else
13231
Matthias Kloseb9621712010-04-24 17:59:49 +000013232if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013233 ac_cv_working_tzset=no
13234else
Matthias Kloseb9621712010-04-24 17:59:49 +000013235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013236/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013237
13238#include <stdlib.h>
13239#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013240#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013241
13242#if HAVE_TZNAME
13243extern char *tzname[];
13244#endif
13245
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013246int main()
13247{
Brett Cannon18367812003-09-19 00:59:16 +000013248 /* Note that we need to ensure that not only does tzset(3)
13249 do 'something' with localtime, but it works as documented
13250 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013251 This includes making sure that tzname is set properly if
13252 tm->tm_zone does not exist since it is the alternative way
13253 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013254
13255 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013256 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013257 */
13258
Martin v. Löwis1d459062005-03-14 21:23:33 +000013259 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013260 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13261
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013262 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013263 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013264 if (localtime(&groundhogday)->tm_hour != 0)
13265 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013266#if HAVE_TZNAME
13267 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13268 if (strcmp(tzname[0], "UTC") ||
13269 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13270 exit(1);
13271#endif
Brett Cannon18367812003-09-19 00:59:16 +000013272
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013273 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013274 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013275 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013276 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013277#if HAVE_TZNAME
13278 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13279 exit(1);
13280#endif
Brett Cannon18367812003-09-19 00:59:16 +000013281
13282 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13283 tzset();
13284 if (localtime(&groundhogday)->tm_hour != 11)
13285 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013286#if HAVE_TZNAME
13287 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13288 exit(1);
13289#endif
13290
13291#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013292 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13293 exit(1);
13294 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13295 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013296#endif
Brett Cannon18367812003-09-19 00:59:16 +000013297
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013298 exit(0);
13299}
13300
13301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013302if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013303 ac_cv_working_tzset=yes
13304else
Matthias Kloseb9621712010-04-24 17:59:49 +000013305 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013306fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013307rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13308 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013309fi
13310
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013311fi
13312
Matthias Kloseb9621712010-04-24 17:59:49 +000013313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13314$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013315if test "$ac_cv_working_tzset" = yes
13316then
13317
Matthias Kloseb9621712010-04-24 17:59:49 +000013318$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013319
13320fi
13321
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013322# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13324$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020013325if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013326 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013327else
Matthias Kloseb9621712010-04-24 17:59:49 +000013328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013329/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013330#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013331int
13332main ()
13333{
13334
13335struct stat st;
13336st.st_mtim.tv_nsec = 1;
13337
13338 ;
13339 return 0;
13340}
13341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013342if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013343 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013344else
Matthias Kloseb9621712010-04-24 17:59:49 +000013345 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013346fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13348fi
13349
Matthias Kloseb9621712010-04-24 17:59:49 +000013350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13351$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013352if test "$ac_cv_stat_tv_nsec" = yes
13353then
13354
Matthias Kloseb9621712010-04-24 17:59:49 +000013355$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013356
13357fi
13358
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013359# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13361$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020013362if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013363 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013364else
Matthias Kloseb9621712010-04-24 17:59:49 +000013365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013366/* end confdefs.h. */
13367#include <sys/stat.h>
13368int
13369main ()
13370{
13371
13372struct stat st;
13373st.st_mtimespec.tv_nsec = 1;
13374
13375 ;
13376 return 0;
13377}
13378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013379if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013380 ac_cv_stat_tv_nsec2=yes
13381else
Matthias Kloseb9621712010-04-24 17:59:49 +000013382 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013383fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13385fi
13386
Matthias Kloseb9621712010-04-24 17:59:49 +000013387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13388$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013389if test "$ac_cv_stat_tv_nsec2" = yes
13390then
13391
Matthias Kloseb9621712010-04-24 17:59:49 +000013392$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013393
13394fi
13395
Jack Jansen666b1e72001-10-31 12:11:48 +000013396# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13398$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020013399if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013400 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013401else
Matthias Kloseb9621712010-04-24 17:59:49 +000013402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013403/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013404#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013405int
13406main ()
13407{
Jack Jansen666b1e72001-10-31 12:11:48 +000013408
13409 int rtn;
13410 rtn = mvwdelch(0,0,0);
13411
Martin v. Löwis11437992002-04-12 09:54:03 +000013412 ;
13413 return 0;
13414}
13415_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013416if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013417 ac_cv_mvwdelch_is_expression=yes
13418else
Matthias Kloseb9621712010-04-24 17:59:49 +000013419 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013420fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13422fi
13423
Matthias Kloseb9621712010-04-24 17:59:49 +000013424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13425$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013426
13427if test "$ac_cv_mvwdelch_is_expression" = yes
13428then
Martin v. Löwis11437992002-04-12 09:54:03 +000013429
Matthias Kloseb9621712010-04-24 17:59:49 +000013430$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013431
13432fi
13433
Matthias Kloseb9621712010-04-24 17:59:49 +000013434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13435$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020013436if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013437 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013438else
Matthias Kloseb9621712010-04-24 17:59:49 +000013439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013440/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013441#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013442int
13443main ()
13444{
Jack Jansen666b1e72001-10-31 12:11:48 +000013445
13446 WINDOW *w;
13447 w->_flags = 0;
13448
Martin v. Löwis11437992002-04-12 09:54:03 +000013449 ;
13450 return 0;
13451}
13452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013453if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013454 ac_cv_window_has_flags=yes
13455else
Matthias Kloseb9621712010-04-24 17:59:49 +000013456 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013457fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13459fi
13460
Matthias Kloseb9621712010-04-24 17:59:49 +000013461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13462$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013463
Jack Jansen666b1e72001-10-31 12:11:48 +000013464
13465if test "$ac_cv_window_has_flags" = yes
13466then
Martin v. Löwis11437992002-04-12 09:54:03 +000013467
Matthias Kloseb9621712010-04-24 17:59:49 +000013468$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013469
13470fi
13471
Matthias Kloseb9621712010-04-24 17:59:49 +000013472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13473$as_echo_n "checking for is_term_resized... " >&6; }
13474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013475/* end confdefs.h. */
13476#include <curses.h>
13477int
13478main ()
13479{
13480void *x=is_term_resized
13481 ;
13482 return 0;
13483}
13484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013485if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013486
Matthias Kloseb9621712010-04-24 17:59:49 +000013487$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013488
Matthias Kloseb159a552010-04-25 21:00:44 +000013489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013490$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013491else
Matthias Kloseb9621712010-04-24 17:59:49 +000013492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13493$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013494
13495fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13497
Matthias Kloseb9621712010-04-24 17:59:49 +000013498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13499$as_echo_n "checking for resize_term... " >&6; }
13500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013501/* end confdefs.h. */
13502#include <curses.h>
13503int
13504main ()
13505{
13506void *x=resize_term
13507 ;
13508 return 0;
13509}
13510_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013511if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013512
Matthias Kloseb9621712010-04-24 17:59:49 +000013513$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013514
Matthias Kloseb159a552010-04-25 21:00:44 +000013515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013516$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013517else
Matthias Kloseb9621712010-04-24 17:59:49 +000013518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13519$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013520
13521fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13523
Matthias Kloseb9621712010-04-24 17:59:49 +000013524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13525$as_echo_n "checking for resizeterm... " >&6; }
13526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013527/* end confdefs.h. */
13528#include <curses.h>
13529int
13530main ()
13531{
13532void *x=resizeterm
13533 ;
13534 return 0;
13535}
13536_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013537if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013538
Matthias Kloseb9621712010-04-24 17:59:49 +000013539$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013540
Matthias Kloseb159a552010-04-25 21:00:44 +000013541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013542$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013543else
Matthias Kloseb9621712010-04-24 17:59:49 +000013544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13545$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013546
13547fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13549
Matthias Kloseb9621712010-04-24 17:59:49 +000013550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13551$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013552
13553if test -r /dev/ptmx
13554then
Matthias Kloseb9621712010-04-24 17:59:49 +000013555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13556$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013557
Matthias Kloseb9621712010-04-24 17:59:49 +000013558$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013559
Thomas Wouters89f507f2006-12-13 04:49:30 +000013560else
Matthias Kloseb9621712010-04-24 17:59:49 +000013561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13562$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013563fi
13564
Matthias Kloseb9621712010-04-24 17:59:49 +000013565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13566$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013567
13568if test -r /dev/ptc
13569then
Matthias Kloseb9621712010-04-24 17:59:49 +000013570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13571$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013572
Matthias Kloseb9621712010-04-24 17:59:49 +000013573$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013574
Thomas Wouters89f507f2006-12-13 04:49:30 +000013575else
Matthias Kloseb9621712010-04-24 17:59:49 +000013576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13577$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013578fi
13579
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013580if test "$have_long_long" = yes
13581then
Matthias Kloseb9621712010-04-24 17:59:49 +000013582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13583$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020013584 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013585 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013586else
Matthias Kloseb9621712010-04-24 17:59:49 +000013587 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013588 ac_cv_have_long_long_format=no
13589else
Matthias Kloseb9621712010-04-24 17:59:49 +000013590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013591/* end confdefs.h. */
13592
13593 #include <stdio.h>
13594 #include <stddef.h>
13595 #include <string.h>
13596
13597 #ifdef HAVE_SYS_TYPES_H
13598 #include <sys/types.h>
13599 #endif
13600
13601 int main()
13602 {
13603 char buffer[256];
13604
13605 if (sprintf(buffer, "%lld", (long long)123) < 0)
13606 return 1;
13607 if (strcmp(buffer, "123"))
13608 return 1;
13609
13610 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13611 return 1;
13612 if (strcmp(buffer, "-123"))
13613 return 1;
13614
13615 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13616 return 1;
13617 if (strcmp(buffer, "123"))
13618 return 1;
13619
13620 return 0;
13621 }
13622
13623_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013624if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013625 ac_cv_have_long_long_format=yes
13626else
Matthias Kloseb9621712010-04-24 17:59:49 +000013627 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013628fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013629rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13630 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013631fi
13632
13633
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013634fi
13635
Matthias Kloseb9621712010-04-24 17:59:49 +000013636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13637$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013638fi
13639
Mark Dickinson89d7d412009-12-31 20:50:59 +000013640if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013641then
13642
Matthias Kloseb9621712010-04-24 17:59:49 +000013643$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013644
13645fi
13646
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013647if test $ac_sys_system = Darwin
13648then
13649 LIBS="$LIBS -framework CoreFoundation"
13650fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013651
Matthias Kloseb9621712010-04-24 17:59:49 +000013652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13653$as_echo_n "checking for %zd printf() format support... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020013654if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013655 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013656else
Matthias Kloseb9621712010-04-24 17:59:49 +000013657 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013658 ac_cv_have_size_t_format="cross -- assuming yes"
13659
Thomas Wouters477c8d52006-05-27 19:21:47 +000013660else
Matthias Kloseb9621712010-04-24 17:59:49 +000013661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013662/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013663
Thomas Wouters477c8d52006-05-27 19:21:47 +000013664#include <stdio.h>
13665#include <stddef.h>
13666#include <string.h>
13667
Christian Heimes2c181612007-12-17 20:04:13 +000013668#ifdef HAVE_SYS_TYPES_H
13669#include <sys/types.h>
13670#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013671
13672#ifdef HAVE_SSIZE_T
13673typedef ssize_t Py_ssize_t;
13674#elif SIZEOF_VOID_P == SIZEOF_LONG
13675typedef long Py_ssize_t;
13676#else
13677typedef int Py_ssize_t;
13678#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013679
Christian Heimes2c181612007-12-17 20:04:13 +000013680int main()
13681{
13682 char buffer[256];
13683
Thomas Wouters477c8d52006-05-27 19:21:47 +000013684 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13685 return 1;
13686
Thomas Wouters89f507f2006-12-13 04:49:30 +000013687 if (strcmp(buffer, "123"))
13688 return 1;
13689
13690 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13691 return 1;
13692
13693 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013694 return 1;
13695
13696 return 0;
13697}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013698
Thomas Wouters477c8d52006-05-27 19:21:47 +000013699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013700if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013701 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013702else
Matthias Kloseb9621712010-04-24 17:59:49 +000013703 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013704fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013705rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13706 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013707fi
13708
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013709fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13711$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013712if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013713
Matthias Kloseb9621712010-04-24 17:59:49 +000013714$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013715
13716fi
13717
Matthias Kloseb9621712010-04-24 17:59:49 +000013718ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013719#ifdef HAVE_SYS_TYPES_H
13720#include <sys/types.h>
13721#endif
13722#ifdef HAVE_SYS_SOCKET_H
13723#include <sys/socket.h>
13724#endif
13725
Matthias Kloseb9621712010-04-24 17:59:49 +000013726"
Antoine Pitrou37009202011-07-08 23:47:50 +020013727if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013728
Martin v. Löwis11437992002-04-12 09:54:03 +000013729else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013730
Matthias Kloseb9621712010-04-24 17:59:49 +000013731$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013732
13733fi
13734
Michael W. Hudson54241132001-12-07 15:38:26 +000013735
Matthias Kloseb9621712010-04-24 17:59:49 +000013736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13737$as_echo_n "checking for broken mbstowcs... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020013738if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013739 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013740else
Matthias Kloseb9621712010-04-24 17:59:49 +000013741 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013742 ac_cv_broken_mbstowcs=no
13743else
Matthias Kloseb9621712010-04-24 17:59:49 +000013744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013745/* end confdefs.h. */
13746
13747#include<stdlib.h>
13748int main() {
13749 size_t len = -1;
13750 const char *str = "text";
13751 len = mbstowcs(NULL, str, 0);
13752 return (len != 4);
13753}
13754
13755_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013756if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013757 ac_cv_broken_mbstowcs=no
13758else
Matthias Kloseb9621712010-04-24 17:59:49 +000013759 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013760fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013761rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13762 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013763fi
13764
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013765fi
13766
Matthias Kloseb9621712010-04-24 17:59:49 +000013767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13768$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013769if test "$ac_cv_broken_mbstowcs" = yes
13770then
13771
Matthias Kloseb9621712010-04-24 17:59:49 +000013772$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013773
13774fi
13775
Antoine Pitrou042b1282010-08-13 21:15:58 +000013776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13777$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Antoine Pitrou37009202011-07-08 23:47:50 +020013778if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013779 $as_echo_n "(cached) " >&6
13780else
13781 if test "$cross_compiling" = yes; then :
13782 ac_cv_computed_gotos=no
13783else
13784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13785/* end confdefs.h. */
13786
13787int main(int argc, char **argv)
13788{
13789 static void *targets[1] = { &&LABEL1 };
13790 goto LABEL2;
13791LABEL1:
13792 return 0;
13793LABEL2:
13794 goto *targets[0];
13795 return 1;
13796}
13797
13798_ACEOF
13799if ac_fn_c_try_run "$LINENO"; then :
13800 ac_cv_computed_gotos=yes
13801else
13802 ac_cv_computed_gotos=no
13803fi
13804rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13805 conftest.$ac_objext conftest.beam conftest.$ac_ext
13806fi
13807
13808fi
13809
13810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13811$as_echo "$ac_cv_computed_gotos" >&6; }
13812if test "$ac_cv_computed_gotos" = yes
13813then
13814
13815$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13816
13817fi
13818
Antoine Pitroub52ec782009-01-25 16:34:23 +000013819# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13821$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013822
13823# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013824if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013825 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013826if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013827then
13828
Matthias Kloseb9621712010-04-24 17:59:49 +000013829$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013830
Matthias Kloseb9621712010-04-24 17:59:49 +000013831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13832$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013833fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013834if test "$withval" = no
13835then
13836
13837$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13838
Matthias Kloseb9621712010-04-24 17:59:49 +000013839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13840$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013841fi
13842
Antoine Pitrou042b1282010-08-13 21:15:58 +000013843else
13844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13845$as_echo "no value specified" >&6; }
13846fi
13847
Antoine Pitroub52ec782009-01-25 16:34:23 +000013848
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013849case $ac_sys_system in
13850AIX*)
13851
13852$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13853 ;;
13854esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013855
Michael W. Hudson54241132001-12-07 15:38:26 +000013856
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013857
13858
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013859for h in `(cd $srcdir;echo Python/thread_*.h)`
13860do
13861 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13862done
13863
Michael W. Hudson54241132001-12-07 15:38:26 +000013864
Neal Norwitzd24499d2005-12-18 21:36:39 +000013865SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13867$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013868for dir in $SRCDIRS; do
13869 if test ! -d $dir; then
13870 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013871 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013872done
Matthias Kloseb9621712010-04-24 17:59:49 +000013873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13874$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013875
Guido van Rossum627b2d71993-12-24 10:39:16 +000013876# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013877ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013878
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013879ac_config_files="$ac_config_files Modules/ld_so_aix"
13880
Martin v. Löwis11437992002-04-12 09:54:03 +000013881cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013882# This file is a shell script that caches the results of configure
13883# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013884# scripts and configure runs, see configure's option --config-cache.
13885# It is not useful on other systems. If it contains results you don't
13886# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013887#
Martin v. Löwis11437992002-04-12 09:54:03 +000013888# config.status only pays attention to the cache file if you give it
13889# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013890#
Skip Montanaro6dead952003-09-25 14:50:04 +000013891# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013892# loading this file, other *unset* `ac_cv_foo' will be assigned the
13893# following values.
13894
13895_ACEOF
13896
Guido van Rossumf78abae1997-01-21 22:02:36 +000013897# The following way of writing the cache mishandles newlines in values,
13898# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013899# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013900# Ultrix sh set writes to stderr and can't be redirected directly,
13901# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013902(
13903 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13904 eval ac_val=\$$ac_var
13905 case $ac_val in #(
13906 *${as_nl}*)
13907 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013908 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13909$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013910 esac
13911 case $ac_var in #(
13912 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013913 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13914 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013915 esac ;;
13916 esac
13917 done
13918
Martin v. Löwis11437992002-04-12 09:54:03 +000013919 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013920 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13921 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013922 # `set' does not quote correctly, so add quotes: double-quote
13923 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013924 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013925 "s/'/'\\\\''/g;
13926 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013927 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013928 *)
13929 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013930 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013931 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013932 esac |
13933 sort
13934) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013935 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013936 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013937 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013938 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013939 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13940 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013941 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13942 :end' >>confcache
13943if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13944 if test -w "$cache_file"; then
Antoine Pitrou37009202011-07-08 23:47:50 +020013945 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013946 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13947$as_echo "$as_me: updating cache $cache_file" >&6;}
Antoine Pitrou37009202011-07-08 23:47:50 +020013948 if test ! -f "$cache_file" || test -h "$cache_file"; then
13949 cat confcache >"$cache_file"
13950 else
13951 case $cache_file in #(
13952 */* | ?:*)
13953 mv -f confcache "$cache_file"$$ &&
13954 mv -f "$cache_file"$$ "$cache_file" ;; #(
13955 *)
13956 mv -f confcache "$cache_file" ;;
13957 esac
13958 fi
13959 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013960 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013961 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13962$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013963 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013964fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013965rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013966
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013967test "x$prefix" = xNONE && prefix=$ac_default_prefix
13968# Let make expand exec_prefix.
13969test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013970
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013971DEFS=-DHAVE_CONFIG_H
13972
Skip Montanaro6dead952003-09-25 14:50:04 +000013973ac_libobjs=
13974ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013975U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013976for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13977 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013978 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013979 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013980 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13981 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013982 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13983 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013984done
13985LIBOBJS=$ac_libobjs
13986
13987LTLIBOBJS=$ac_ltlibobjs
13988
13989
Martin v. Löwis11437992002-04-12 09:54:03 +000013990
Matthias Kloseb9621712010-04-24 17:59:49 +000013991
Antoine Pitrou37009202011-07-08 23:47:50 +020013992: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000013993ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013994ac_clean_files_save=$ac_clean_files
13995ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013996{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13997$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13998as_write_fail=0
13999cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014000#! $SHELL
14001# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014002# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014003# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014004# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014005
Martin v. Löwis11437992002-04-12 09:54:03 +000014006debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014007ac_cs_recheck=false
14008ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014009
Matthias Kloseb9621712010-04-24 17:59:49 +000014010SHELL=\${CONFIG_SHELL-$SHELL}
14011export SHELL
14012_ASEOF
14013cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14014## -------------------- ##
14015## M4sh Initialization. ##
14016## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014017
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014018# Be more Bourne compatible
14019DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014020if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014021 emulate sh
14022 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014023 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014024 # is contrary to our usage. Disable this feature.
14025 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014026 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014027else
Matthias Kloseb9621712010-04-24 17:59:49 +000014028 case `(set -o) 2>/dev/null` in #(
14029 *posix*) :
14030 set -o posix ;; #(
14031 *) :
14032 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014033esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014034fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014035
14036
Matthias Kloseb9621712010-04-24 17:59:49 +000014037as_nl='
14038'
14039export as_nl
14040# Printing a long string crashes Solaris 7 /usr/bin/printf.
14041as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14042as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14043as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14044# Prefer a ksh shell builtin over an external printf program on Solaris,
14045# but without wasting forks for bash or zsh.
14046if test -z "$BASH_VERSION$ZSH_VERSION" \
14047 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14048 as_echo='print -r --'
14049 as_echo_n='print -rn --'
14050elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14051 as_echo='printf %s\n'
14052 as_echo_n='printf %s'
14053else
14054 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14055 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14056 as_echo_n='/usr/ucb/echo -n'
14057 else
14058 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14059 as_echo_n_body='eval
14060 arg=$1;
14061 case $arg in #(
14062 *"$as_nl"*)
14063 expr "X$arg" : "X\\(.*\\)$as_nl";
14064 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14065 esac;
14066 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14067 '
14068 export as_echo_n_body
14069 as_echo_n='sh -c $as_echo_n_body as_echo'
14070 fi
14071 export as_echo_body
14072 as_echo='sh -c $as_echo_body as_echo'
14073fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014074
14075# The user is always right.
14076if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014077 PATH_SEPARATOR=:
14078 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14079 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14080 PATH_SEPARATOR=';'
14081 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014082fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014083
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014084
14085# IFS
14086# We need space, tab and new line, in precisely that order. Quoting is
14087# there to prevent editors from complaining about space-tab.
14088# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14089# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014090IFS=" "" $as_nl"
14091
14092# Find who we are. Look in the path if we contain no directory separator.
Antoine Pitrou37009202011-07-08 23:47:50 +020014093as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014094case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014095 *[\\/]* ) as_myself=$0 ;;
14096 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014097for as_dir in $PATH
14098do
14099 IFS=$as_save_IFS
14100 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14102 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014103IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014104
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014105 ;;
14106esac
14107# We did not find ourselves, most probably we were run as `sh COMMAND'
14108# in which case we are not to be found in the path.
14109if test "x$as_myself" = x; then
14110 as_myself=$0
14111fi
14112if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14114 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014115fi
14116
Matthias Kloseb9621712010-04-24 17:59:49 +000014117# Unset variables that we do not need and which cause bugs (e.g. in
14118# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14119# suppresses any "Segmentation fault" message there. '((' could
14120# trigger a bug in pdksh 5.2.14.
14121for as_var in BASH_ENV ENV MAIL MAILPATH
14122do eval test x\${$as_var+set} = xset \
14123 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014124done
14125PS1='$ '
14126PS2='> '
14127PS4='+ '
14128
14129# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014130LC_ALL=C
14131export LC_ALL
14132LANGUAGE=C
14133export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014134
Matthias Kloseb9621712010-04-24 17:59:49 +000014135# CDPATH.
14136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14137
14138
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014139# as_fn_error STATUS ERROR [LINENO LOG_FD]
14140# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014141# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14142# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014143# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014144as_fn_error ()
14145{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014146 as_status=$1; test $as_status -eq 0 && as_status=1
14147 if test "$4"; then
14148 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14149 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014150 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014151 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014152 as_fn_exit $as_status
14153} # as_fn_error
14154
14155
14156# as_fn_set_status STATUS
14157# -----------------------
14158# Set $? to STATUS, without forking.
14159as_fn_set_status ()
14160{
14161 return $1
14162} # as_fn_set_status
14163
14164# as_fn_exit STATUS
14165# -----------------
14166# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14167as_fn_exit ()
14168{
14169 set +e
14170 as_fn_set_status $1
14171 exit $1
14172} # as_fn_exit
14173
14174# as_fn_unset VAR
14175# ---------------
14176# Portably unset VAR.
14177as_fn_unset ()
14178{
14179 { eval $1=; unset $1;}
14180}
14181as_unset=as_fn_unset
14182# as_fn_append VAR VALUE
14183# ----------------------
14184# Append the text in VALUE to the end of the definition contained in VAR. Take
14185# advantage of any shell optimizations that allow amortized linear growth over
14186# repeated appends, instead of the typical quadratic growth present in naive
14187# implementations.
14188if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14189 eval 'as_fn_append ()
14190 {
14191 eval $1+=\$2
14192 }'
14193else
14194 as_fn_append ()
14195 {
14196 eval $1=\$$1\$2
14197 }
14198fi # as_fn_append
14199
14200# as_fn_arith ARG...
14201# ------------------
14202# Perform arithmetic evaluation on the ARGs, and store the result in the
14203# global $as_val. Take advantage of shells that can avoid forks. The arguments
14204# must be portable across $(()) and expr.
14205if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14206 eval 'as_fn_arith ()
14207 {
14208 as_val=$(( $* ))
14209 }'
14210else
14211 as_fn_arith ()
14212 {
14213 as_val=`expr "$@" || test $? -eq 1`
14214 }
14215fi # as_fn_arith
14216
14217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014218if expr a : '\(a\)' >/dev/null 2>&1 &&
14219 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14220 as_expr=expr
14221else
14222 as_expr=false
14223fi
14224
14225if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14226 as_basename=basename
14227else
14228 as_basename=false
14229fi
14230
Matthias Kloseb9621712010-04-24 17:59:49 +000014231if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14232 as_dirname=dirname
14233else
14234 as_dirname=false
14235fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014236
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014237as_me=`$as_basename -- "$0" ||
14238$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14239 X"$0" : 'X\(//\)$' \| \
14240 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014241$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014242 sed '/^.*\/\([^/][^/]*\)\/*$/{
14243 s//\1/
14244 q
14245 }
14246 /^X\/\(\/\/\)$/{
14247 s//\1/
14248 q
14249 }
14250 /^X\/\(\/\).*/{
14251 s//\1/
14252 q
14253 }
14254 s/.*/./; q'`
14255
Matthias Kloseb9621712010-04-24 17:59:49 +000014256# Avoid depending upon Character Ranges.
14257as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14258as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14259as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14260as_cr_digits='0123456789'
14261as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014262
14263ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014264case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014265-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014266 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014267 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014268 xy) ECHO_C='\c';;
14269 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14270 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014271 esac;;
14272*)
14273 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014274esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014275
Martin v. Löwis11437992002-04-12 09:54:03 +000014276rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014277if test -d conf$$.dir; then
14278 rm -f conf$$.dir/conf$$.file
14279else
14280 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014281 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014282fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014283if (echo >conf$$.file) 2>/dev/null; then
14284 if ln -s conf$$.file conf$$ 2>/dev/null; then
14285 as_ln_s='ln -s'
14286 # ... but there are two gotchas:
14287 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14288 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14289 # In both cases, we have to default to `cp -p'.
14290 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14291 as_ln_s='cp -p'
14292 elif ln conf$$.file conf$$ 2>/dev/null; then
14293 as_ln_s=ln
14294 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014295 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014296 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014297else
14298 as_ln_s='cp -p'
14299fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014300rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14301rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014302
Matthias Kloseb9621712010-04-24 17:59:49 +000014303
14304# as_fn_mkdir_p
14305# -------------
14306# Create "$as_dir" as a directory, including parents if necessary.
14307as_fn_mkdir_p ()
14308{
14309
14310 case $as_dir in #(
14311 -*) as_dir=./$as_dir;;
14312 esac
14313 test -d "$as_dir" || eval $as_mkdir_p || {
14314 as_dirs=
14315 while :; do
14316 case $as_dir in #(
14317 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14318 *) as_qdir=$as_dir;;
14319 esac
14320 as_dirs="'$as_qdir' $as_dirs"
14321 as_dir=`$as_dirname -- "$as_dir" ||
14322$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14323 X"$as_dir" : 'X\(//\)[^/]' \| \
14324 X"$as_dir" : 'X\(//\)$' \| \
14325 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14326$as_echo X"$as_dir" |
14327 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14328 s//\1/
14329 q
14330 }
14331 /^X\(\/\/\)[^/].*/{
14332 s//\1/
14333 q
14334 }
14335 /^X\(\/\/\)$/{
14336 s//\1/
14337 q
14338 }
14339 /^X\(\/\).*/{
14340 s//\1/
14341 q
14342 }
14343 s/.*/./; q'`
14344 test -d "$as_dir" && break
14345 done
14346 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014347 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014348
14349
14350} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014351if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014352 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014353else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014354 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014355 as_mkdir_p=false
14356fi
14357
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014358if test -x / >/dev/null 2>&1; then
14359 as_test_x='test -x'
14360else
14361 if ls -dL / >/dev/null 2>&1; then
14362 as_ls_L_option=L
14363 else
14364 as_ls_L_option=
14365 fi
14366 as_test_x='
14367 eval sh -c '\''
14368 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014369 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014370 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014371 case $1 in #(
14372 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014373 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014374 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014375 ???[sx]*):;;*)false;;esac;fi
14376 '\'' sh
14377 '
14378fi
14379as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014380
14381# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014382as_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 +000014383
14384# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014385as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014386
14387
Martin v. Löwis11437992002-04-12 09:54:03 +000014388exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014389## ----------------------------------- ##
14390## Main body of $CONFIG_STATUS script. ##
14391## ----------------------------------- ##
14392_ASEOF
14393test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014394
Matthias Kloseb9621712010-04-24 17:59:49 +000014395cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14396# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014397# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014398# values after options handling.
14399ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014400This file was extended by python $as_me 3.3, which was
Antoine Pitrou37009202011-07-08 23:47:50 +020014401generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014402
14403 CONFIG_FILES = $CONFIG_FILES
14404 CONFIG_HEADERS = $CONFIG_HEADERS
14405 CONFIG_LINKS = $CONFIG_LINKS
14406 CONFIG_COMMANDS = $CONFIG_COMMANDS
14407 $ $0 $@
14408
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014409on `(hostname || uname -n) 2>/dev/null | sed 1q`
14410"
14411
Martin v. Löwis11437992002-04-12 09:54:03 +000014412_ACEOF
14413
Matthias Kloseb9621712010-04-24 17:59:49 +000014414case $ac_config_files in *"
14415"*) set x $ac_config_files; shift; ac_config_files=$*;;
14416esac
14417
14418case $ac_config_headers in *"
14419"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14420esac
14421
14422
14423cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014424# Files that config.status was made for.
Antoine Pitrou37009202011-07-08 23:47:50 +020014425config_files="`echo $ac_config_files`"
14426config_headers="`echo $ac_config_headers`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014427
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014428_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014429
Matthias Kloseb9621712010-04-24 17:59:49 +000014430cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014431ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014432\`$as_me' instantiates files and other configuration actions
14433from templates according to the current configuration. Unless the files
14434and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014435
Matthias Kloseb9621712010-04-24 17:59:49 +000014436Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014437
14438 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014439 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014440 --config print configuration, then exit
14441 -q, --quiet, --silent
14442 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014443 -d, --debug don't remove temporary files
14444 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014445 --file=FILE[:TEMPLATE]
14446 instantiate the configuration file FILE
14447 --header=FILE[:TEMPLATE]
14448 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014449
14450Configuration files:
14451$config_files
14452
14453Configuration headers:
14454$config_headers
14455
Matthias Kloseb9621712010-04-24 17:59:49 +000014456Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014457
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014459cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14460ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014461ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014462python config.status 3.3
Antoine Pitrou37009202011-07-08 23:47:50 +020014463configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000014464 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014465
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014466Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014467This config.status script is free software; the Free Software Foundation
14468gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014469
14470ac_pwd='$ac_pwd'
14471srcdir='$srcdir'
14472INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014473test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014474_ACEOF
14475
Matthias Kloseb9621712010-04-24 17:59:49 +000014476cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14477# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014478ac_need_defaults=:
14479while test $# != 0
14480do
14481 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014482 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014483 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14484 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014485 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014486 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014487 --*=)
14488 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14489 ac_optarg=
14490 ac_shift=:
14491 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014492 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014493 ac_option=$1
14494 ac_optarg=$2
14495 ac_shift=shift
14496 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014497 esac
14498
Skip Montanaro6dead952003-09-25 14:50:04 +000014499 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014500 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014501 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14502 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014503 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014504 $as_echo "$ac_cs_version"; exit ;;
14505 --config | --confi | --conf | --con | --co | --c )
14506 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014507 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014508 debug=: ;;
14509 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014510 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014511 case $ac_optarg in
14512 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014513 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014514 esac
14515 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014516 ac_need_defaults=false;;
14517 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014518 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014519 case $ac_optarg in
14520 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14521 esac
14522 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014523 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014524 --he | --h)
14525 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014526 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014527Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014528 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014529 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014530 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14531 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14532 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014533
14534 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014535 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014536Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014537
Matthias Kloseb9621712010-04-24 17:59:49 +000014538 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014539 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014540
14541 esac
14542 shift
14543done
14544
Skip Montanaro6dead952003-09-25 14:50:04 +000014545ac_configure_extra_args=
14546
14547if $ac_cs_silent; then
14548 exec 6>/dev/null
14549 ac_configure_extra_args="$ac_configure_extra_args --silent"
14550fi
14551
14552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014553cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014554if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014555 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14556 shift
14557 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14558 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014559 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014560 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014561fi
14562
Martin v. Löwis11437992002-04-12 09:54:03 +000014563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014564cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014565exec 5>>config.log
14566{
14567 echo
14568 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14569## Running $as_me. ##
14570_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014571 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014572} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014573
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014575cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014576_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014577
Matthias Kloseb9621712010-04-24 17:59:49 +000014578cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014579
14580# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014581for ac_config_target in $ac_config_targets
14582do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014583 case $ac_config_target in
14584 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14585 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14586 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014587 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14588 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014589 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14590 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014591 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014592 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014593
Antoine Pitrou37009202011-07-08 23:47:50 +020014594 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014595 esac
14596done
14597
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014598
Martin v. Löwis11437992002-04-12 09:54:03 +000014599# If the user did not use the arguments to specify the items to instantiate,
14600# then the envvar interface is used. Set only those that are not.
14601# We use the long form for the default assignment because of an extremely
14602# bizarre bug on SunOS 4.1.3.
14603if $ac_need_defaults; then
14604 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14605 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14606fi
14607
Skip Montanaro6dead952003-09-25 14:50:04 +000014608# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014609# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014610# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014611# Hook for its removal unless debugging.
14612# Note that there is a small window in which the directory will not be cleaned:
14613# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014614$debug ||
14615{
Antoine Pitrou37009202011-07-08 23:47:50 +020014616 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014617 trap 'exit_status=$?
Antoine Pitrou37009202011-07-08 23:47:50 +020014618 : "${ac_tmp:=$tmp}"
14619 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014620' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014621 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014622}
Martin v. Löwis11437992002-04-12 09:54:03 +000014623# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014624
Martin v. Löwis11437992002-04-12 09:54:03 +000014625{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014626 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Antoine Pitrou37009202011-07-08 23:47:50 +020014627 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014628} ||
14629{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014630 tmp=./conf$$-$RANDOM
14631 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014632} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Antoine Pitrou37009202011-07-08 23:47:50 +020014633ac_tmp=$tmp
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
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014650 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014651else
14652 ac_cs_awk_cr=$ac_cr
14653fi
14654
Antoine Pitrou37009202011-07-08 23:47:50 +020014655echo 'BEGIN {' >"$ac_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 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014664 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 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014669 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
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014675 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
Antoine Pitrou37009202011-07-08 23:47:50 +020014683cat >>"\$ac_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
Antoine Pitrou37009202011-07-08 23:47:50 +020014731cat >>"\$ac_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
Antoine Pitrou37009202011-07-08 23:47:50 +020014763fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014764 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014765_ACEOF
14766
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014767# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14768# ${srcdir} and @srcdir@ entries 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
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014772 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14773h
14774s///
14775s/^/:/
14776s/[ ]*$/:/
14777s/:\$(srcdir):/:/g
14778s/:\${srcdir}:/:/g
14779s/:@srcdir@:/:/g
14780s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014781s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014782x
14783s/\(=[ ]*\).*/\1/
14784G
14785s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014786s/^[^=]*=[ ]*$//
14787}'
14788fi
14789
Matthias Kloseb9621712010-04-24 17:59:49 +000014790cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014791fi # test -n "$CONFIG_FILES"
14792
Matthias Kloseb9621712010-04-24 17:59:49 +000014793# Set up the scripts for CONFIG_HEADERS section.
14794# No need to generate them if there are no CONFIG_HEADERS.
14795# This happens for instance with `./config.status Makefile'.
14796if test -n "$CONFIG_HEADERS"; then
Antoine Pitrou37009202011-07-08 23:47:50 +020014797cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014798BEGIN {
14799_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014800
Matthias Kloseb9621712010-04-24 17:59:49 +000014801# Transform confdefs.h into an awk script `defines.awk', embedded as
14802# here-document in config.status, that substitutes the proper values into
14803# config.h.in to produce config.h.
14804
14805# Create a delimiter string that does not exist in confdefs.h, to ease
14806# handling of long lines.
14807ac_delim='%!_!# '
14808for ac_last_try in false false :; do
Antoine Pitrou37009202011-07-08 23:47:50 +020014809 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14810 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014811 break
14812 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014813 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014814 else
14815 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14816 fi
14817done
14818
14819# For the awk script, D is an array of macro values keyed by name,
14820# likewise P contains macro parameters if any. Preserve backslash
14821# newline sequences.
14822
14823ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14824sed -n '
14825s/.\{148\}/&'"$ac_delim"'/g
14826t rset
14827:rset
14828s/^[ ]*#[ ]*define[ ][ ]*/ /
14829t def
14830d
14831:def
14832s/\\$//
14833t bsnl
14834s/["\\]/\\&/g
14835s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14836D["\1"]=" \3"/p
14837s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14838d
14839:bsnl
14840s/["\\]/\\&/g
14841s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14842D["\1"]=" \3\\\\\\n"\\/p
14843t cont
14844s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14845t cont
14846d
14847:cont
14848n
14849s/.\{148\}/&'"$ac_delim"'/g
14850t clear
14851:clear
14852s/\\$//
14853t bsnlc
14854s/["\\]/\\&/g; s/^/"/; s/$/"/p
14855d
14856:bsnlc
14857s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14858b cont
14859' <confdefs.h | sed '
14860s/'"$ac_delim"'/"\\\
14861"/g' >>$CONFIG_STATUS || ac_write_fail=1
14862
14863cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14864 for (key in D) D_is_set[key] = 1
14865 FS = ""
14866}
14867/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14868 line = \$ 0
14869 split(line, arg, " ")
14870 if (arg[1] == "#") {
14871 defundef = arg[2]
14872 mac1 = arg[3]
14873 } else {
14874 defundef = substr(arg[1], 2)
14875 mac1 = arg[2]
14876 }
14877 split(mac1, mac2, "(") #)
14878 macro = mac2[1]
14879 prefix = substr(line, 1, index(line, defundef) - 1)
14880 if (D_is_set[macro]) {
14881 # Preserve the white space surrounding the "#".
14882 print prefix "define", macro P[macro] D[macro]
14883 next
14884 } else {
14885 # Replace #undef with comments. This is necessary, for example,
14886 # in the case of _POSIX_SOURCE, which is predefined and required
14887 # on some systems where configure will not decide to define it.
14888 if (defundef == "undef") {
14889 print "/*", prefix defundef, macro, "*/"
14890 next
14891 }
14892 }
14893}
14894{ print }
14895_ACAWK
14896_ACEOF
14897cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014898 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014899fi # test -n "$CONFIG_HEADERS"
14900
14901
14902eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14903shift
14904for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014905do
14906 case $ac_tag in
14907 :[FHLC]) ac_mode=$ac_tag; continue;;
14908 esac
14909 case $ac_mode$ac_tag in
14910 :[FHL]*:*);;
Antoine Pitrou37009202011-07-08 23:47:50 +020014911 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014912 :[FH]-) ac_tag=-:-;;
14913 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14914 esac
14915 ac_save_IFS=$IFS
14916 IFS=:
14917 set x $ac_tag
14918 IFS=$ac_save_IFS
14919 shift
14920 ac_file=$1
14921 shift
14922
14923 case $ac_mode in
14924 :L) ac_source=$1;;
14925 :[FH])
14926 ac_file_inputs=
14927 for ac_f
14928 do
14929 case $ac_f in
Antoine Pitrou37009202011-07-08 23:47:50 +020014930 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014931 *) # Look for the file first in the build tree, then in the source tree
14932 # (if the path is not absolute). The absolute path cannot be DOS-style,
14933 # because $ac_f cannot contain `:'.
14934 test -f "$ac_f" ||
14935 case $ac_f in
14936 [\\/$]*) false;;
14937 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14938 esac ||
Antoine Pitrou37009202011-07-08 23:47:50 +020014939 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014940 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014941 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14942 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014943 done
14944
14945 # Let's still pretend it is `configure' which instantiates (i.e., don't
14946 # use $as_me), people would be surprised to read:
14947 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014948 configure_input='Generated from '`
14949 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14950 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014951 if test x"$ac_file" != x-; then
14952 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014953 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14954$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014955 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014956 # Neutralize special characters interpreted by sed in replacement strings.
14957 case $configure_input in #(
14958 *\&* | *\|* | *\\* )
14959 ac_sed_conf_input=`$as_echo "$configure_input" |
14960 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14961 *) ac_sed_conf_input=$configure_input;;
14962 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014963
14964 case $ac_tag in
Antoine Pitrou37009202011-07-08 23:47:50 +020014965 *:-:* | *:-) cat >"$ac_tmp/stdin" \
14966 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014967 esac
14968 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014969 esac
14970
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014971 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014972$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014973 X"$ac_file" : 'X\(//\)[^/]' \| \
14974 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014975 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014976$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014977 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14978 s//\1/
14979 q
14980 }
14981 /^X\(\/\/\)[^/].*/{
14982 s//\1/
14983 q
14984 }
14985 /^X\(\/\/\)$/{
14986 s//\1/
14987 q
14988 }
14989 /^X\(\/\).*/{
14990 s//\1/
14991 q
14992 }
14993 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014994 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014995 ac_builddir=.
14996
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014997case "$ac_dir" in
14998.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14999*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015000 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015001 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015002 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015003 case $ac_top_builddir_sub in
15004 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15005 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15006 esac ;;
15007esac
15008ac_abs_top_builddir=$ac_pwd
15009ac_abs_builddir=$ac_pwd$ac_dir_suffix
15010# for backward compatibility:
15011ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015012
15013case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015014 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015015 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015016 ac_top_srcdir=$ac_top_builddir_sub
15017 ac_abs_top_srcdir=$ac_pwd ;;
15018 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015019 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015020 ac_top_srcdir=$srcdir
15021 ac_abs_top_srcdir=$srcdir ;;
15022 *) # Relative name.
15023 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15024 ac_top_srcdir=$ac_top_build_prefix$srcdir
15025 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015026esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015027ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015028
Martin v. Löwis11437992002-04-12 09:54:03 +000015029
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015030 case $ac_mode in
15031 :F)
15032 #
15033 # CONFIG_FILE
15034 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015035
15036 case $INSTALL in
15037 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015038 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015039 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015040_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015041
Matthias Kloseb9621712010-04-24 17:59:49 +000015042cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015043# If the template does not know about datarootdir, expand it.
15044# FIXME: This hack should be removed a few years after 2.60.
15045ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015046ac_sed_dataroot='
15047/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015048 p
15049 q
15050}
15051/@datadir@/p
15052/@docdir@/p
15053/@infodir@/p
15054/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015055/@mandir@/p'
15056case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015057*datarootdir*) ac_datarootdir_seen=yes;;
15058*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015059 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15060$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015062cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015063 ac_datarootdir_hack='
15064 s&@datadir@&$datadir&g
15065 s&@docdir@&$docdir&g
15066 s&@infodir@&$infodir&g
15067 s&@localedir@&$localedir&g
15068 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015069 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015070esac
15071_ACEOF
15072
15073# Neutralize VPATH when `$srcdir' = `.'.
15074# Shell code in configure.ac might set extrasub.
15075# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015076cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15077ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015078$extrasub
15079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015080cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015081:t
15082/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015083s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015084s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015085s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015086s&@srcdir@&$ac_srcdir&;t t
15087s&@abs_srcdir@&$ac_abs_srcdir&;t t
15088s&@top_srcdir@&$ac_top_srcdir&;t t
15089s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15090s&@builddir@&$ac_builddir&;t t
15091s&@abs_builddir@&$ac_abs_builddir&;t t
15092s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15093s&@INSTALL@&$ac_INSTALL&;t t
15094$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015095"
Antoine Pitrou37009202011-07-08 23:47:50 +020015096eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15097 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015098
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015099test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Antoine Pitrou37009202011-07-08 23:47:50 +020015100 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15101 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15102 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015103 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015104which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015105$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015106which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015107
Antoine Pitrou37009202011-07-08 23:47:50 +020015108 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015109 case $ac_file in
Antoine Pitrou37009202011-07-08 23:47:50 +020015110 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15111 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015112 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015113 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015114 ;;
15115 :H)
15116 #
15117 # CONFIG_HEADER
15118 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015119 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015120 {
15121 $as_echo "/* $configure_input */" \
Antoine Pitrou37009202011-07-08 23:47:50 +020015122 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15123 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015124 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Antoine Pitrou37009202011-07-08 23:47:50 +020015125 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015126 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15127$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015128 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015129 rm -f "$ac_file"
Antoine Pitrou37009202011-07-08 23:47:50 +020015130 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015131 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015132 fi
15133 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015134 $as_echo "/* $configure_input */" \
Antoine Pitrou37009202011-07-08 23:47:50 +020015135 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015136 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015137 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015138 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015139
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015140
15141 esac
15142
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015143
15144 case $ac_file$ac_mode in
15145 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15146
15147 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015148done # for ac_tag
15149
Guido van Rossum627b2d71993-12-24 10:39:16 +000015150
Matthias Kloseb9621712010-04-24 17:59:49 +000015151as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015152_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015153ac_clean_files=$ac_clean_files_save
15154
Matthias Kloseb9621712010-04-24 17:59:49 +000015155test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015156 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015157
Martin v. Löwis11437992002-04-12 09:54:03 +000015158
15159# configure is writing to config.log, and then calls config.status.
15160# config.status does its own redirection, appending to config.log.
15161# Unfortunately, on DOS this fails, as config.log is still kept open
15162# by configure, so config.status won't be able to write to it; its
15163# output is simply discarded. So we exec the FD to /dev/null,
15164# effectively closing config.log, so it can be properly (re)opened and
15165# appended to by config.status. When coming back to configure, we
15166# need to make the FD available again.
15167if test "$no_create" != yes; then
15168 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015169 ac_config_status_args=
15170 test "$silent" = yes &&
15171 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015172 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015173 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015174 exec 5>>config.log
15175 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15176 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015177 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015178fi
15179if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15180 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15181$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015182fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015183
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015184
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015185echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015186if test ! -f Modules/Setup
15187then
15188 cp $srcdir/Modules/Setup.dist Modules/Setup
15189fi
15190
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015191echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015192if test ! -f Modules/Setup.local
15193then
15194 echo "# Edit this file for local setup changes" >Modules/Setup.local
15195fi
15196
15197echo "creating Makefile"
15198$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15199 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015200 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015201mv config.c Modules