blob: 5ddb70463bc5d79fd58463385535a2fcc28cb800 [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.
Victor Stinnere0be4232011-10-25 13:06:09 +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.
Victor Stinnere0be4232011-10-25 13:06:09 +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.
Victor Stinnere0be4232011-10-25 13:06:09 +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
Victor Stinnere0be4232011-10-25 13:06:09 +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
Matthias Kloseb9621712010-04-24 17:59:49 +0000770with_computed_gotos
771'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000772 ac_precious_vars='build_alias
773host_alias
774target_alias
775CC
776CFLAGS
777LDFLAGS
778LIBS
779CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200780CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000781
Guido van Rossum627b2d71993-12-24 10:39:16 +0000782
Guido van Rossum7f43da71994-08-01 12:15:30 +0000783# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000784ac_init_help=
785ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000786ac_unrecognized_opts=
787ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000788# The variables have the same names as the options, with
789# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000790cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000791exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000792no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000793no_recursion=
794prefix=NONE
795program_prefix=NONE
796program_suffix=NONE
797program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000799site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000802x_includes=NONE
803x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000804
805# Installation directory options.
806# These are left unexpanded so users can "make install exec_prefix=/foo"
807# and all the variables that are supposed to be based on exec_prefix
808# by default will actually change.
809# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000810# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000811bindir='${exec_prefix}/bin'
812sbindir='${exec_prefix}/sbin'
813libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000814datarootdir='${prefix}/share'
815datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000816sysconfdir='${prefix}/etc'
817sharedstatedir='${prefix}/com'
818localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000819includedir='${prefix}/include'
820oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000821docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
822infodir='${datarootdir}/info'
823htmldir='${docdir}'
824dvidir='${docdir}'
825pdfdir='${docdir}'
826psdir='${docdir}'
827libdir='${exec_prefix}/lib'
828localedir='${datarootdir}/locale'
829mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830
Guido van Rossum7f43da71994-08-01 12:15:30 +0000831ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000832ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000833for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000834do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000835 # If the previous option needs an argument, assign it.
836 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000837 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000838 ac_prev=
839 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000840 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000841
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200843 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
844 *=) ac_optarg= ;;
845 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000848 # Accept the important Cygnus configure options, so we can diagnose typos.
849
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850 case $ac_dashdash$ac_option in
851 --)
852 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000854 -bindir | --bindir | --bindi | --bind | --bin | --bi)
855 ac_prev=bindir ;;
856 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000857 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000858
859 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000860 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000861 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000862 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000864 -cache-file | --cache-file | --cache-fil | --cache-fi \
865 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
866 ac_prev=cache_file ;;
867 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
868 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000869 cache_file=$ac_optarg ;;
870
871 --config-cache | -C)
872 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000874 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000875 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000876 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000877 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000878
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000879 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
880 | --dataroo | --dataro | --datar)
881 ac_prev=datarootdir ;;
882 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
883 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
884 datarootdir=$ac_optarg ;;
885
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000887 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000888 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000889 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200890 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000891 ac_useropt_orig=$ac_useropt
892 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
893 case $ac_user_opts in
894 *"
895"enable_$ac_useropt"
896"*) ;;
897 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
898 ac_unrecognized_sep=', ';;
899 esac
900 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000901
902 -docdir | --docdir | --docdi | --doc | --do)
903 ac_prev=docdir ;;
904 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
905 docdir=$ac_optarg ;;
906
907 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
908 ac_prev=dvidir ;;
909 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
910 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911
912 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000913 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000914 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000915 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200916 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000917 ac_useropt_orig=$ac_useropt
918 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
919 case $ac_user_opts in
920 *"
921"enable_$ac_useropt"
922"*) ;;
923 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
924 ac_unrecognized_sep=', ';;
925 esac
926 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
929 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
930 | --exec | --exe | --ex)
931 ac_prev=exec_prefix ;;
932 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
933 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
934 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000936
937 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000938 # Obsolete; use --with-gas.
939 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000940
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 -help | --help | --hel | --he | -h)
942 ac_init_help=long ;;
943 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
944 ac_init_help=recursive ;;
945 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
946 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000947
948 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000949 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000953 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
954 ac_prev=htmldir ;;
955 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
956 | --ht=*)
957 htmldir=$ac_optarg ;;
958
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000959 -includedir | --includedir | --includedi | --included | --include \
960 | --includ | --inclu | --incl | --inc)
961 ac_prev=includedir ;;
962 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
963 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000964 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000965
966 -infodir | --infodir | --infodi | --infod | --info | --inf)
967 ac_prev=infodir ;;
968 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000969 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000970
971 -libdir | --libdir | --libdi | --libd)
972 ac_prev=libdir ;;
973 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000975
976 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
977 | --libexe | --libex | --libe)
978 ac_prev=libexecdir ;;
979 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
980 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000982
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000983 -localedir | --localedir | --localedi | --localed | --locale)
984 ac_prev=localedir ;;
985 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
986 localedir=$ac_optarg ;;
987
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000988 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000989 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000990 ac_prev=localstatedir ;;
991 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000992 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000993 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000994
995 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
996 ac_prev=mandir ;;
997 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000998 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000999
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001001 # Obsolete; use --without-fp.
1002 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003
1004 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006 no_create=yes ;;
1007
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001008 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1009 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1010 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001012 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1013 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1014 | --oldin | --oldi | --old | --ol | --o)
1015 ac_prev=oldincludedir ;;
1016 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1017 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1018 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001020
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1022 ac_prev=prefix ;;
1023 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025
1026 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1027 | --program-pre | --program-pr | --program-p)
1028 ac_prev=program_prefix ;;
1029 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1030 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001032
1033 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1034 | --program-suf | --program-su | --program-s)
1035 ac_prev=program_suffix ;;
1036 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1037 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001039
1040 -program-transform-name | --program-transform-name \
1041 | --program-transform-nam | --program-transform-na \
1042 | --program-transform-n | --program-transform- \
1043 | --program-transform | --program-transfor \
1044 | --program-transfo | --program-transf \
1045 | --program-trans | --program-tran \
1046 | --progr-tra | --program-tr | --program-t)
1047 ac_prev=program_transform_name ;;
1048 -program-transform-name=* | --program-transform-name=* \
1049 | --program-transform-nam=* | --program-transform-na=* \
1050 | --program-transform-n=* | --program-transform-=* \
1051 | --program-transform=* | --program-transfor=* \
1052 | --program-transfo=* | --program-transf=* \
1053 | --program-trans=* | --program-tran=* \
1054 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001057 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1058 ac_prev=pdfdir ;;
1059 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1060 pdfdir=$ac_optarg ;;
1061
1062 -psdir | --psdir | --psdi | --psd | --ps)
1063 ac_prev=psdir ;;
1064 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1065 psdir=$ac_optarg ;;
1066
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1068 | -silent | --silent | --silen | --sile | --sil)
1069 silent=yes ;;
1070
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1072 ac_prev=sbindir ;;
1073 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1074 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001076
1077 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1078 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1079 | --sharedst | --shareds | --shared | --share | --shar \
1080 | --sha | --sh)
1081 ac_prev=sharedstatedir ;;
1082 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1083 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1084 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1085 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001087
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001088 -site | --site | --sit)
1089 ac_prev=site ;;
1090 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001092
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1094 ac_prev=srcdir ;;
1095 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001098 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1099 | --syscon | --sysco | --sysc | --sys | --sy)
1100 ac_prev=sysconfdir ;;
1101 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1102 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001104
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001109
1110 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1111 verbose=yes ;;
1112
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 -version | --version | --versio | --versi | --vers | -V)
1114 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001115
1116 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001117 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001118 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001119 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001120 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001121 ac_useropt_orig=$ac_useropt
1122 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1123 case $ac_user_opts in
1124 *"
1125"with_$ac_useropt"
1126"*) ;;
1127 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1128 ac_unrecognized_sep=', ';;
1129 esac
1130 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131
1132 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001133 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001134 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001135 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001136 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001137 ac_useropt_orig=$ac_useropt
1138 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1139 case $ac_user_opts in
1140 *"
1141"with_$ac_useropt"
1142"*) ;;
1143 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1144 ac_unrecognized_sep=', ';;
1145 esac
1146 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001148 --x)
1149 # Obsolete; use --with-x.
1150 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001151
1152 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1153 | --x-incl | --x-inc | --x-in | --x-i)
1154 ac_prev=x_includes ;;
1155 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1156 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001157 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001158
1159 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1160 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1161 ac_prev=x_libraries ;;
1162 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1163 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001165
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001166 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1167Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001168 ;;
1169
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 *=*)
1171 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1172 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001173 case $ac_envvar in #(
1174 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001175 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001176 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001177 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001178 export $ac_envvar ;;
1179
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001180 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001182 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001184 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001185 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 ;;
1187
1188 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001189done
1190
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001193 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194fi
1195
Matthias Kloseb9621712010-04-24 17:59:49 +00001196if test -n "$ac_unrecognized_opts"; then
1197 case $enable_option_checking in
1198 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001199 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001200 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1201 esac
1202fi
1203
1204# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001205for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1206 datadir sysconfdir sharedstatedir localstatedir includedir \
1207 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1208 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001209do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001210 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001211 # Remove trailing slashes.
1212 case $ac_val in
1213 */ )
1214 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1215 eval $ac_var=\$ac_val;;
1216 esac
1217 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001218 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001219 [\\/$]* | ?:[\\/]* ) continue;;
1220 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001221 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001222 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001223done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001224
Martin v. Löwis11437992002-04-12 09:54:03 +00001225# There might be people who depend on the old broken behavior: `$host'
1226# used to hold the argument of --host etc.
1227# FIXME: To remove some day.
1228build=$build_alias
1229host=$host_alias
1230target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001231
Martin v. Löwis11437992002-04-12 09:54:03 +00001232# FIXME: To remove some day.
1233if test "x$host_alias" != x; then
1234 if test "x$build_alias" = x; then
1235 cross_compiling=maybe
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001236 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1237 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001238 elif test "x$build_alias" != "x$host_alias"; then
1239 cross_compiling=yes
1240 fi
1241fi
1242
1243ac_tool_prefix=
1244test -n "$host_alias" && ac_tool_prefix=$host_alias-
1245
1246test "$silent" = yes && exec 6>/dev/null
1247
Guido van Rossum627b2d71993-12-24 10:39:16 +00001248
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001249ac_pwd=`pwd` && test -n "$ac_pwd" &&
1250ac_ls_di=`ls -di .` &&
1251ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001252 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001253test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001254 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001255
1256
Guido van Rossum627b2d71993-12-24 10:39:16 +00001257# Find the source files, if location was not specified.
1258if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001259 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001260 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001261 ac_confdir=`$as_dirname -- "$as_myself" ||
1262$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1263 X"$as_myself" : 'X\(//\)[^/]' \| \
1264 X"$as_myself" : 'X\(//\)$' \| \
1265 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1266$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001267 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1268 s//\1/
1269 q
1270 }
1271 /^X\(\/\/\)[^/].*/{
1272 s//\1/
1273 q
1274 }
1275 /^X\(\/\/\)$/{
1276 s//\1/
1277 q
1278 }
1279 /^X\(\/\).*/{
1280 s//\1/
1281 q
1282 }
1283 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001284 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001285 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001286 srcdir=..
1287 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001288else
1289 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001291if test ! -r "$srcdir/$ac_unique_file"; then
1292 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001293 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1296ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001297 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001298 pwd)`
1299# When building in place, set srcdir=.
1300if test "$ac_abs_confdir" = "$ac_pwd"; then
1301 srcdir=.
1302fi
1303# Remove unnecessary trailing slashes from srcdir.
1304# Double slashes in file names in object file debugging info
1305# mess up M-x gdb in Emacs.
1306case $srcdir in
1307*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1308esac
1309for ac_var in $ac_precious_vars; do
1310 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1311 eval ac_env_${ac_var}_value=\$${ac_var}
1312 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1313 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1314done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001315
Martin v. Löwis11437992002-04-12 09:54:03 +00001316#
1317# Report the --help message.
1318#
1319if test "$ac_init_help" = "long"; then
1320 # Omit some internal or obsolete options to make the list less imposing.
1321 # This message is too long to be a string in the A/UX 3.1 sh.
1322 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001323\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001324
1325Usage: $0 [OPTION]... [VAR=VALUE]...
1326
1327To assign environment variables (e.g., CC, CFLAGS...), specify them as
1328VAR=VALUE. See below for descriptions of some of the useful variables.
1329
1330Defaults for the options are specified in brackets.
1331
1332Configuration:
1333 -h, --help display this help and exit
1334 --help=short display options specific to this package
1335 --help=recursive display the short help of all the included packages
1336 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001337 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001338 --cache-file=FILE cache test results in FILE [disabled]
1339 -C, --config-cache alias for \`--cache-file=config.cache'
1340 -n, --no-create do not create output files
1341 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1342
Martin v. Löwis11437992002-04-12 09:54:03 +00001343Installation directories:
1344 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001345 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001346 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001347 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001348
1349By default, \`make install' will install all the files in
1350\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1351an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1352for instance \`--prefix=\$HOME'.
1353
1354For better control, use the options below.
1355
1356Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001357 --bindir=DIR user executables [EPREFIX/bin]
1358 --sbindir=DIR system admin executables [EPREFIX/sbin]
1359 --libexecdir=DIR program executables [EPREFIX/libexec]
1360 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1361 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1362 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1363 --libdir=DIR object code libraries [EPREFIX/lib]
1364 --includedir=DIR C header files [PREFIX/include]
1365 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1366 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1367 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1368 --infodir=DIR info documentation [DATAROOTDIR/info]
1369 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1370 --mandir=DIR man documentation [DATAROOTDIR/man]
1371 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1372 --htmldir=DIR html documentation [DOCDIR]
1373 --dvidir=DIR dvi documentation [DOCDIR]
1374 --pdfdir=DIR pdf documentation [DOCDIR]
1375 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001376_ACEOF
1377
1378 cat <<\_ACEOF
1379_ACEOF
1380fi
1381
1382if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001383 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001384 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001385 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001386 cat <<\_ACEOF
1387
1388Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001389 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001390 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1391 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001392 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001393 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001394 --enable-framework[=INSTALLDIR]
1395 Build (MacOSX|Darwin) framework
1396 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001397 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001398 --enable-loadable-sqlite-extensions
1399 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001400 --enable-ipv6 Enable ipv6 (with ipv4) support
1401 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001402 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001403 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001404
1405Optional Packages:
1406 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1407 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001408 --with-universal-archs=ARCH
1409 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001410 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001411 --with-framework-name=FRAMEWORK
1412 specify an alternate name of the framework built
1413 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001414 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001415 --with-cxx-main=<compiler>
1416 compile main() and link python executable with C++
1417 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001418 --with-suffix=.exe set executable suffix
1419 --with-pydebug build with Py_DEBUG defined
1420 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001421 --with-system-expat build pyexpat module using an installed expat
1422 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001423 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001424 --with-dbmliborder=db1:db2:...
1425 order to check db backends for dbm. Valid value is a
1426 colon separated string with the backend names
1427 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001428 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001429 --with(out)-threads[=DIRECTORY]
1430 disable/enable thread support
1431 --with(out)-thread[=DIRECTORY]
1432 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001433 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001434 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001435 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001436 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001437 --with-fpectl enable SIGFPE catching
1438 --with-libm=STRING math library
1439 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001440 --with(out)-computed-gotos
1441 Use computed gotos in evaluation loop (enabled by
1442 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001443
1444Some influential environment variables:
1445 CC C compiler command
1446 CFLAGS C compiler flags
1447 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1448 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001449 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001450 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001451 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001452 CPP C preprocessor
1453
1454Use these variables to override the choices made by `configure' or to help
1455it to find libraries and programs with nonstandard names/locations.
1456
Georg Brandle2e15612009-05-20 18:25:10 +00001457Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001458_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001459ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001460fi
1461
1462if test "$ac_init_help" = "recursive"; then
1463 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001464 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001465 test -d "$ac_dir" ||
1466 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1467 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001468 ac_builddir=.
1469
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001470case "$ac_dir" in
1471.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1472*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001473 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001474 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001475 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001476 case $ac_top_builddir_sub in
1477 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1478 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1479 esac ;;
1480esac
1481ac_abs_top_builddir=$ac_pwd
1482ac_abs_builddir=$ac_pwd$ac_dir_suffix
1483# for backward compatibility:
1484ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001485
1486case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001487 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001488 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001489 ac_top_srcdir=$ac_top_builddir_sub
1490 ac_abs_top_srcdir=$ac_pwd ;;
1491 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001492 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001493 ac_top_srcdir=$srcdir
1494 ac_abs_top_srcdir=$srcdir ;;
1495 *) # Relative name.
1496 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1497 ac_top_srcdir=$ac_top_build_prefix$srcdir
1498 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001499esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001500ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001501
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001502 cd "$ac_dir" || { ac_status=$?; continue; }
1503 # Check for guested configure.
1504 if test -f "$ac_srcdir/configure.gnu"; then
1505 echo &&
1506 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1507 elif test -f "$ac_srcdir/configure"; then
1508 echo &&
1509 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001510 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001511 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001512 fi || ac_status=$?
1513 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001514 done
1515fi
1516
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001517test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001518if $ac_init_version; then
1519 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001520python configure 3.3
Victor Stinnere0be4232011-10-25 13:06:09 +02001521generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001522
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001523Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001524This configure script is free software; the Free Software Foundation
1525gives unlimited permission to copy, distribute and modify it.
1526_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001527 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001528fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001529
1530## ------------------------ ##
1531## Autoconf initialization. ##
1532## ------------------------ ##
1533
1534# ac_fn_c_try_compile LINENO
1535# --------------------------
1536# Try to compile conftest.$ac_ext, and return whether this succeeded.
1537ac_fn_c_try_compile ()
1538{
1539 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1540 rm -f conftest.$ac_objext
1541 if { { ac_try="$ac_compile"
1542case "(($ac_try" in
1543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1544 *) ac_try_echo=$ac_try;;
1545esac
1546eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1547$as_echo "$ac_try_echo"; } >&5
1548 (eval "$ac_compile") 2>conftest.err
1549 ac_status=$?
1550 if test -s conftest.err; then
1551 grep -v '^ *+' conftest.err >conftest.er1
1552 cat conftest.er1 >&5
1553 mv -f conftest.er1 conftest.err
1554 fi
1555 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1556 test $ac_status = 0; } && {
1557 test -z "$ac_c_werror_flag" ||
1558 test ! -s conftest.err
1559 } && test -s conftest.$ac_objext; then :
1560 ac_retval=0
1561else
1562 $as_echo "$as_me: failed program was:" >&5
1563sed 's/^/| /' conftest.$ac_ext >&5
1564
1565 ac_retval=1
1566fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001567 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001568 as_fn_set_status $ac_retval
1569
1570} # ac_fn_c_try_compile
1571
Matthias Kloseb9621712010-04-24 17:59:49 +00001572# ac_fn_c_try_link LINENO
1573# -----------------------
1574# Try to link conftest.$ac_ext, and return whether this succeeded.
1575ac_fn_c_try_link ()
1576{
1577 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1578 rm -f conftest.$ac_objext conftest$ac_exeext
1579 if { { ac_try="$ac_link"
1580case "(($ac_try" in
1581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1582 *) ac_try_echo=$ac_try;;
1583esac
1584eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1585$as_echo "$ac_try_echo"; } >&5
1586 (eval "$ac_link") 2>conftest.err
1587 ac_status=$?
1588 if test -s conftest.err; then
1589 grep -v '^ *+' conftest.err >conftest.er1
1590 cat conftest.er1 >&5
1591 mv -f conftest.er1 conftest.err
1592 fi
1593 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1594 test $ac_status = 0; } && {
1595 test -z "$ac_c_werror_flag" ||
1596 test ! -s conftest.err
1597 } && test -s conftest$ac_exeext && {
1598 test "$cross_compiling" = yes ||
1599 $as_test_x conftest$ac_exeext
1600 }; then :
1601 ac_retval=0
1602else
1603 $as_echo "$as_me: failed program was:" >&5
1604sed 's/^/| /' conftest.$ac_ext >&5
1605
1606 ac_retval=1
1607fi
1608 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1609 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1610 # interfere with the next link command; also delete a directory that is
1611 # left behind by Apple's compiler. We do this before executing the actions.
1612 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001613 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001614 as_fn_set_status $ac_retval
1615
1616} # ac_fn_c_try_link
1617
Matthias Kloseb9621712010-04-24 17:59:49 +00001618# ac_fn_c_try_cpp LINENO
1619# ----------------------
1620# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1621ac_fn_c_try_cpp ()
1622{
1623 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1624 if { { ac_try="$ac_cpp conftest.$ac_ext"
1625case "(($ac_try" in
1626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1627 *) ac_try_echo=$ac_try;;
1628esac
1629eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1630$as_echo "$ac_try_echo"; } >&5
1631 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1632 ac_status=$?
1633 if test -s conftest.err; then
1634 grep -v '^ *+' conftest.err >conftest.er1
1635 cat conftest.er1 >&5
1636 mv -f conftest.er1 conftest.err
1637 fi
1638 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001639 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001640 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1641 test ! -s conftest.err
1642 }; then :
1643 ac_retval=0
1644else
1645 $as_echo "$as_me: failed program was:" >&5
1646sed 's/^/| /' conftest.$ac_ext >&5
1647
1648 ac_retval=1
1649fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001650 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001651 as_fn_set_status $ac_retval
1652
1653} # ac_fn_c_try_cpp
1654
1655# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1656# -------------------------------------------------------
1657# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1658# the include files in INCLUDES and setting the cache variable VAR
1659# accordingly.
1660ac_fn_c_check_header_mongrel ()
1661{
1662 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001663 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1665$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001666if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001667 $as_echo_n "(cached) " >&6
1668fi
1669eval ac_res=\$$3
1670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1671$as_echo "$ac_res" >&6; }
1672else
1673 # Is the header compilable?
1674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1675$as_echo_n "checking $2 usability... " >&6; }
1676cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1677/* end confdefs.h. */
1678$4
1679#include <$2>
1680_ACEOF
1681if ac_fn_c_try_compile "$LINENO"; then :
1682 ac_header_compiler=yes
1683else
1684 ac_header_compiler=no
1685fi
1686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1688$as_echo "$ac_header_compiler" >&6; }
1689
1690# Is the header present?
1691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1692$as_echo_n "checking $2 presence... " >&6; }
1693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1694/* end confdefs.h. */
1695#include <$2>
1696_ACEOF
1697if ac_fn_c_try_cpp "$LINENO"; then :
1698 ac_header_preproc=yes
1699else
1700 ac_header_preproc=no
1701fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001702rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1704$as_echo "$ac_header_preproc" >&6; }
1705
1706# So? What about this header?
1707case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1708 yes:no: )
1709 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1710$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1711 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1712$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1713 ;;
1714 no:yes:* )
1715 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1716$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1717 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1718$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1719 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1720$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1721 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1722$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1723 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1724$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001725( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001726## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001727## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001728 ) | sed "s/^/$as_me: WARNING: /" >&2
1729 ;;
1730esac
1731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1732$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001733if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001734 $as_echo_n "(cached) " >&6
1735else
1736 eval "$3=\$ac_header_compiler"
1737fi
1738eval ac_res=\$$3
1739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1740$as_echo "$ac_res" >&6; }
1741fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001742 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001743
1744} # ac_fn_c_check_header_mongrel
1745
1746# ac_fn_c_try_run LINENO
1747# ----------------------
1748# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1749# that executables *can* be run.
1750ac_fn_c_try_run ()
1751{
1752 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1753 if { { ac_try="$ac_link"
1754case "(($ac_try" in
1755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1756 *) ac_try_echo=$ac_try;;
1757esac
1758eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1759$as_echo "$ac_try_echo"; } >&5
1760 (eval "$ac_link") 2>&5
1761 ac_status=$?
1762 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1763 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1764 { { case "(($ac_try" in
1765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1766 *) ac_try_echo=$ac_try;;
1767esac
1768eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1769$as_echo "$ac_try_echo"; } >&5
1770 (eval "$ac_try") 2>&5
1771 ac_status=$?
1772 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1773 test $ac_status = 0; }; }; then :
1774 ac_retval=0
1775else
1776 $as_echo "$as_me: program exited with status $ac_status" >&5
1777 $as_echo "$as_me: failed program was:" >&5
1778sed 's/^/| /' conftest.$ac_ext >&5
1779
1780 ac_retval=$ac_status
1781fi
1782 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001783 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001784 as_fn_set_status $ac_retval
1785
1786} # ac_fn_c_try_run
1787
1788# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1789# -------------------------------------------------------
1790# Tests whether HEADER exists and can be compiled using the include files in
1791# INCLUDES, setting the cache variable VAR accordingly.
1792ac_fn_c_check_header_compile ()
1793{
1794 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1796$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001797if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001798 $as_echo_n "(cached) " >&6
1799else
1800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1801/* end confdefs.h. */
1802$4
1803#include <$2>
1804_ACEOF
1805if ac_fn_c_try_compile "$LINENO"; then :
1806 eval "$3=yes"
1807else
1808 eval "$3=no"
1809fi
1810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1811fi
1812eval ac_res=\$$3
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1814$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001815 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001816
1817} # ac_fn_c_check_header_compile
1818
Matthias Kloseb9621712010-04-24 17:59:49 +00001819# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1820# -------------------------------------------
1821# Tests whether TYPE exists after having included INCLUDES, setting cache
1822# variable VAR accordingly.
1823ac_fn_c_check_type ()
1824{
1825 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1827$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001828if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001829 $as_echo_n "(cached) " >&6
1830else
1831 eval "$3=no"
1832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1833/* end confdefs.h. */
1834$4
1835int
1836main ()
1837{
1838if (sizeof ($2))
1839 return 0;
1840 ;
1841 return 0;
1842}
1843_ACEOF
1844if ac_fn_c_try_compile "$LINENO"; then :
1845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1846/* end confdefs.h. */
1847$4
1848int
1849main ()
1850{
1851if (sizeof (($2)))
1852 return 0;
1853 ;
1854 return 0;
1855}
1856_ACEOF
1857if ac_fn_c_try_compile "$LINENO"; then :
1858
1859else
1860 eval "$3=yes"
1861fi
1862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1863fi
1864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1865fi
1866eval ac_res=\$$3
1867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1868$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001869 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001870
1871} # ac_fn_c_check_type
1872
1873# ac_fn_c_find_uintX_t LINENO BITS VAR
1874# ------------------------------------
1875# Finds an unsigned integer type with width BITS, setting cache variable VAR
1876# accordingly.
1877ac_fn_c_find_uintX_t ()
1878{
1879 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1881$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001882if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001883 $as_echo_n "(cached) " >&6
1884else
1885 eval "$3=no"
1886 # Order is important - never check a type that is potentially smaller
1887 # than half of the expected target width.
1888 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1889 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1891/* end confdefs.h. */
1892$ac_includes_default
1893int
1894main ()
1895{
1896static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1897test_array [0] = 0
1898
1899 ;
1900 return 0;
1901}
1902_ACEOF
1903if ac_fn_c_try_compile "$LINENO"; then :
1904 case $ac_type in #(
1905 uint$2_t) :
1906 eval "$3=yes" ;; #(
1907 *) :
1908 eval "$3=\$ac_type" ;;
1909esac
1910fi
1911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001912 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001913
1914else
1915 break
1916fi
1917 done
1918fi
1919eval ac_res=\$$3
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1921$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001922 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001923
1924} # ac_fn_c_find_uintX_t
1925
1926# ac_fn_c_find_intX_t LINENO BITS VAR
1927# -----------------------------------
1928# Finds a signed integer type with width BITS, setting cache variable VAR
1929# accordingly.
1930ac_fn_c_find_intX_t ()
1931{
1932 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1934$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001935if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001936 $as_echo_n "(cached) " >&6
1937else
1938 eval "$3=no"
1939 # Order is important - never check a type that is potentially smaller
1940 # than half of the expected target width.
1941 for ac_type in int$2_t 'int' 'long int' \
1942 'long long int' 'short int' 'signed char'; do
1943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1944/* end confdefs.h. */
1945$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001946 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001947int
1948main ()
1949{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001950static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001951test_array [0] = 0
1952
1953 ;
1954 return 0;
1955}
1956_ACEOF
1957if ac_fn_c_try_compile "$LINENO"; then :
1958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1959/* end confdefs.h. */
1960$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001961 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001962int
1963main ()
1964{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001965static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001966 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1967test_array [0] = 0
1968
1969 ;
1970 return 0;
1971}
1972_ACEOF
1973if ac_fn_c_try_compile "$LINENO"; then :
1974
1975else
1976 case $ac_type in #(
1977 int$2_t) :
1978 eval "$3=yes" ;; #(
1979 *) :
1980 eval "$3=\$ac_type" ;;
1981esac
1982fi
1983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1984fi
1985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001986 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001987
1988else
1989 break
1990fi
1991 done
1992fi
1993eval ac_res=\$$3
1994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1995$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001996 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001997
1998} # ac_fn_c_find_intX_t
1999
2000# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2001# --------------------------------------------
2002# Tries to find the compile-time value of EXPR in a program that includes
2003# INCLUDES, setting VAR accordingly. Returns whether the value could be
2004# computed
2005ac_fn_c_compute_int ()
2006{
2007 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2008 if test "$cross_compiling" = yes; then
2009 # Depending upon the size, compute the lo and hi bounds.
2010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2011/* end confdefs.h. */
2012$4
2013int
2014main ()
2015{
2016static int test_array [1 - 2 * !(($2) >= 0)];
2017test_array [0] = 0
2018
2019 ;
2020 return 0;
2021}
2022_ACEOF
2023if ac_fn_c_try_compile "$LINENO"; then :
2024 ac_lo=0 ac_mid=0
2025 while :; do
2026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2027/* end confdefs.h. */
2028$4
2029int
2030main ()
2031{
2032static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2033test_array [0] = 0
2034
2035 ;
2036 return 0;
2037}
2038_ACEOF
2039if ac_fn_c_try_compile "$LINENO"; then :
2040 ac_hi=$ac_mid; break
2041else
2042 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2043 if test $ac_lo -le $ac_mid; then
2044 ac_lo= ac_hi=
2045 break
2046 fi
2047 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2048fi
2049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2050 done
2051else
2052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2053/* end confdefs.h. */
2054$4
2055int
2056main ()
2057{
2058static int test_array [1 - 2 * !(($2) < 0)];
2059test_array [0] = 0
2060
2061 ;
2062 return 0;
2063}
2064_ACEOF
2065if ac_fn_c_try_compile "$LINENO"; then :
2066 ac_hi=-1 ac_mid=-1
2067 while :; do
2068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2069/* end confdefs.h. */
2070$4
2071int
2072main ()
2073{
2074static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2075test_array [0] = 0
2076
2077 ;
2078 return 0;
2079}
2080_ACEOF
2081if ac_fn_c_try_compile "$LINENO"; then :
2082 ac_lo=$ac_mid; break
2083else
2084 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2085 if test $ac_mid -le $ac_hi; then
2086 ac_lo= ac_hi=
2087 break
2088 fi
2089 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2090fi
2091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2092 done
2093else
2094 ac_lo= ac_hi=
2095fi
2096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2097fi
2098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2099# Binary search between lo and hi bounds.
2100while test "x$ac_lo" != "x$ac_hi"; do
2101 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2103/* end confdefs.h. */
2104$4
2105int
2106main ()
2107{
2108static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2109test_array [0] = 0
2110
2111 ;
2112 return 0;
2113}
2114_ACEOF
2115if ac_fn_c_try_compile "$LINENO"; then :
2116 ac_hi=$ac_mid
2117else
2118 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2119fi
2120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2121done
2122case $ac_lo in #((
2123?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2124'') ac_retval=1 ;;
2125esac
2126 else
2127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2128/* end confdefs.h. */
2129$4
2130static long int longval () { return $2; }
2131static unsigned long int ulongval () { return $2; }
2132#include <stdio.h>
2133#include <stdlib.h>
2134int
2135main ()
2136{
2137
2138 FILE *f = fopen ("conftest.val", "w");
2139 if (! f)
2140 return 1;
2141 if (($2) < 0)
2142 {
2143 long int i = longval ();
2144 if (i != ($2))
2145 return 1;
2146 fprintf (f, "%ld", i);
2147 }
2148 else
2149 {
2150 unsigned long int i = ulongval ();
2151 if (i != ($2))
2152 return 1;
2153 fprintf (f, "%lu", i);
2154 }
2155 /* Do not output a trailing newline, as this causes \r\n confusion
2156 on some platforms. */
2157 return ferror (f) || fclose (f) != 0;
2158
2159 ;
2160 return 0;
2161}
2162_ACEOF
2163if ac_fn_c_try_run "$LINENO"; then :
2164 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2165else
2166 ac_retval=1
2167fi
2168rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2169 conftest.$ac_objext conftest.beam conftest.$ac_ext
2170rm -f conftest.val
2171
2172 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002173 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002174 as_fn_set_status $ac_retval
2175
2176} # ac_fn_c_compute_int
2177
2178# ac_fn_c_check_func LINENO FUNC VAR
2179# ----------------------------------
2180# Tests whether FUNC exists, setting the cache variable VAR accordingly
2181ac_fn_c_check_func ()
2182{
2183 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2185$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002186if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002187 $as_echo_n "(cached) " >&6
2188else
2189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2190/* end confdefs.h. */
2191/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2192 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2193#define $2 innocuous_$2
2194
2195/* System header to define __stub macros and hopefully few prototypes,
2196 which can conflict with char $2 (); below.
2197 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2198 <limits.h> exists even on freestanding compilers. */
2199
2200#ifdef __STDC__
2201# include <limits.h>
2202#else
2203# include <assert.h>
2204#endif
2205
2206#undef $2
2207
2208/* Override any GCC internal prototype to avoid an error.
2209 Use char because int might match the return type of a GCC
2210 builtin and then its argument prototype would still apply. */
2211#ifdef __cplusplus
2212extern "C"
2213#endif
2214char $2 ();
2215/* The GNU C library defines this for functions which it implements
2216 to always fail with ENOSYS. Some functions are actually named
2217 something starting with __ and the normal name is an alias. */
2218#if defined __stub_$2 || defined __stub___$2
2219choke me
2220#endif
2221
2222int
2223main ()
2224{
2225return $2 ();
2226 ;
2227 return 0;
2228}
2229_ACEOF
2230if ac_fn_c_try_link "$LINENO"; then :
2231 eval "$3=yes"
2232else
2233 eval "$3=no"
2234fi
2235rm -f core conftest.err conftest.$ac_objext \
2236 conftest$ac_exeext conftest.$ac_ext
2237fi
2238eval ac_res=\$$3
2239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2240$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002241 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002242
2243} # ac_fn_c_check_func
2244
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002245# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2246# ---------------------------------------------
2247# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2248# accordingly.
2249ac_fn_c_check_decl ()
2250{
2251 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2252 as_decl_name=`echo $2|sed 's/ *(.*//'`
2253 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2255$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2256if eval \${$3+:} false; then :
2257 $as_echo_n "(cached) " >&6
2258else
2259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2260/* end confdefs.h. */
2261$4
2262int
2263main ()
2264{
2265#ifndef $as_decl_name
2266#ifdef __cplusplus
2267 (void) $as_decl_use;
2268#else
2269 (void) $as_decl_name;
2270#endif
2271#endif
2272
2273 ;
2274 return 0;
2275}
2276_ACEOF
2277if ac_fn_c_try_compile "$LINENO"; then :
2278 eval "$3=yes"
2279else
2280 eval "$3=no"
2281fi
2282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2283fi
2284eval ac_res=\$$3
2285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2286$as_echo "$ac_res" >&6; }
2287 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2288
2289} # ac_fn_c_check_decl
2290
Matthias Kloseb9621712010-04-24 17:59:49 +00002291# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2292# ----------------------------------------------------
2293# Tries to find if the field MEMBER exists in type AGGR, after including
2294# INCLUDES, setting cache variable VAR accordingly.
2295ac_fn_c_check_member ()
2296{
2297 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2299$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002300if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002301 $as_echo_n "(cached) " >&6
2302else
2303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2304/* end confdefs.h. */
2305$5
2306int
2307main ()
2308{
2309static $2 ac_aggr;
2310if (ac_aggr.$3)
2311return 0;
2312 ;
2313 return 0;
2314}
2315_ACEOF
2316if ac_fn_c_try_compile "$LINENO"; then :
2317 eval "$4=yes"
2318else
2319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2320/* end confdefs.h. */
2321$5
2322int
2323main ()
2324{
2325static $2 ac_aggr;
2326if (sizeof ac_aggr.$3)
2327return 0;
2328 ;
2329 return 0;
2330}
2331_ACEOF
2332if ac_fn_c_try_compile "$LINENO"; then :
2333 eval "$4=yes"
2334else
2335 eval "$4=no"
2336fi
2337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2338fi
2339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2340fi
2341eval ac_res=\$$4
2342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2343$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002344 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002345
2346} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002347cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002348This file contains any messages produced by compilers while
2349running configure, to aid debugging if configure makes a mistake.
2350
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002351It was created by python $as_me 3.3, which was
Victor Stinnere0be4232011-10-25 13:06:09 +02002352generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002353
2354 $ $0 $@
2355
2356_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002357exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002358{
2359cat <<_ASUNAME
2360## --------- ##
2361## Platform. ##
2362## --------- ##
2363
2364hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2365uname -m = `(uname -m) 2>/dev/null || echo unknown`
2366uname -r = `(uname -r) 2>/dev/null || echo unknown`
2367uname -s = `(uname -s) 2>/dev/null || echo unknown`
2368uname -v = `(uname -v) 2>/dev/null || echo unknown`
2369
2370/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2371/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2372
2373/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2374/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2375/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002376/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002377/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2378/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2379/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2380
2381_ASUNAME
2382
2383as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2384for as_dir in $PATH
2385do
2386 IFS=$as_save_IFS
2387 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002388 $as_echo "PATH: $as_dir"
2389 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002390IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002391
2392} >&5
2393
2394cat >&5 <<_ACEOF
2395
2396
2397## ----------- ##
2398## Core tests. ##
2399## ----------- ##
2400
2401_ACEOF
2402
2403
2404# Keep a trace of the command line.
2405# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002406# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002407# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002408# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002409ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002410ac_configure_args0=
2411ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002412ac_must_keep_next=false
2413for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002414do
Skip Montanaro6dead952003-09-25 14:50:04 +00002415 for ac_arg
2416 do
2417 case $ac_arg in
2418 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2419 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2420 | -silent | --silent | --silen | --sile | --sil)
2421 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002422 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002423 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002424 esac
2425 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002426 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002427 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002428 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002429 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002430 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002431 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002432 case $ac_arg in
2433 *=* | --config-cache | -C | -disable-* | --disable-* \
2434 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2435 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2436 | -with-* | --with-* | -without-* | --without-* | --x)
2437 case "$ac_configure_args0 " in
2438 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2439 esac
2440 ;;
2441 -* ) ac_must_keep_next=true ;;
2442 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002443 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002444 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002445 ;;
2446 esac
2447 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002448done
Matthias Kloseb9621712010-04-24 17:59:49 +00002449{ ac_configure_args0=; unset ac_configure_args0;}
2450{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002451
2452# When interrupted or exit'd, cleanup temporary files, and complete
2453# config.log. We remove comments because anyway the quotes in there
2454# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002455# WARNING: Use '\'' to represent an apostrophe within the trap.
2456# 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 +00002457trap 'exit_status=$?
2458 # Save into config.log some information that might help in debugging.
2459 {
2460 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002461
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002462 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002463## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002464## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002465 echo
2466 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467(
2468 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2469 eval ac_val=\$$ac_var
2470 case $ac_val in #(
2471 *${as_nl}*)
2472 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002473 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2474$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 esac
2476 case $ac_var in #(
2477 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002478 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2479 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 esac ;;
2481 esac
2482 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002483 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002484 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2485 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002486 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002487 "s/'\''/'\''\\\\'\'''\''/g;
2488 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2489 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002490 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002492 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002493 esac |
2494 sort
2495)
Martin v. Löwis11437992002-04-12 09:54:03 +00002496 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002497
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002498 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002499## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002500## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002501 echo
2502 for ac_var in $ac_subst_vars
2503 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504 eval ac_val=\$$ac_var
2505 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002506 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002509 done | sort
2510 echo
2511
2512 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002513 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002515## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002516 echo
2517 for ac_var in $ac_subst_files
2518 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002519 eval ac_val=\$$ac_var
2520 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002521 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002523 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002524 done | sort
2525 echo
2526 fi
2527
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002529 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002530## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002531## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002533 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 echo
2535 fi
2536 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002537 $as_echo "$as_me: caught signal $ac_signal"
2538 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002539 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002540 rm -f core *.core core.conftest.* &&
2541 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002542 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002544for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002545 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002546done
2547ac_signal=0
2548
2549# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002550rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002551
Matthias Kloseb9621712010-04-24 17:59:49 +00002552$as_echo "/* confdefs.h */" > confdefs.h
2553
Martin v. Löwis11437992002-04-12 09:54:03 +00002554# Predefined preprocessor variables.
2555
2556cat >>confdefs.h <<_ACEOF
2557#define PACKAGE_NAME "$PACKAGE_NAME"
2558_ACEOF
2559
Martin v. Löwis11437992002-04-12 09:54:03 +00002560cat >>confdefs.h <<_ACEOF
2561#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2562_ACEOF
2563
Martin v. Löwis11437992002-04-12 09:54:03 +00002564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_VERSION "$PACKAGE_VERSION"
2566_ACEOF
2567
Martin v. Löwis11437992002-04-12 09:54:03 +00002568cat >>confdefs.h <<_ACEOF
2569#define PACKAGE_STRING "$PACKAGE_STRING"
2570_ACEOF
2571
Martin v. Löwis11437992002-04-12 09:54:03 +00002572cat >>confdefs.h <<_ACEOF
2573#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2574_ACEOF
2575
Matthias Kloseb9621712010-04-24 17:59:49 +00002576cat >>confdefs.h <<_ACEOF
2577#define PACKAGE_URL "$PACKAGE_URL"
2578_ACEOF
2579
Martin v. Löwis11437992002-04-12 09:54:03 +00002580
2581# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002582# Prefer an explicitly selected file to automatically selected ones.
2583ac_site_file1=NONE
2584ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002586 # We do not want a PATH search for config.site.
2587 case $CONFIG_SITE in #((
2588 -*) ac_site_file1=./$CONFIG_SITE;;
2589 */*) ac_site_file1=$CONFIG_SITE;;
2590 *) ac_site_file1=./$CONFIG_SITE;;
2591 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002593 ac_site_file1=$prefix/share/config.site
2594 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595else
Matthias Kloseb9621712010-04-24 17:59:49 +00002596 ac_site_file1=$ac_default_prefix/share/config.site
2597 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002598fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002599for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002600do
Matthias Kloseb9621712010-04-24 17:59:49 +00002601 test "x$ac_site_file" = xNONE && continue
2602 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2603 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2604$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002605 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002606 . "$ac_site_file" \
2607 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2608$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2609as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002610See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002611 fi
2612done
2613
2614if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002615 # Some versions of bash will fail to source /dev/null (special files
2616 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2617 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2618 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2619$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002621 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2622 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002623 esac
2624 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002625else
Matthias Kloseb9621712010-04-24 17:59:49 +00002626 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2627$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 >$cache_file
2629fi
2630
2631# Check that the precious variables saved in the cache have kept the same
2632# value.
2633ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002634for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002635 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2636 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002637 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2638 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 case $ac_old_set,$ac_new_set in
2640 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002641 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2642$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 +00002643 ac_cache_corrupted=: ;;
2644 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002645 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2646$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002647 ac_cache_corrupted=: ;;
2648 ,);;
2649 *)
2650 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002651 # differences in whitespace do not lead to failure.
2652 ac_old_val_w=`echo x $ac_old_val`
2653 ac_new_val_w=`echo x $ac_new_val`
2654 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2656$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2657 ac_cache_corrupted=:
2658 else
2659 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2660$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2661 eval $ac_var=\$ac_old_val
2662 fi
2663 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2664$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2666$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002667 fi;;
2668 esac
2669 # Pass precious variables to config.status.
2670 if test "$ac_new_set" = set; then
2671 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002672 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002673 *) ac_arg=$ac_var=$ac_new_val ;;
2674 esac
2675 case " $ac_configure_args " in
2676 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002677 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002678 esac
2679 fi
2680done
2681if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002682 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2683$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2684 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2685$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002686 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002688## -------------------- ##
2689## Main body of script. ##
2690## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002691
Guido van Rossum7f43da71994-08-01 12:15:30 +00002692ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002693ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002694ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2695ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2696ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002697
Guido van Rossum627b2d71993-12-24 10:39:16 +00002698
Michael W. Hudson54241132001-12-07 15:38:26 +00002699
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002700
2701
2702
2703
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002704if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002705then
2706# Extract the first word of "hg", so it can be a program name with args.
2707set dummy hg; ac_word=$2
2708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2709$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002710if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002711 $as_echo_n "(cached) " >&6
2712else
2713 if test -n "$HAS_HG"; then
2714 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2715else
2716as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2717for as_dir in $PATH
2718do
2719 IFS=$as_save_IFS
2720 test -z "$as_dir" && as_dir=.
2721 for ac_exec_ext in '' $ac_executable_extensions; do
2722 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2723 ac_cv_prog_HAS_HG="found"
2724 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2725 break 2
2726 fi
2727done
2728 done
2729IFS=$as_save_IFS
2730
2731 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2732fi
2733fi
2734HAS_HG=$ac_cv_prog_HAS_HG
2735if test -n "$HAS_HG"; then
2736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2737$as_echo "$HAS_HG" >&6; }
2738else
2739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2740$as_echo "no" >&6; }
2741fi
2742
2743
2744else
2745HAS_HG=no-repository
2746fi
2747if test $HAS_HG = found
2748then
2749 HGVERSION="hg id -i \$(srcdir)"
2750 HGTAG="hg id -t \$(srcdir)"
2751 HGBRANCH="hg id -b \$(srcdir)"
2752else
2753 HGVERSION=""
2754 HGTAG=""
2755 HGBRANCH=""
2756fi
2757
2758
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002759ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002760
2761
Martin v. Löwis11437992002-04-12 09:54:03 +00002762
Benjamin Petersond23f8222009-04-05 19:13:16 +00002763if test "$prefix" != "/"; then
2764 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2765fi
2766
2767
Martin v. Löwis11437992002-04-12 09:54:03 +00002768
2769
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002770# We don't use PACKAGE_ variables, and they cause conflicts
2771# with other autoconf-based packages that include Python.h
2772grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2773rm confdefs.h
2774mv confdefs.h.new confdefs.h
2775
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002776
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002777VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002778
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002779# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002780
2781SOVERSION=1.0
2782
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002783# The later defininition of _XOPEN_SOURCE disables certain features
2784# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2785
Matthias Kloseb9621712010-04-24 17:59:49 +00002786$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002787
2788
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002789# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2790# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2791# them.
2792
Matthias Kloseb9621712010-04-24 17:59:49 +00002793$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002794
2795
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002796# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2797# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2798# them.
2799
Matthias Kloseb9621712010-04-24 17:59:49 +00002800$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002801
2802
Martin v. Löwisd6320502004-08-12 13:45:08 +00002803# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2804# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2805
Matthias Kloseb9621712010-04-24 17:59:49 +00002806$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002807
2808
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002809# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2810# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2811# them.
2812
Matthias Kloseb9621712010-04-24 17:59:49 +00002813$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002814
2815
2816
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002817define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002818
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002819# Arguments passed to configure.
2820
2821CONFIG_ARGS="$ac_configure_args"
2822
Matthias Kloseb9621712010-04-24 17:59:49 +00002823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2824$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002825# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002826if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002827 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002828 case $enableval in
2829 yes)
2830 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002831 if test ! -d "${enableval}"
2832 then
2833 enableval=/
2834 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002835 ;;
2836 esac
2837 case $enableval in
2838 no)
2839 UNIVERSALSDK=
2840 enable_universalsdk=
2841 ;;
2842 *)
2843 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002844 if test ! -d "${UNIVERSALSDK}"
2845 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002846 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002847 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002848 ;;
2849 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002850
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002851
Thomas Wouters477c8d52006-05-27 19:21:47 +00002852else
2853
2854 UNIVERSALSDK=
2855 enable_universalsdk=
2856
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002857fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002858
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002859if test -n "${UNIVERSALSDK}"
2860then
Matthias Kloseb9621712010-04-24 17:59:49 +00002861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2862$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002863else
Matthias Kloseb9621712010-04-24 17:59:49 +00002864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2865$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002866fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002867
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002868
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002869
2870
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002871UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002872
Matthias Kloseb9621712010-04-24 17:59:49 +00002873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2874$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002875
2876# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002877if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002878 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2880$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002881 UNIVERSAL_ARCHS="$withval"
2882
2883else
2884
Matthias Kloseb9621712010-04-24 17:59:49 +00002885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2886$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002887
2888fi
2889
2890
2891
2892
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002893
2894# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002895if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002896 withval=$with_framework_name;
2897 PYTHONFRAMEWORK=${withval}
2898 PYTHONFRAMEWORKDIR=${withval}.framework
2899 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2900
2901else
2902
2903 PYTHONFRAMEWORK=Python
2904 PYTHONFRAMEWORKDIR=Python.framework
2905 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2906
2907fi
2908
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002909# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002910if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002911 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002912 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002913 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002914 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002915 esac
2916 case $enableval in
2917 no)
2918 PYTHONFRAMEWORK=
2919 PYTHONFRAMEWORKDIR=no-framework
2920 PYTHONFRAMEWORKPREFIX=
2921 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002922 FRAMEWORKINSTALLFIRST=
2923 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002924 FRAMEWORKALTINSTALLFIRST=
2925 FRAMEWORKALTINSTALLLAST=
2926 if test "x${prefix}" = "xNONE"; then
2927 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2928 else
2929 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2930 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002931 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002932 ;;
2933 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002934 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002935 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002936 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002937 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002938 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2939 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002940 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002941
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002942 if test "x${prefix}" = "xNONE" ; then
2943 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002944
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002945 else
2946 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2947 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002948
2949 case "${enableval}" in
2950 /System*)
2951 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2952 if test "${prefix}" = "NONE" ; then
2953 # See below
2954 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2955 fi
2956 ;;
2957
2958 /Library*)
2959 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2960 ;;
2961
2962 */Library/Frameworks)
2963 MDIR="`dirname "${enableval}"`"
2964 MDIR="`dirname "${MDIR}"`"
2965 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2966
2967 if test "${prefix}" = "NONE"; then
2968 # User hasn't specified the
2969 # --prefix option, but wants to install
2970 # the framework in a non-default location,
2971 # ensure that the compatibility links get
2972 # installed relative to that prefix as well
2973 # instead of in /usr/local.
2974 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2975 fi
2976 ;;
2977
2978 *)
2979 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2980 ;;
2981 esac
2982
Jack Jansen127e56e2001-09-11 14:41:54 +00002983 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002984
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002985 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002986 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002987 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002988
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002989 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002990
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002991 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2992
2993 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2994
Jack Jansene578a632001-08-15 01:27:14 +00002995 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002996
Guido van Rossum563e7081996-09-10 18:20:48 +00002997else
Martin v. Löwis11437992002-04-12 09:54:03 +00002998
Jack Jansene578a632001-08-15 01:27:14 +00002999 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003000 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003001 PYTHONFRAMEWORKPREFIX=
3002 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003003 FRAMEWORKINSTALLFIRST=
3004 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003005 FRAMEWORKALTINSTALLFIRST=
3006 FRAMEWORKALTINSTALLLAST=
3007 if test "x${prefix}" = "xNONE" ; then
3008 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3009 else
3010 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3011 fi
Jack Jansene578a632001-08-15 01:27:14 +00003012 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003013
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003014
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003015fi
3016
Thomas Wouters477c8d52006-05-27 19:21:47 +00003017
3018
Michael W. Hudson54241132001-12-07 15:38:26 +00003019
3020
3021
3022
Jack Jansene578a632001-08-15 01:27:14 +00003023
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003024
3025
3026
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003027
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003028
Jack Jansene578a632001-08-15 01:27:14 +00003029##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003030## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003031## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003032##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003033# Set name for machine-dependent library files
3034
Matthias Kloseb9621712010-04-24 17:59:49 +00003035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3036$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003037if test -z "$MACHDEP"
3038then
Guido van Rossum563e7081996-09-10 18:20:48 +00003039 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003040 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003041 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003042 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003043 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003044 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003045 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00003046 ac_md_system=`echo $ac_sys_system |
3047 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3048 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00003049 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00003050 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003051
Guido van Rossum07397971997-04-29 21:49:50 +00003052 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003053 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003054 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003055 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003056 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003057 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003058 esac
3059fi
Guido van Rossum91922671997-10-09 20:24:13 +00003060
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003061# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3062# disable features if it is defined, without any means to access these
3063# features as extensions. For these systems, we skip the definition of
3064# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3065# some feature, make sure there is no alternative way to access this
3066# feature. Also, when using wildcards, make sure you have verified the
3067# need for not defining _XOPEN_SOURCE on all systems matching the
3068# wildcard, and that the wildcard does not include future systems
3069# (which may remove their limitations).
3070case $ac_sys_system/$ac_sys_release in
3071 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3072 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003073 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003074 # In addition, Stefan Krah confirms that issue #1244610 exists through
3075 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003076 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003077 define_xopen_source=no
3078 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3079 # also defined. This can be overridden by defining _BSD_SOURCE
3080 # As this has a different meaning on Linux, only define it on OpenBSD
3081
Matthias Kloseb9621712010-04-24 17:59:49 +00003082$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003083
3084 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003085 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003086 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3087 # also defined. This can be overridden by defining _BSD_SOURCE
3088 # As this has a different meaning on Linux, only define it on OpenBSD
3089
Matthias Kloseb9621712010-04-24 17:59:49 +00003090$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003091
3092 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003093 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3094 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3095 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003096 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 +00003097 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003098 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3099 # request to enable features supported by the standard as a request
3100 # to disable features not supported by the standard. The best way
3101 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3102 # entirely and define __EXTENSIONS__ instead.
3103 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003104 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003105 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3106 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003107 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003108 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003109 define_xopen_source=no;;
3110 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003111 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003112 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003113 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003114 # On FreeBSD 4, the math functions C89 does not cover are never defined
3115 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3116 FreeBSD/4.*)
3117 define_xopen_source=no;;
3118 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3119 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3120 # identifies itself as Darwin/7.*
3121 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3122 # disables platform specific features beyond repair.
3123 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3124 # has no effect, don't bother defining them
3125 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003126 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003127 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003128 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003129 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3130 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3131 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003132 AIX/4)
3133 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003134 AIX/5)
3135 if test `uname -r` -eq 1; then
3136 define_xopen_source=no
3137 fi
3138 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003139 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3140 # defining NI_NUMERICHOST.
3141 QNX/6.3.2)
3142 define_xopen_source=no
3143 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003144
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003145esac
3146
3147if test $define_xopen_source = yes
3148then
Victor Stinner14d098d2011-09-07 22:29:43 +02003149 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003150
Victor Stinner14d098d2011-09-07 22:29:43 +02003151$as_echo "#define _XOPEN_SOURCE 700" >>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
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003163$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003164
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003165fi
3166
Guido van Rossum91922671997-10-09 20:24:13 +00003167#
3168# SGI compilers allow the specification of the both the ABI and the
3169# ISA on the command line. Depending on the values of these switches,
3170# different and often incompatable code will be generated.
3171#
3172# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3173# thus supply support for various ABI/ISA combinations. The MACHDEP
3174# variable is also adjusted.
3175#
3176
3177if test ! -z "$SGI_ABI"
3178then
3179 CC="cc $SGI_ABI"
3180 LDFLAGS="$SGI_ABI $LDFLAGS"
3181 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3182fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3184$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003185
Jack Jansen6b08a402004-06-03 12:41:45 +00003186# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3187# it may influence the way we can build extensions, so distutils
3188# needs to check it
3189
Thomas Wouters477c8d52006-05-27 19:21:47 +00003190
Jack Jansen6b08a402004-06-03 12:41:45 +00003191CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003192EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003193
Matthias Kloseb9621712010-04-24 17:59:49 +00003194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3195$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003196ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3198$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003199
Guido van Rossum627b2d71993-12-24 10:39:16 +00003200# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003201
3202# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3203# for debug/optimization stuff. BASECFLAGS is for flags that are required
3204# just to get things to compile and link. Users are free to override OPT
3205# when running configure or make. The build should not break if they do.
3206# BASECFLAGS should generally not be messed with, however.
3207
3208# XXX shouldn't some/most/all of this code be merged with the stuff later
3209# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3211$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003212
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003213# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003214if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003215 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003216 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003217 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003218 without_gcc=yes;;
3219 yes) CC=gcc
3220 without_gcc=no;;
3221 *) CC=$withval
3222 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003223 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003224else
Martin v. Löwis11437992002-04-12 09:54:03 +00003225
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003226 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003227 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003228 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003229 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003230 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003231fi
3232
Matthias Kloseb9621712010-04-24 17:59:49 +00003233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3234$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003235
Guido van Rossum8b131c51995-03-09 14:10:13 +00003236# If the user switches compilers, we can't believe the cache
3237if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3238then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003239 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003240(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003241fi
3242
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003243# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3244# when the compiler supports them, but we don't always want -O2, and
3245# we set -g later.
3246if test -z "$CFLAGS"; then
3247 CFLAGS=
3248fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003249ac_ext=c
3250ac_cpp='$CPP $CPPFLAGS'
3251ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3252ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3253ac_compiler_gnu=$ac_cv_c_compiler_gnu
3254if test -n "$ac_tool_prefix"; then
3255 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3256set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3258$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003259if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003260 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003261else
3262 if test -n "$CC"; then
3263 ac_cv_prog_CC="$CC" # Let the user override the test.
3264else
Martin v. Löwis11437992002-04-12 09:54:03 +00003265as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3266for as_dir in $PATH
3267do
3268 IFS=$as_save_IFS
3269 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003270 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003271 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 +00003272 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003273 $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 +00003274 break 2
3275 fi
3276done
Matthias Kloseb9621712010-04-24 17:59:49 +00003277 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003278IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003279
Jack Jansendd19cf82001-12-06 22:36:17 +00003280fi
3281fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003282CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003283if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3285$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003286else
Matthias Kloseb9621712010-04-24 17:59:49 +00003287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3288$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003289fi
3290
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003291
Martin v. Löwis11437992002-04-12 09:54:03 +00003292fi
3293if test -z "$ac_cv_prog_CC"; then
3294 ac_ct_CC=$CC
3295 # Extract the first word of "gcc", so it can be a program name with args.
3296set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3298$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003299if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003300 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003301else
3302 if test -n "$ac_ct_CC"; then
3303 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3304else
3305as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3306for as_dir in $PATH
3307do
3308 IFS=$as_save_IFS
3309 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003310 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003311 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 +00003312 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003313 $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 +00003314 break 2
3315 fi
3316done
Matthias Kloseb9621712010-04-24 17:59:49 +00003317 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003318IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003319
3320fi
3321fi
3322ac_ct_CC=$ac_cv_prog_ac_ct_CC
3323if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3325$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003326else
Matthias Kloseb9621712010-04-24 17:59:49 +00003327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3328$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003329fi
3330
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003331 if test "x$ac_ct_CC" = x; then
3332 CC=""
3333 else
3334 case $cross_compiling:$ac_tool_warned in
3335yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003336{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3337$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003338ac_tool_warned=yes ;;
3339esac
3340 CC=$ac_ct_CC
3341 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003342else
3343 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003344fi
3345
Jack Jansendd19cf82001-12-06 22:36:17 +00003346if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003347 if test -n "$ac_tool_prefix"; then
3348 # 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 +00003349set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3351$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003352if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003353 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003354else
3355 if test -n "$CC"; then
3356 ac_cv_prog_CC="$CC" # Let the user override the test.
3357else
Martin v. Löwis11437992002-04-12 09:54:03 +00003358as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3359for as_dir in $PATH
3360do
3361 IFS=$as_save_IFS
3362 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003363 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003364 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 +00003365 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003366 $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 +00003367 break 2
3368 fi
3369done
Matthias Kloseb9621712010-04-24 17:59:49 +00003370 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003371IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003372
3373fi
3374fi
3375CC=$ac_cv_prog_CC
3376if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3378$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003379else
Matthias Kloseb9621712010-04-24 17:59:49 +00003380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3381$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003382fi
3383
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003384
Martin v. Löwis11437992002-04-12 09:54:03 +00003385 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003386fi
3387if test -z "$CC"; then
3388 # Extract the first word of "cc", so it can be a program name with args.
3389set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3391$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003392if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003393 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003394else
3395 if test -n "$CC"; then
3396 ac_cv_prog_CC="$CC" # Let the user override the test.
3397else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003398 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003399as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3400for as_dir in $PATH
3401do
3402 IFS=$as_save_IFS
3403 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003404 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003405 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 +00003406 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3407 ac_prog_rejected=yes
3408 continue
3409 fi
3410 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003411 $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 +00003412 break 2
3413 fi
3414done
Matthias Kloseb9621712010-04-24 17:59:49 +00003415 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003416IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003417
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003418if test $ac_prog_rejected = yes; then
3419 # We found a bogon in the path, so make sure we never use it.
3420 set dummy $ac_cv_prog_CC
3421 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003422 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003423 # We chose a different compiler from the bogus one.
3424 # However, it has the same basename, so the bogon will be chosen
3425 # first if we set CC to just the basename; use the full file name.
3426 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003427 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003428 fi
3429fi
3430fi
3431fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003432CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003433if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3435$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003436else
Matthias Kloseb9621712010-04-24 17:59:49 +00003437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3438$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003439fi
3440
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003441
Martin v. Löwis11437992002-04-12 09:54:03 +00003442fi
3443if test -z "$CC"; then
3444 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003445 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003446 do
3447 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3448set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3450$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003451if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003452 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003453else
3454 if test -n "$CC"; then
3455 ac_cv_prog_CC="$CC" # Let the user override the test.
3456else
Martin v. Löwis11437992002-04-12 09:54:03 +00003457as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3458for as_dir in $PATH
3459do
3460 IFS=$as_save_IFS
3461 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003462 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003463 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 +00003464 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003465 $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 +00003466 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003467 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003468done
Matthias Kloseb9621712010-04-24 17:59:49 +00003469 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003470IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003471
3472fi
3473fi
3474CC=$ac_cv_prog_CC
3475if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3477$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003478else
Matthias Kloseb9621712010-04-24 17:59:49 +00003479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3480$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003481fi
3482
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003483
Martin v. Löwis11437992002-04-12 09:54:03 +00003484 test -n "$CC" && break
3485 done
3486fi
3487if test -z "$CC"; then
3488 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003489 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003490do
3491 # Extract the first word of "$ac_prog", so it can be a program name with args.
3492set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3494$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003495if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003496 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003497else
3498 if test -n "$ac_ct_CC"; then
3499 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3500else
3501as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3502for as_dir in $PATH
3503do
3504 IFS=$as_save_IFS
3505 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003506 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003507 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 +00003508 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003509 $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 +00003510 break 2
3511 fi
3512done
Matthias Kloseb9621712010-04-24 17:59:49 +00003513 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003514IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003515
Martin v. Löwis11437992002-04-12 09:54:03 +00003516fi
3517fi
3518ac_ct_CC=$ac_cv_prog_ac_ct_CC
3519if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3521$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003522else
Matthias Kloseb9621712010-04-24 17:59:49 +00003523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3524$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003525fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003526
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003527
Martin v. Löwis11437992002-04-12 09:54:03 +00003528 test -n "$ac_ct_CC" && break
3529done
Michael W. Hudson54241132001-12-07 15:38:26 +00003530
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003531 if test "x$ac_ct_CC" = x; then
3532 CC=""
3533 else
3534 case $cross_compiling:$ac_tool_warned in
3535yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003536{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3537$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003538ac_tool_warned=yes ;;
3539esac
3540 CC=$ac_ct_CC
3541 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003542fi
3543
3544fi
3545
3546
Matthias Kloseb9621712010-04-24 17:59:49 +00003547test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3548$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003549as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003550See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003551
3552# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003553$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3554set X $ac_compile
3555ac_compiler=$2
3556for ac_option in --version -v -V -qversion; do
3557 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003558case "(($ac_try" in
3559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3560 *) ac_try_echo=$ac_try;;
3561esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003562eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3563$as_echo "$ac_try_echo"; } >&5
3564 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003565 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003566 if test -s conftest.err; then
3567 sed '10a\
3568... rest of stderr output deleted ...
3569 10q' conftest.err >conftest.er1
3570 cat conftest.er1 >&5
3571 fi
3572 rm -f conftest.er1 conftest.err
3573 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3574 test $ac_status = 0; }
3575done
Martin v. Löwis11437992002-04-12 09:54:03 +00003576
Matthias Kloseb9621712010-04-24 17:59:49 +00003577cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003578/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003579
Martin v. Löwis11437992002-04-12 09:54:03 +00003580int
3581main ()
3582{
3583
3584 ;
3585 return 0;
3586}
3587_ACEOF
3588ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003589ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003590# Try to create an executable without -o first, disregard a.out.
3591# It will help us diagnose broken compilers, and finding out an intuition
3592# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3594$as_echo_n "checking whether the C compiler works... " >&6; }
3595ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3596
3597# The possible output files:
3598ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3599
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003600ac_rmfiles=
3601for ac_file in $ac_files
3602do
3603 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003604 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003605 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3606 esac
3607done
3608rm -f $ac_rmfiles
3609
Matthias Kloseb9621712010-04-24 17:59:49 +00003610if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003611case "(($ac_try" in
3612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3613 *) ac_try_echo=$ac_try;;
3614esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003615eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3616$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003617 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003618 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003619 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3620 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003621 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3622# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3623# in a Makefile. We should not override ac_cv_exeext if it was cached,
3624# so that the user can short-circuit this test for compilers unknown to
3625# Autoconf.
3626for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003627do
3628 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003629 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003630 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003631 ;;
3632 [ab].out )
3633 # We found the default executable, but exeext='' is most
3634 # certainly right.
3635 break;;
3636 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003637 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003638 then :; else
3639 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3640 fi
3641 # We set ac_cv_exeext here because the later test for it is not
3642 # safe: cross compilers may not add the suffix if given an `-o'
3643 # argument, so we may need to know it at that point already.
3644 # Even if this section looks crufty: it has the advantage of
3645 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003646 break;;
3647 * )
3648 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003649 esac
3650done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003651test "$ac_cv_exeext" = no && ac_cv_exeext=
3652
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003653else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003654 ac_file=''
3655fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003656if test -z "$ac_file"; then :
3657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3658$as_echo "no" >&6; }
3659$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003660sed 's/^/| /' conftest.$ac_ext >&5
3661
Matthias Kloseb9621712010-04-24 17:59:49 +00003662{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3663$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003664as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003665See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003666else
3667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3668$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3671$as_echo_n "checking for C compiler default output file name... " >&6; }
3672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3673$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003674ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003675
Matthias Kloseb9621712010-04-24 17:59:49 +00003676rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003677ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3679$as_echo_n "checking for suffix of executables... " >&6; }
3680if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003681case "(($ac_try" in
3682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3683 *) ac_try_echo=$ac_try;;
3684esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003685eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3686$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003687 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003688 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003689 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3690 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003691 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3692# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3693# work properly (i.e., refer to `conftest.exe'), while it won't with
3694# `rm'.
3695for ac_file in conftest.exe conftest conftest.*; do
3696 test -f "$ac_file" || continue
3697 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003698 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003699 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3700 break;;
3701 * ) break;;
3702 esac
3703done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003704else
Matthias Kloseb9621712010-04-24 17:59:49 +00003705 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3706$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003707as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003708See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003709fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003710rm -f conftest conftest$ac_cv_exeext
3711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3712$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003713
3714rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003715EXEEXT=$ac_cv_exeext
3716ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3718/* end confdefs.h. */
3719#include <stdio.h>
3720int
3721main ()
3722{
3723FILE *f = fopen ("conftest.out", "w");
3724 return ferror (f) || fclose (f) != 0;
3725
3726 ;
3727 return 0;
3728}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003730ac_clean_files="$ac_clean_files conftest.out"
3731# Check that the compiler produces executables we can run. If not, either
3732# the compiler is broken, or we cross compile.
3733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3734$as_echo_n "checking whether we are cross compiling... " >&6; }
3735if test "$cross_compiling" != yes; then
3736 { { ac_try="$ac_link"
3737case "(($ac_try" in
3738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3739 *) ac_try_echo=$ac_try;;
3740esac
3741eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3742$as_echo "$ac_try_echo"; } >&5
3743 (eval "$ac_link") 2>&5
3744 ac_status=$?
3745 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3746 test $ac_status = 0; }
3747 if { ac_try='./conftest$ac_cv_exeext'
3748 { { case "(($ac_try" in
3749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3750 *) ac_try_echo=$ac_try;;
3751esac
3752eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3753$as_echo "$ac_try_echo"; } >&5
3754 (eval "$ac_try") 2>&5
3755 ac_status=$?
3756 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3757 test $ac_status = 0; }; }; then
3758 cross_compiling=no
3759 else
3760 if test "$cross_compiling" = maybe; then
3761 cross_compiling=yes
3762 else
3763 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3764$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003765as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003766If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02003767See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003768 fi
3769 fi
3770fi
3771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3772$as_echo "$cross_compiling" >&6; }
3773
3774rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3775ac_clean_files=$ac_clean_files_save
3776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3777$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003778if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003779 $as_echo_n "(cached) " >&6
3780else
3781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003782/* end confdefs.h. */
3783
3784int
3785main ()
3786{
3787
3788 ;
3789 return 0;
3790}
3791_ACEOF
3792rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003793if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003794case "(($ac_try" in
3795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3796 *) ac_try_echo=$ac_try;;
3797esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003798eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3799$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003800 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003801 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003802 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3803 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003804 for ac_file in conftest.o conftest.obj conftest.*; do
3805 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003806 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003807 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003808 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3809 break;;
3810 esac
3811done
3812else
Matthias Kloseb9621712010-04-24 17:59:49 +00003813 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003814sed 's/^/| /' conftest.$ac_ext >&5
3815
Matthias Kloseb9621712010-04-24 17:59:49 +00003816{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3817$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003818as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02003819See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003820fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003821rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003822fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3824$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003825OBJEXT=$ac_cv_objext
3826ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3828$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003829if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003831else
Matthias Kloseb9621712010-04-24 17:59:49 +00003832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003833/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003834
Martin v. Löwis11437992002-04-12 09:54:03 +00003835int
3836main ()
3837{
3838#ifndef __GNUC__
3839 choke me
3840#endif
3841
3842 ;
3843 return 0;
3844}
3845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003846if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003847 ac_compiler_gnu=yes
3848else
Matthias Kloseb9621712010-04-24 17:59:49 +00003849 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003850fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003852ac_cv_c_compiler_gnu=$ac_compiler_gnu
3853
3854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3856$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3857if test $ac_compiler_gnu = yes; then
3858 GCC=yes
3859else
3860 GCC=
3861fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003862ac_test_CFLAGS=${CFLAGS+set}
3863ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3865$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003866if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003867 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003868else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003869 ac_save_c_werror_flag=$ac_c_werror_flag
3870 ac_c_werror_flag=yes
3871 ac_cv_prog_cc_g=no
3872 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003874/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003875
Martin v. Löwis11437992002-04-12 09:54:03 +00003876int
3877main ()
3878{
3879
3880 ;
3881 return 0;
3882}
3883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003884if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003885 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003886else
Matthias Kloseb9621712010-04-24 17:59:49 +00003887 CFLAGS=""
3888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003889/* end confdefs.h. */
3890
3891int
3892main ()
3893{
3894
3895 ;
3896 return 0;
3897}
3898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003899if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003900
Matthias Kloseb9621712010-04-24 17:59:49 +00003901else
3902 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003903 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003905/* end confdefs.h. */
3906
3907int
3908main ()
3909{
3910
3911 ;
3912 return 0;
3913}
3914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003915if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003916 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003917fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003919fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3921fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3923 ac_c_werror_flag=$ac_save_c_werror_flag
3924fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3926$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003927if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003928 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003929elif test $ac_cv_prog_cc_g = yes; then
3930 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003931 CFLAGS="-g -O2"
3932 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003933 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003934 fi
3935else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003936 if test "$GCC" = yes; then
3937 CFLAGS="-O2"
3938 else
3939 CFLAGS=
3940 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003941fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3943$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003944if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003945 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003946else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003947 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003948ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003950/* end confdefs.h. */
3951#include <stdarg.h>
3952#include <stdio.h>
3953#include <sys/types.h>
3954#include <sys/stat.h>
3955/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3956struct buf { int x; };
3957FILE * (*rcsopen) (struct buf *, struct stat *, int);
3958static char *e (p, i)
3959 char **p;
3960 int i;
3961{
3962 return p[i];
3963}
3964static char *f (char * (*g) (char **, int), char **p, ...)
3965{
3966 char *s;
3967 va_list v;
3968 va_start (v,p);
3969 s = g (p, va_arg (v,int));
3970 va_end (v);
3971 return s;
3972}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003973
3974/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3975 function prototypes and stuff, but not '\xHH' hex character constants.
3976 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003977 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003978 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3979 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003980 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003981int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3982
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003983/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3984 inside strings and character constants. */
3985#define FOO(x) 'x'
3986int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3987
Skip Montanaro6dead952003-09-25 14:50:04 +00003988int test (int i, double x);
3989struct s1 {int (*f) (int a);};
3990struct s2 {int (*f) (double a);};
3991int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3992int argc;
3993char **argv;
3994int
3995main ()
3996{
3997return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3998 ;
3999 return 0;
4000}
4001_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004002for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4003 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004004do
4005 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004006 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004007 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004008fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004009rm -f core conftest.err conftest.$ac_objext
4010 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004011done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004012rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004013CC=$ac_save_CC
4014
4015fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004016# AC_CACHE_VAL
4017case "x$ac_cv_prog_cc_c89" in
4018 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4020$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004021 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4023$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004024 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004025 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4027$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004028esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004029if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004030
Matthias Kloseb9621712010-04-24 17:59:49 +00004031fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004032
Martin v. Löwis11437992002-04-12 09:54:03 +00004033ac_ext=c
4034ac_cpp='$CPP $CPPFLAGS'
4035ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4036ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4037ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004038
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004039
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004040
4041
Matthias Kloseb9621712010-04-24 17:59:49 +00004042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4043$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004044
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004045# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004046if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004047 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004048
4049 case $withval in
4050 no) with_cxx_main=no
4051 MAINCC='$(CC)';;
4052 yes) with_cxx_main=yes
4053 MAINCC='$(CXX)';;
4054 *) with_cxx_main=yes
4055 MAINCC=$withval
4056 if test -z "$CXX"
4057 then
4058 CXX=$withval
4059 fi;;
4060 esac
4061else
4062
4063 with_cxx_main=no
4064 MAINCC='$(CC)'
4065
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004066fi
4067
Matthias Kloseb9621712010-04-24 17:59:49 +00004068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4069$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004070
4071preset_cxx="$CXX"
4072if test -z "$CXX"
4073then
4074 case "$CC" in
4075 gcc) # Extract the first word of "g++", so it can be a program name with args.
4076set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4078$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004079if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004080 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004081else
4082 case $CXX in
4083 [\\/]* | ?:[\\/]*)
4084 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4085 ;;
4086 *)
4087 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4088for as_dir in notfound
4089do
4090 IFS=$as_save_IFS
4091 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004092 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004093 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 +00004094 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004095 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004096 break 2
4097 fi
4098done
Matthias Kloseb9621712010-04-24 17:59:49 +00004099 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004100IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004101
4102 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4103 ;;
4104esac
4105fi
4106CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004107if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4109$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004110else
Matthias Kloseb9621712010-04-24 17:59:49 +00004111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4112$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004113fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004114
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004115 ;;
4116 cc) # Extract the first word of "c++", so it can be a program name with args.
4117set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4119$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004120if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004121 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004122else
4123 case $CXX in
4124 [\\/]* | ?:[\\/]*)
4125 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4126 ;;
4127 *)
4128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4129for as_dir in notfound
4130do
4131 IFS=$as_save_IFS
4132 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004133 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004134 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 +00004135 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004136 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004137 break 2
4138 fi
4139done
Matthias Kloseb9621712010-04-24 17:59:49 +00004140 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004141IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004142
4143 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4144 ;;
4145esac
4146fi
4147CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004148if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4150$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004151else
Matthias Kloseb9621712010-04-24 17:59:49 +00004152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4153$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004154fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004155
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004156 ;;
4157 esac
4158 if test "$CXX" = "notfound"
4159 then
4160 CXX=""
4161 fi
4162fi
4163if test -z "$CXX"
4164then
4165 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4166do
4167 # Extract the first word of "$ac_prog", so it can be a program name with args.
4168set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4170$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004171if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004172 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004173else
4174 if test -n "$CXX"; then
4175 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4176else
4177as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4178for as_dir in $PATH
4179do
4180 IFS=$as_save_IFS
4181 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004182 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004183 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 +00004184 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004185 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004186 break 2
4187 fi
4188done
Matthias Kloseb9621712010-04-24 17:59:49 +00004189 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004190IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004191
4192fi
4193fi
4194CXX=$ac_cv_prog_CXX
4195if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4197$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004198else
Matthias Kloseb9621712010-04-24 17:59:49 +00004199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4200$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004201fi
4202
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004203
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004204 test -n "$CXX" && break
4205done
4206test -n "$CXX" || CXX="notfound"
4207
4208 if test "$CXX" = "notfound"
4209 then
4210 CXX=""
4211 fi
4212fi
4213if test "$preset_cxx" != "$CXX"
4214then
Matthias Kloseb9621712010-04-24 17:59:49 +00004215 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004216
4217 By default, distutils will build C++ extension modules with \"$CXX\".
4218 If this is not intended, then set CXX on the configure command line.
4219 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004220$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004221
4222 By default, distutils will build C++ extension modules with \"$CXX\".
4223 If this is not intended, then set CXX on the configure command line.
4224 " >&2;}
4225fi
4226
4227
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4229$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4230save_LDFLAGS="$LDFLAGS"
4231LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004232
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4234/* end confdefs.h. */
4235
4236int
4237main ()
4238{
4239
4240 ;
4241 return 0;
4242}
4243_ACEOF
4244if ac_fn_c_try_link "$LINENO"; then :
4245 NO_AS_NEEDED="-Wl,--no-as-needed"
4246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4247$as_echo "yes" >&6; }
4248else
4249 NO_AS_NEEDED=""
4250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4251$as_echo "no" >&6; }
4252fi
4253rm -f core conftest.err conftest.$ac_objext \
4254 conftest$ac_exeext conftest.$ac_ext
4255LDFLAGS="$save_LDFLAGS"
4256
4257
4258
4259# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004260ac_ext=c
4261ac_cpp='$CPP $CPPFLAGS'
4262ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4263ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4264ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4266$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004267# On Suns, sometimes $CPP names a directory.
4268if test -n "$CPP" && test -d "$CPP"; then
4269 CPP=
4270fi
4271if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004272 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004273 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004274else
Martin v. Löwis11437992002-04-12 09:54:03 +00004275 # Double quotes because CPP needs to be expanded
4276 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4277 do
4278 ac_preproc_ok=false
4279for ac_c_preproc_warn_flag in '' yes
4280do
4281 # Use a header file that comes with gcc, so configuring glibc
4282 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004283 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4284 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004285 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004286 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004288/* end confdefs.h. */
4289#ifdef __STDC__
4290# include <limits.h>
4291#else
4292# include <assert.h>
4293#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004294 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004296if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004297
Matthias Kloseb9621712010-04-24 17:59:49 +00004298else
Martin v. Löwis11437992002-04-12 09:54:03 +00004299 # Broken: fails on valid input.
4300continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004301fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004302rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004303
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004304 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004305 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004307/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004308#include <ac_nonexistent.h>
4309_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004310if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004311 # Broken: success on invalid input.
4312continue
4313else
Martin v. Löwis11437992002-04-12 09:54:03 +00004314 # Passes both tests.
4315ac_preproc_ok=:
4316break
4317fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004318rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004319
4320done
4321# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004322rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004323if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004324 break
4325fi
4326
4327 done
4328 ac_cv_prog_CPP=$CPP
4329
4330fi
4331 CPP=$ac_cv_prog_CPP
4332else
4333 ac_cv_prog_CPP=$CPP
4334fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4336$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004337ac_preproc_ok=false
4338for ac_c_preproc_warn_flag in '' yes
4339do
4340 # Use a header file that comes with gcc, so configuring glibc
4341 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004342 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4343 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004344 # On the NeXT, cc -E runs the code through the compiler's parser,
4345 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004347/* end confdefs.h. */
4348#ifdef __STDC__
4349# include <limits.h>
4350#else
4351# include <assert.h>
4352#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004353 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004354_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004355if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004356
Matthias Kloseb9621712010-04-24 17:59:49 +00004357else
Martin v. Löwis11437992002-04-12 09:54:03 +00004358 # Broken: fails on valid input.
4359continue
4360fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004361rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004362
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004363 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004364 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004366/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004367#include <ac_nonexistent.h>
4368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004369if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004370 # Broken: success on invalid input.
4371continue
4372else
Martin v. Löwis11437992002-04-12 09:54:03 +00004373 # Passes both tests.
4374ac_preproc_ok=:
4375break
4376fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004377rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004378
4379done
4380# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004381rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004382if $ac_preproc_ok; then :
4383
Martin v. Löwis11437992002-04-12 09:54:03 +00004384else
Matthias Kloseb9621712010-04-24 17:59:49 +00004385 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4386$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004387as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004388See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004389fi
4390
4391ac_ext=c
4392ac_cpp='$CPP $CPPFLAGS'
4393ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4394ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4395ac_compiler_gnu=$ac_cv_c_compiler_gnu
4396
4397
Matthias Kloseb9621712010-04-24 17:59:49 +00004398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4399$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004400if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004401 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004402else
Matthias Kloseb9621712010-04-24 17:59:49 +00004403 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004404 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004405 # Loop through the user's path and test for each of PROGNAME-LIST
4406 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004407for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4408do
4409 IFS=$as_save_IFS
4410 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004411 for ac_prog in grep ggrep; do
4412 for ac_exec_ext in '' $ac_executable_extensions; do
4413 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4414 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4415# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004416 # Check for GNU $ac_path_GREP
4417case `"$ac_path_GREP" --version 2>&1` in
4418*GNU*)
4419 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4420*)
4421 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004422 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004423 while :
4424 do
4425 cat "conftest.in" "conftest.in" >"conftest.tmp"
4426 mv "conftest.tmp" "conftest.in"
4427 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004428 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004429 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4430 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004431 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004432 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4433 # Best one so far, save it but keep looking for a better one
4434 ac_cv_path_GREP="$ac_path_GREP"
4435 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004436 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004437 # 10*(2^10) chars as input seems more than enough
4438 test $ac_count -gt 10 && break
4439 done
4440 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4441esac
4442
Matthias Kloseb9621712010-04-24 17:59:49 +00004443 $ac_path_GREP_found && break 3
4444 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004445 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004446 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004447IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004448 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004449 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 +00004450 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004451else
4452 ac_cv_path_GREP=$GREP
4453fi
4454
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004455fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4457$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004458 GREP="$ac_cv_path_GREP"
4459
4460
Matthias Kloseb9621712010-04-24 17:59:49 +00004461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4462$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004463if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004464 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004465else
4466 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4467 then ac_cv_path_EGREP="$GREP -E"
4468 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004469 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004470 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004471 # Loop through the user's path and test for each of PROGNAME-LIST
4472 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004473for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4474do
4475 IFS=$as_save_IFS
4476 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004477 for ac_prog in egrep; do
4478 for ac_exec_ext in '' $ac_executable_extensions; do
4479 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4480 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4481# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004482 # Check for GNU $ac_path_EGREP
4483case `"$ac_path_EGREP" --version 2>&1` in
4484*GNU*)
4485 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4486*)
4487 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004488 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004489 while :
4490 do
4491 cat "conftest.in" "conftest.in" >"conftest.tmp"
4492 mv "conftest.tmp" "conftest.in"
4493 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004494 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004495 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4496 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004497 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004498 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4499 # Best one so far, save it but keep looking for a better one
4500 ac_cv_path_EGREP="$ac_path_EGREP"
4501 ac_path_EGREP_max=$ac_count
4502 fi
4503 # 10*(2^10) chars as input seems more than enough
4504 test $ac_count -gt 10 && break
4505 done
4506 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4507esac
4508
Matthias Kloseb9621712010-04-24 17:59:49 +00004509 $ac_path_EGREP_found && break 3
4510 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004511 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004512 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004513IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004514 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004515 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 +00004516 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004517else
4518 ac_cv_path_EGREP=$EGREP
4519fi
4520
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004521 fi
4522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4524$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004525 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004526
4527
Matthias Kloseb9621712010-04-24 17:59:49 +00004528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4529$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004530if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004531 $as_echo_n "(cached) " >&6
4532else
4533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004534/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004535#include <stdlib.h>
4536#include <stdarg.h>
4537#include <string.h>
4538#include <float.h>
4539
4540int
4541main ()
4542{
4543
4544 ;
4545 return 0;
4546}
4547_ACEOF
4548if ac_fn_c_try_compile "$LINENO"; then :
4549 ac_cv_header_stdc=yes
4550else
4551 ac_cv_header_stdc=no
4552fi
4553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4554
4555if test $ac_cv_header_stdc = yes; then
4556 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4558/* end confdefs.h. */
4559#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004560
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004561_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004562if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004563 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004564
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004565else
Matthias Kloseb9621712010-04-24 17:59:49 +00004566 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004567fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004568rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004569
Matthias Kloseb9621712010-04-24 17:59:49 +00004570fi
4571
4572if test $ac_cv_header_stdc = yes; then
4573 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4575/* end confdefs.h. */
4576#include <stdlib.h>
4577
4578_ACEOF
4579if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4580 $EGREP "free" >/dev/null 2>&1; then :
4581
4582else
4583 ac_cv_header_stdc=no
4584fi
4585rm -f conftest*
4586
4587fi
4588
4589if test $ac_cv_header_stdc = yes; then
4590 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4591 if test "$cross_compiling" = yes; then :
4592 :
4593else
4594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4595/* end confdefs.h. */
4596#include <ctype.h>
4597#include <stdlib.h>
4598#if ((' ' & 0x0FF) == 0x020)
4599# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4600# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4601#else
4602# define ISLOWER(c) \
4603 (('a' <= (c) && (c) <= 'i') \
4604 || ('j' <= (c) && (c) <= 'r') \
4605 || ('s' <= (c) && (c) <= 'z'))
4606# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4607#endif
4608
4609#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4610int
4611main ()
4612{
4613 int i;
4614 for (i = 0; i < 256; i++)
4615 if (XOR (islower (i), ISLOWER (i))
4616 || toupper (i) != TOUPPER (i))
4617 return 2;
4618 return 0;
4619}
4620_ACEOF
4621if ac_fn_c_try_run "$LINENO"; then :
4622
4623else
4624 ac_cv_header_stdc=no
4625fi
4626rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4627 conftest.$ac_objext conftest.beam conftest.$ac_ext
4628fi
4629
4630fi
4631fi
4632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4633$as_echo "$ac_cv_header_stdc" >&6; }
4634if test $ac_cv_header_stdc = yes; then
4635
4636$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4637
4638fi
4639
4640# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4641for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4642 inttypes.h stdint.h unistd.h
4643do :
4644 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4645ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4646"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004647if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004648 cat >>confdefs.h <<_ACEOF
4649#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4650_ACEOF
4651
4652fi
4653
4654done
4655
4656
4657
4658 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02004659if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004660 MINIX=yes
4661else
4662 MINIX=
4663fi
4664
4665
4666 if test "$MINIX" = yes; then
4667
4668$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4669
4670
4671$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4672
4673
4674$as_echo "#define _MINIX 1" >>confdefs.h
4675
4676 fi
4677
4678
4679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4680$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004681if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004682 $as_echo_n "(cached) " >&6
4683else
4684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4685/* end confdefs.h. */
4686
4687# define __EXTENSIONS__ 1
4688 $ac_includes_default
4689int
4690main ()
4691{
4692
4693 ;
4694 return 0;
4695}
4696_ACEOF
4697if ac_fn_c_try_compile "$LINENO"; then :
4698 ac_cv_safe_to_define___extensions__=yes
4699else
4700 ac_cv_safe_to_define___extensions__=no
4701fi
4702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4703fi
4704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4705$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4706 test $ac_cv_safe_to_define___extensions__ = yes &&
4707 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4708
4709 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4710
4711 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4712
4713 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4714
4715 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4716
4717
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004718
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004719# Check for unsupported systems
4720case $ac_sys_system/$ac_sys_release in
4721atheos*|Linux*/1*)
4722 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4723 echo See README for details.
4724 exit 1;;
4725esac
4726
4727
Matthias Kloseb9621712010-04-24 17:59:49 +00004728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4729$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004730
4731# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004732if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004733 withval=$with_suffix;
4734 case $withval in
4735 no) EXEEXT=;;
4736 yes) EXEEXT=.exe;;
4737 *) EXEEXT=$withval;;
4738 esac
4739fi
4740
Matthias Kloseb9621712010-04-24 17:59:49 +00004741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4742$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004743
4744# Test whether we're running on a non-case-sensitive system, in which
4745# case we give a warning if no ext is given
4746
Matthias Kloseb9621712010-04-24 17:59:49 +00004747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4748$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004749if test ! -d CaseSensitiveTestDir; then
4750mkdir CaseSensitiveTestDir
4751fi
4752
4753if test -d casesensitivetestdir
4754then
Matthias Kloseb9621712010-04-24 17:59:49 +00004755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4756$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004757 BUILDEXEEXT=.exe
4758else
Matthias Kloseb9621712010-04-24 17:59:49 +00004759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4760$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004761 BUILDEXEEXT=$EXEEXT
4762fi
4763rmdir CaseSensitiveTestDir
4764
4765case $MACHDEP in
4766bsdos*)
4767 case $CC in
4768 gcc) CC="$CC -D_HAVE_BSDI";;
4769 esac;;
4770esac
4771
4772case $ac_sys_system in
4773hp*|HP*)
4774 case $CC in
4775 cc|*/cc) CC="$CC -Ae";;
4776 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004777esac
4778
4779
4780
Matthias Kloseb9621712010-04-24 17:59:49 +00004781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4782$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004783if test -z "$LIBRARY"
4784then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004785 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004786fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4788$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004789
4790# LDLIBRARY is the name of the library to link against (as opposed to the
4791# name of the library into which to insert object files). BLDLIBRARY is also
4792# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4793# is blank as the main program is not linked directly against LDLIBRARY.
4794# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4795# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4796# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4797# DLLLIBRARY is the shared (i.e., DLL) library.
4798#
4799# RUNSHARED is used to run shared python without installed libraries
4800#
4801# INSTSONAME is the name of the shared library that will be use to install
4802# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004803#
4804# LDVERSION is the shared library version number, normally the Python version
4805# with the ABI build flags appended.
4806
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004807
4808
4809
4810
4811
4812
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004813
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004814LDLIBRARY="$LIBRARY"
4815BLDLIBRARY='$(LDLIBRARY)'
4816INSTSONAME='$(LDLIBRARY)'
4817DLLLIBRARY=''
4818LDLIBRARYDIR=''
4819RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004820LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004821
4822# LINKCC is the command that links the python executable -- default is $(CC).
4823# If CXX is set, and if it is needed to link a main function that was
4824# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4825# python might then depend on the C++ runtime
4826# This is altered for AIX in order to build the export list before
4827# linking.
4828
Matthias Kloseb9621712010-04-24 17:59:49 +00004829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4830$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004831if test -z "$LINKCC"
4832then
4833 LINKCC='$(PURIFY) $(MAINCC)'
4834 case $ac_sys_system in
4835 AIX*)
4836 exp_extra="\"\""
4837 if test $ac_sys_release -ge 5 -o \
4838 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4839 exp_extra="."
4840 fi
4841 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004842 QNX*)
4843 # qcc must be used because the other compilers do not
4844 # support -N.
4845 LINKCC=qcc;;
4846 esac
4847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4849$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004850
4851# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4852# make sure we default having it set to "no": this is used by
4853# distutils.unixccompiler to know if it should add --enable-new-dtags
4854# to linker command lines, and failing to detect GNU ld simply results
4855# in the same bahaviour as before.
4856
Matthias Kloseb9621712010-04-24 17:59:49 +00004857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4858$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004859ac_prog=ld
4860if test "$GCC" = yes; then
4861 ac_prog=`$CC -print-prog-name=ld`
4862fi
4863case `"$ac_prog" -V 2>&1 < /dev/null` in
4864 *GNU*)
4865 GNULD=yes;;
4866 *)
4867 GNULD=no;;
4868esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4870$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004871
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4873$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004874if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004875 $as_echo_n "(cached) " >&6
4876else
4877 ac_cv_c_inline=no
4878for ac_kw in inline __inline__ __inline; do
4879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4880/* end confdefs.h. */
4881#ifndef __cplusplus
4882typedef int foo_t;
4883static $ac_kw foo_t static_foo () {return 0; }
4884$ac_kw foo_t foo () {return 0; }
4885#endif
4886
4887_ACEOF
4888if ac_fn_c_try_compile "$LINENO"; then :
4889 ac_cv_c_inline=$ac_kw
4890fi
4891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4892 test "$ac_cv_c_inline" != no && break
4893done
4894
4895fi
4896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4897$as_echo "$ac_cv_c_inline" >&6; }
4898
4899case $ac_cv_c_inline in
4900 inline | yes) ;;
4901 *)
4902 case $ac_cv_c_inline in
4903 no) ac_val=;;
4904 *) ac_val=$ac_cv_c_inline;;
4905 esac
4906 cat >>confdefs.h <<_ACEOF
4907#ifndef __cplusplus
4908#define inline $ac_val
4909#endif
4910_ACEOF
4911 ;;
4912esac
4913
4914if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004915
4916$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004917
4918
4919fi
4920
4921
Matthias Kloseb9621712010-04-24 17:59:49 +00004922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4923$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004924# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004925if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004926 enableval=$enable_shared;
4927fi
4928
4929
4930if test -z "$enable_shared"
4931then
4932 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004933 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004934 enable_shared="yes";;
4935 *)
4936 enable_shared="no";;
4937 esac
4938fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4940$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004941
Matthias Kloseb9621712010-04-24 17:59:49 +00004942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4943$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004944# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004945if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004946 enableval=$enable_profiling; ac_save_cc="$CC"
4947 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004948 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004949 ac_enable_profiling="no"
4950else
Matthias Kloseb9621712010-04-24 17:59:49 +00004951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004952/* end confdefs.h. */
4953int main() { return 0; }
4954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004955if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004956 ac_enable_profiling="yes"
4957else
Matthias Kloseb9621712010-04-24 17:59:49 +00004958 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004959fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004960rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4961 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004962fi
4963
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004964 CC="$ac_save_cc"
4965fi
4966
Matthias Kloseb9621712010-04-24 17:59:49 +00004967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4968$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004969
4970case "$ac_enable_profiling" in
4971 "yes")
4972 BASECFLAGS="-pg $BASECFLAGS"
4973 LDFLAGS="-pg $LDFLAGS"
4974 ;;
4975esac
4976
Matthias Kloseb9621712010-04-24 17:59:49 +00004977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4978$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004979
4980# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4981# library that we build, but we do not want to link against it (we
4982# will find it with a -framework option). For this reason there is an
4983# extra variable BLDLIBRARY against which Python and the extension
4984# modules are linked, BLDLIBRARY. This is normally the same as
4985# LDLIBRARY, but empty for MacOSX framework builds.
4986if test "$enable_framework"
4987then
4988 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4989 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4990 BLDLIBRARY=''
4991else
4992 BLDLIBRARY='$(LDLIBRARY)'
4993fi
4994
4995# Other platforms follow
4996if test $enable_shared = "yes"; then
4997
Matthias Kloseb9621712010-04-24 17:59:49 +00004998$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004999
5000 case $ac_sys_system in
5001 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005002 LDLIBRARY='libpython$(LDVERSION).dll.a'
5003 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005004 ;;
5005 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005006 LDLIBRARY='libpython$(LDVERSION).so'
5007 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005008 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5009 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005010 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005011 then
5012 PY3LIBRARY=libpython3.so
5013 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005014 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005015 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005016 LDLIBRARY='libpython$(LDVERSION).so'
5017 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005018 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5019 case $ac_sys_system in
5020 FreeBSD*)
5021 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5022 ;;
5023 esac
5024 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005025 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005026 then
5027 PY3LIBRARY=libpython3.so
5028 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005029 ;;
5030 hp*|HP*)
5031 case `uname -m` in
5032 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005033 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005034 ;;
5035 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005036 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005037 ;;
5038 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005039 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005040 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5041 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005042 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005043 LDLIBRARY='libpython$(LDVERSION).dylib'
5044 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005045 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5046 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005047 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005048 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005049 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5050 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005051
5052 esac
5053else # shared is disabled
5054 case $ac_sys_system in
5055 CYGWIN*)
5056 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005057 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005058 ;;
5059 esac
5060fi
5061
Matthias Kloseb9621712010-04-24 17:59:49 +00005062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5063$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005064
5065if test -n "$ac_tool_prefix"; then
5066 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5067set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5069$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005070if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005071 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005072else
5073 if test -n "$RANLIB"; then
5074 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5075else
5076as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5077for as_dir in $PATH
5078do
5079 IFS=$as_save_IFS
5080 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005081 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005082 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5083 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005084 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005085 break 2
5086 fi
5087done
Matthias Kloseb9621712010-04-24 17:59:49 +00005088 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005089IFS=$as_save_IFS
5090
5091fi
5092fi
5093RANLIB=$ac_cv_prog_RANLIB
5094if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5096$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005097else
Matthias Kloseb9621712010-04-24 17:59:49 +00005098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5099$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005100fi
5101
5102
5103fi
5104if test -z "$ac_cv_prog_RANLIB"; then
5105 ac_ct_RANLIB=$RANLIB
5106 # Extract the first word of "ranlib", so it can be a program name with args.
5107set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5109$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005110if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005111 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005112else
5113 if test -n "$ac_ct_RANLIB"; then
5114 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5115else
5116as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5117for as_dir in $PATH
5118do
5119 IFS=$as_save_IFS
5120 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005121 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005122 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5123 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005124 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005125 break 2
5126 fi
5127done
Matthias Kloseb9621712010-04-24 17:59:49 +00005128 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005129IFS=$as_save_IFS
5130
5131fi
5132fi
5133ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5134if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5136$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005137else
Matthias Kloseb9621712010-04-24 17:59:49 +00005138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5139$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005140fi
5141
5142 if test "x$ac_ct_RANLIB" = x; then
5143 RANLIB=":"
5144 else
5145 case $cross_compiling:$ac_tool_warned in
5146yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005147{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5148$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005149ac_tool_warned=yes ;;
5150esac
5151 RANLIB=$ac_ct_RANLIB
5152 fi
5153else
5154 RANLIB="$ac_cv_prog_RANLIB"
5155fi
5156
5157
5158for ac_prog in ar aal
5159do
5160 # Extract the first word of "$ac_prog", so it can be a program name with args.
5161set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5163$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005164if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005165 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005166else
5167 if test -n "$AR"; then
5168 ac_cv_prog_AR="$AR" # Let the user override the test.
5169else
5170as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5171for as_dir in $PATH
5172do
5173 IFS=$as_save_IFS
5174 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005175 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005176 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5177 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005178 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005179 break 2
5180 fi
5181done
Matthias Kloseb9621712010-04-24 17:59:49 +00005182 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005183IFS=$as_save_IFS
5184
5185fi
5186fi
5187AR=$ac_cv_prog_AR
5188if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5190$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005191else
Matthias Kloseb9621712010-04-24 17:59:49 +00005192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5193$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005194fi
5195
5196
5197 test -n "$AR" && break
5198done
5199test -n "$AR" || AR="ar"
5200
5201
5202# tweak ARFLAGS only if the user didn't set it on the command line
5203
5204if test -z "$ARFLAGS"
5205then
5206 ARFLAGS="rc"
5207fi
5208
5209
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005210DISABLE_ASDLGEN=""
5211# Extract the first word of "python", so it can be a program name with args.
5212set dummy python; ac_word=$2
5213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5214$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005215if ${ac_cv_prog_HAS_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005216 $as_echo_n "(cached) " >&6
5217else
5218 if test -n "$HAS_PYTHON"; then
5219 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5220else
5221as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5222for as_dir in $PATH
5223do
5224 IFS=$as_save_IFS
5225 test -z "$as_dir" && as_dir=.
5226 for ac_exec_ext in '' $ac_executable_extensions; do
5227 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5228 ac_cv_prog_HAS_PYTHON="found"
5229 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5230 break 2
5231 fi
5232done
5233 done
5234IFS=$as_save_IFS
5235
5236 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5237fi
5238fi
5239HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5240if test -n "$HAS_PYTHON"; then
5241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5242$as_echo "$HAS_PYTHON" >&6; }
5243else
5244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5245$as_echo "no" >&6; }
5246fi
5247
5248
5249if test $HAS_HG != found -o $HAS_PYTHON != found
5250then
5251 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5252fi
5253
5254
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005255case $MACHDEP in
5256bsdos*|hp*|HP*)
5257 # install -d does not work on BSDI or HP-UX
5258 if test -z "$INSTALL"
5259 then
5260 INSTALL="${srcdir}/install-sh -c"
5261 fi
5262esac
5263ac_aux_dir=
5264for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005265 if test -f "$ac_dir/install-sh"; then
5266 ac_aux_dir=$ac_dir
5267 ac_install_sh="$ac_aux_dir/install-sh -c"
5268 break
5269 elif test -f "$ac_dir/install.sh"; then
5270 ac_aux_dir=$ac_dir
5271 ac_install_sh="$ac_aux_dir/install.sh -c"
5272 break
5273 elif test -f "$ac_dir/shtool"; then
5274 ac_aux_dir=$ac_dir
5275 ac_install_sh="$ac_aux_dir/shtool install -c"
5276 break
5277 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005278done
5279if test -z "$ac_aux_dir"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005280 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005281fi
5282
5283# These three variables are undocumented and unsupported,
5284# and are intended to be withdrawn in a future Autoconf release.
5285# They can cause serious problems if a builder's source tree is in a directory
5286# whose full name contains unusual characters.
5287ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5288ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5289ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5290
5291
5292# Find a good install program. We prefer a C program (faster),
5293# so one script is as good as another. But avoid the broken or
5294# incompatible versions:
5295# SysV /etc/install, /usr/sbin/install
5296# SunOS /usr/etc/install
5297# IRIX /sbin/install
5298# AIX /bin/install
5299# AmigaOS /C/install, which installs bootblocks on floppy discs
5300# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5301# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5302# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5303# OS/2's system install, which has a completely different semantic
5304# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005305# Reject install programs that cannot install multiple files.
5306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5307$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005308if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02005309if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005310 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005311else
5312 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5313for as_dir in $PATH
5314do
5315 IFS=$as_save_IFS
5316 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005317 # Account for people who put trailing slashes in PATH elements.
5318case $as_dir/ in #((
5319 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005320 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005321 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005322 /usr/ucb/* ) ;;
5323 *)
5324 # OSF1 and SCO ODT 3.0 have their own names for install.
5325 # Don't use installbsd from OSF since it installs stuff as root
5326 # by default.
5327 for ac_prog in ginstall scoinst install; do
5328 for ac_exec_ext in '' $ac_executable_extensions; do
5329 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5330 if test $ac_prog = install &&
5331 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5332 # AIX install. It has an incompatible calling convention.
5333 :
5334 elif test $ac_prog = install &&
5335 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5336 # program-specific install script used by HP pwplus--don't use.
5337 :
5338 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005339 rm -rf conftest.one conftest.two conftest.dir
5340 echo one > conftest.one
5341 echo two > conftest.two
5342 mkdir conftest.dir
5343 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5344 test -s conftest.one && test -s conftest.two &&
5345 test -s conftest.dir/conftest.one &&
5346 test -s conftest.dir/conftest.two
5347 then
5348 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5349 break 3
5350 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005351 fi
5352 fi
5353 done
5354 done
5355 ;;
5356esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005357
5358 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005359IFS=$as_save_IFS
5360
Matthias Kloseb9621712010-04-24 17:59:49 +00005361rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005362
5363fi
5364 if test "${ac_cv_path_install+set}" = set; then
5365 INSTALL=$ac_cv_path_install
5366 else
5367 # As a last resort, use the slow shell script. Don't cache a
5368 # value for INSTALL within a source directory, because that will
5369 # break other packages using the cache if that directory is
5370 # removed, or if the value is a relative name.
5371 INSTALL=$ac_install_sh
5372 fi
5373fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5375$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005376
5377# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5378# It thinks the first close brace ends the variable substitution.
5379test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5380
5381test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5382
5383test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5384
5385
5386# Not every filesystem supports hard links
5387
5388if test -z "$LN" ; then
5389 case $ac_sys_system in
5390 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005391 *) LN=ln;;
5392 esac
5393fi
5394
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005395# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005396
5397ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005398
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005399# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5401$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005402
5403# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005404if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005405 withval=$with_pydebug;
5406if test "$withval" != no
5407then
5408
Matthias Kloseb9621712010-04-24 17:59:49 +00005409$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005410
Matthias Kloseb9621712010-04-24 17:59:49 +00005411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5412$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005413 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005414 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005415else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5416$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005417fi
5418else
Matthias Kloseb9621712010-04-24 17:59:49 +00005419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5420$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005421fi
5422
5423
5424# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5425# merged with this chunk of code?
5426
5427# Optimizer/debugger flags
5428# ------------------------
5429# (The following bit of code is complicated enough - please keep things
5430# indented properly. Just pretend you're editing Python code. ;-)
5431
5432# There are two parallel sets of case statements below, one that checks to
5433# see if OPT was set and one that does BASECFLAGS setting based upon
5434# compiler and platform. BASECFLAGS tweaks need to be made even if the
5435# user set OPT.
5436
5437# tweak OPT based on compiler and platform, only if the user didn't set
5438# it on the command line
5439
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005440if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005441then
5442 case $GCC in
5443 yes)
5444 if test "$CC" != 'g++' ; then
5445 STRICT_PROTO="-Wstrict-prototypes"
5446 fi
5447 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5448 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5449 WRAP="-fwrapv"
5450 fi
Stefan Krah962055d2011-09-14 15:14:08 +02005451
5452 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01005453 case $CC in
5454 *clang*) WRAP="-fwrapv"
5455 ;;
5456 esac
Stefan Krah962055d2011-09-14 15:14:08 +02005457
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005458 case $ac_cv_prog_cc_g in
5459 yes)
5460 if test "$Py_DEBUG" = 'true' ; then
5461 # Optimization messes up debuggers, so turn it off for
5462 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005463 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005464 else
5465 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5466 fi
5467 ;;
5468 *)
5469 OPT="-O3 -Wall $STRICT_PROTO"
5470 ;;
5471 esac
5472 case $ac_sys_system in
5473 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5474 ;;
5475 esac
5476 ;;
5477
5478 *)
5479 OPT="-O"
5480 ;;
5481 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005482fi
5483
5484
5485
5486# The -arch flags for universal builds on OSX
5487UNIVERSAL_ARCH_FLAGS=
5488
5489
5490# tweak BASECFLAGS based on compiler and platform
5491case $GCC in
5492yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005493 # Python doesn't violate C99 aliasing rules, but older versions of
5494 # GCC produce warnings for legal Python code. Enable
5495 # -fno-strict-aliasing on versions of GCC that support but produce
5496 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5498$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005499 ac_save_cc="$CC"
5500 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005501 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02005502 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005503 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005504else
Matthias Kloseb9621712010-04-24 17:59:49 +00005505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005506/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005507
Matthias Kloseb159a552010-04-25 21:00:44 +00005508
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005509int
5510main ()
5511{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005512
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005513 ;
5514 return 0;
5515}
Matthias Kloseb159a552010-04-25 21:00:44 +00005516
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005518if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005519
5520 CC="$ac_save_cc -fstrict-aliasing"
5521 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005523/* end confdefs.h. */
5524
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005525 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005526int
5527main ()
5528{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005529double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005530 ;
5531 return 0;
5532}
Matthias Kloseb159a552010-04-25 21:00:44 +00005533
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005535if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005536
5537 ac_cv_no_strict_aliasing=no
5538
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005539else
Matthias Kloseb159a552010-04-25 21:00:44 +00005540
5541 ac_cv_no_strict_aliasing=yes
5542
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005543fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005545
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005546else
Matthias Kloseb159a552010-04-25 21:00:44 +00005547
5548 ac_cv_no_strict_aliasing=no
5549
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005550fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005552fi
5553
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005554 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005555 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5557$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005558 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005559 then
5560 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5561 fi
5562
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04005563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
5564$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
5565 ac_save_cc="$CC"
5566 CC="$CC -Wunused-result -Werror"
5567 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02005568 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04005569 $as_echo_n "(cached) " >&6
5570else
5571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5572/* end confdefs.h. */
5573
5574
5575int
5576main ()
5577{
5578
5579 ;
5580 return 0;
5581}
5582
5583_ACEOF
5584if ac_fn_c_try_compile "$LINENO"; then :
5585
5586 ac_cv_disable_unused_result_warning=yes
5587
5588else
5589
5590 ac_cv_disable_unused_result_warning=no
5591
5592fi
5593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5594fi
5595
5596 CFLAGS="$save_CFLAGS"
5597 CC="$ac_save_cc"
5598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
5599$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
5600
5601 if test $ac_cv_disable_unused_result_warning = yes
5602 then
5603 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
5604 fi
5605
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005606 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5607 # support. Without this, treatment of subnormals doesn't follow
5608 # the standard.
5609 case $ac_sys_machine in
5610 alpha*)
5611 BASECFLAGS="$BASECFLAGS -mieee"
5612 ;;
5613 esac
5614
5615 case $ac_sys_system in
5616 SCO_SV*)
5617 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5618 ;;
5619 # is there any other compiler on Darwin besides gcc?
5620 Darwin*)
5621 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5622 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005623 if test "${CC}" = gcc
5624 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5626$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005627 case "${UNIVERSALSDK}" in
5628 */MacOSX10.4u.sdk)
5629 # Build using 10.4 SDK, force usage of gcc when the
5630 # compiler is gcc, otherwise the user will get very
5631 # confusing error messages when building on OSX 10.6
5632 CC=gcc-4.0
5633 CPP=cpp-4.0
5634 ;;
5635 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5637$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005638 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005639
5640
5641 if test "${enable_universalsdk}"; then
5642 UNIVERSAL_ARCH_FLAGS=""
5643 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5644 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5645 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005646 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005647 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5648 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005649 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005650 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005651
5652 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5653 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005654 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005655 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005656
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005657 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5658 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005659 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005660 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005661
5662 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5663 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005664 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005665 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005666
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005667 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005668 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 +00005669
5670 fi
5671
5672
Ronald Oussoren666028b2010-04-18 19:07:43 +00005673 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5674 if test "${UNIVERSALSDK}" != "/"
5675 then
5676 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5677 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005678 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005679 fi
5680 fi
5681
5682 # Calculate the right deployment target for this build.
5683 #
5684 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5685 if test ${cur_target} '>' 10.2; then
5686 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005687 if test ${enable_universalsdk}; then
5688 if test "${UNIVERSAL_ARCHS}" = "all"; then
5689 # Ensure that the default platform for a
5690 # 4-way universal build is OSX 10.5,
5691 # that's the first OS release where
5692 # 4-way builds make sense.
5693 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005694
5695 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5696 cur_target='10.5'
5697
5698 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5699 cur_target='10.5'
5700
5701 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5702 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005703 fi
5704 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005705 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005706 # On Intel macs default to a deployment
5707 # target of 10.4, that's the first OSX
5708 # release with Intel support.
5709 cur_target="10.4"
5710 fi
5711 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712 fi
5713 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5714
5715 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5716 # environment with a value that is the same as what we'll use
5717 # in the Makefile to ensure that we'll get the same compiler
5718 # environment during configure and build time.
5719 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5720 export MACOSX_DEPLOYMENT_TARGET
5721 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5722
5723 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005724 esac
5725 ;;
5726
5727*)
5728 case $ac_sys_system in
5729 OpenUNIX*|UnixWare*)
5730 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5731 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005732 SCO_SV*)
5733 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5734 ;;
5735 esac
5736 ;;
5737esac
5738
5739if test "$Py_DEBUG" = 'true'; then
5740 :
5741else
5742 OPT="-DNDEBUG $OPT"
5743fi
5744
5745if test "$ac_arch_flags"
5746then
5747 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5748fi
5749
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005750# Check whether GCC supports PyArg_ParseTuple format
5751if test "$GCC" = "yes"
5752then
Matthias Kloseb9621712010-04-24 17:59:49 +00005753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5754$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755 save_CFLAGS=$CFLAGS
5756 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005758/* end confdefs.h. */
5759
5760 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005761int
5762main ()
5763{
5764
5765 ;
5766 return 0;
5767}
Matthias Kloseb159a552010-04-25 21:00:44 +00005768
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005770if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005771
Matthias Kloseb159a552010-04-25 21:00:44 +00005772
Matthias Kloseb9621712010-04-24 17:59:49 +00005773$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005774
Matthias Kloseb159a552010-04-25 21:00:44 +00005775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005776$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005777
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778else
Matthias Kloseb159a552010-04-25 21:00:44 +00005779
5780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005781$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782
5783fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5785 CFLAGS=$save_CFLAGS
5786fi
5787
5788# On some compilers, pthreads are available without further options
5789# (e.g. MacOS X). On some of these systems, the compiler will not
5790# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5791# So we have to see first whether pthreads are available without
5792# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5794$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005795if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005796 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797else
Matthias Kloseb9621712010-04-24 17:59:49 +00005798 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005799 ac_cv_pthread_is_default=no
5800else
Matthias Kloseb9621712010-04-24 17:59:49 +00005801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802/* end confdefs.h. */
5803
5804#include <pthread.h>
5805
5806void* routine(void* p){return NULL;}
5807
5808int main(){
5809 pthread_t p;
5810 if(pthread_create(&p,NULL,routine,NULL)!=0)
5811 return 1;
5812 (void)pthread_detach(p);
5813 return 0;
5814}
5815
5816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005817if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005818
5819 ac_cv_pthread_is_default=yes
5820 ac_cv_kthread=no
5821 ac_cv_pthread=no
5822
5823else
Matthias Kloseb9621712010-04-24 17:59:49 +00005824 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005826rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5827 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828fi
5829
5830
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831fi
5832
Matthias Kloseb9621712010-04-24 17:59:49 +00005833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5834$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835
5836
5837if test $ac_cv_pthread_is_default = yes
5838then
5839 ac_cv_kpthread=no
5840else
5841# -Kpthread, 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 -Kpthread,
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 -Kpthread" >&5
5847$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005848if ${ac_cv_kpthread+:} 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 -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005853if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854 ac_cv_kpthread=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_kpthread=yes
5874else
Matthias Kloseb9621712010-04-24 17:59:49 +00005875 ac_cv_kpthread=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_kpthread" >&5
5885$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886fi
5887
5888if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5889then
5890# -Kthread, 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 -Kthread,
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 -Kthread" >&5
5896$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005897if ${ac_cv_kthread+:} 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 -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005902if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903 ac_cv_kthread=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_kthread=yes
5923else
Matthias Kloseb9621712010-04-24 17:59:49 +00005924 ac_cv_kthread=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_kthread" >&5
5934$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935fi
5936
5937if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5938then
5939# -pthread, if available, provides the right #defines
5940# and linker options to make pthread_create available
5941# Some compilers won't report that they do not support -pthread,
5942# so we need to run a program to see whether it really made the
5943# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5945$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005946if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005947 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948else
5949 ac_save_cc="$CC"
5950CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005951if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005952 ac_cv_pthread=no
5953else
Matthias Kloseb9621712010-04-24 17:59:49 +00005954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955/* end confdefs.h. */
5956
5957#include <pthread.h>
5958
5959void* routine(void* p){return NULL;}
5960
5961int main(){
5962 pthread_t p;
5963 if(pthread_create(&p,NULL,routine,NULL)!=0)
5964 return 1;
5965 (void)pthread_detach(p);
5966 return 0;
5967}
5968
5969_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005970if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971 ac_cv_pthread=yes
5972else
Matthias Kloseb9621712010-04-24 17:59:49 +00005973 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005974fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005975rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5976 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005977fi
5978
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005979CC="$ac_save_cc"
5980fi
5981
Matthias Kloseb9621712010-04-24 17:59:49 +00005982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5983$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984fi
5985
5986# If we have set a CC compiler flag for thread support then
5987# check if it works for CXX, too.
5988ac_cv_cxx_thread=no
5989if test ! -z "$CXX"
5990then
Matthias Kloseb9621712010-04-24 17:59:49 +00005991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5992$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993ac_save_cxx="$CXX"
5994
5995if test "$ac_cv_kpthread" = "yes"
5996then
5997 CXX="$CXX -Kpthread"
5998 ac_cv_cxx_thread=yes
5999elif test "$ac_cv_kthread" = "yes"
6000then
6001 CXX="$CXX -Kthread"
6002 ac_cv_cxx_thread=yes
6003elif test "$ac_cv_pthread" = "yes"
6004then
6005 CXX="$CXX -pthread"
6006 ac_cv_cxx_thread=yes
6007fi
6008
6009if test $ac_cv_cxx_thread = yes
6010then
6011 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6012 $CXX -c conftest.$ac_ext 2>&5
6013 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6014 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6015 then
6016 ac_cv_cxx_thread=yes
6017 else
6018 ac_cv_cxx_thread=no
6019 fi
6020 rm -fr conftest*
6021fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6023$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006024fi
6025CXX="$ac_save_cxx"
6026
6027
6028# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6030$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006031if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006032 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006033else
Matthias Kloseb9621712010-04-24 17:59:49 +00006034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006035/* end confdefs.h. */
6036#include <stdlib.h>
6037#include <stdarg.h>
6038#include <string.h>
6039#include <float.h>
6040
6041int
6042main ()
6043{
6044
6045 ;
6046 return 0;
6047}
6048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006049if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006050 ac_cv_header_stdc=yes
6051else
Matthias Kloseb9621712010-04-24 17:59:49 +00006052 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006053fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6055
6056if test $ac_cv_header_stdc = yes; then
6057 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006059/* end confdefs.h. */
6060#include <string.h>
6061
6062_ACEOF
6063if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006064 $EGREP "memchr" >/dev/null 2>&1; then :
6065
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006066else
6067 ac_cv_header_stdc=no
6068fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006069rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006070
6071fi
6072
6073if test $ac_cv_header_stdc = yes; then
6074 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006076/* end confdefs.h. */
6077#include <stdlib.h>
6078
6079_ACEOF
6080if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006081 $EGREP "free" >/dev/null 2>&1; then :
6082
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006083else
6084 ac_cv_header_stdc=no
6085fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006086rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006087
6088fi
6089
6090if test $ac_cv_header_stdc = yes; then
6091 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006092 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006093 :
6094else
Matthias Kloseb9621712010-04-24 17:59:49 +00006095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006096/* end confdefs.h. */
6097#include <ctype.h>
6098#include <stdlib.h>
6099#if ((' ' & 0x0FF) == 0x020)
6100# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6101# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6102#else
6103# define ISLOWER(c) \
6104 (('a' <= (c) && (c) <= 'i') \
6105 || ('j' <= (c) && (c) <= 'r') \
6106 || ('s' <= (c) && (c) <= 'z'))
6107# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6108#endif
6109
6110#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6111int
6112main ()
6113{
6114 int i;
6115 for (i = 0; i < 256; i++)
6116 if (XOR (islower (i), ISLOWER (i))
6117 || toupper (i) != TOUPPER (i))
6118 return 2;
6119 return 0;
6120}
6121_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006122if ac_fn_c_try_run "$LINENO"; then :
6123
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006124else
Matthias Kloseb9621712010-04-24 17:59:49 +00006125 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006126fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006127rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6128 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006129fi
6130
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006131fi
6132fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6134$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006135if test $ac_cv_header_stdc = yes; then
6136
Matthias Kloseb9621712010-04-24 17:59:49 +00006137$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006138
6139fi
6140
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006141for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006142fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006143ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006144sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006145unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006146poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006147sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h \
6148sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006149sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006150sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006151sys/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 -07006152libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006153bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006154do :
6155 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6156ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006157if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006158 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006159#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006160_ACEOF
6161
6162fi
6163
Guido van Rossum627b2d71993-12-24 10:39:16 +00006164done
6165
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006166ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006167for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006168 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6170$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006171if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006172 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006173else
Matthias Kloseb9621712010-04-24 17:59:49 +00006174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006175/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006176#include <sys/types.h>
6177#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006178
Martin v. Löwis11437992002-04-12 09:54:03 +00006179int
6180main ()
6181{
6182if ((DIR *) 0)
6183return 0;
6184 ;
6185 return 0;
6186}
6187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006188if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006189 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006190else
Matthias Kloseb9621712010-04-24 17:59:49 +00006191 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006194fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006195eval ac_res=\$$as_ac_Header
6196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6197$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006198if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006199 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006200#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006201_ACEOF
6202
6203ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006204fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006205
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006206done
6207# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6208if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6210$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006211if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006212 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006213else
Martin v. Löwis11437992002-04-12 09:54:03 +00006214 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006216/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006217
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006218/* Override any GCC internal prototype to avoid an error.
6219 Use char because int might match the return type of a GCC
6220 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006221#ifdef __cplusplus
6222extern "C"
6223#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006224char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006225int
6226main ()
6227{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006228return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006229 ;
6230 return 0;
6231}
6232_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006233for ac_lib in '' dir; do
6234 if test -z "$ac_lib"; then
6235 ac_res="none required"
6236 else
6237 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006238 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006239 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006240 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006241 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006242fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006243rm -f core conftest.err conftest.$ac_objext \
6244 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02006245 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006246 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006248done
Victor Stinnere0be4232011-10-25 13:06:09 +02006249if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006250
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006251else
6252 ac_cv_search_opendir=no
6253fi
6254rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006255LIBS=$ac_func_search_save_LIBS
6256fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6258$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006259ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006260if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006261 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006262
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006263fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006264
Michael W. Hudson54241132001-12-07 15:38:26 +00006265else
Matthias Kloseb9621712010-04-24 17:59:49 +00006266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6267$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006268if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006269 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006270else
6271 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006273/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006274
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006275/* Override any GCC internal prototype to avoid an error.
6276 Use char because int might match the return type of a GCC
6277 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006278#ifdef __cplusplus
6279extern "C"
6280#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006281char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006282int
6283main ()
6284{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006285return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006286 ;
6287 return 0;
6288}
6289_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006290for ac_lib in '' x; do
6291 if test -z "$ac_lib"; then
6292 ac_res="none required"
6293 else
6294 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006295 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006296 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006297 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006298 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006299fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006300rm -f core conftest.err conftest.$ac_objext \
6301 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02006302 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006303 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006305done
Victor Stinnere0be4232011-10-25 13:06:09 +02006306if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006307
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006308else
6309 ac_cv_search_opendir=no
6310fi
6311rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006312LIBS=$ac_func_search_save_LIBS
6313fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6315$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006316ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006317if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006318 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006319
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006320fi
6321
6322fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006323
Matthias Kloseb9621712010-04-24 17:59:49 +00006324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6325$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006326if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006327 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006328else
Matthias Kloseb9621712010-04-24 17:59:49 +00006329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006330/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006331#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006332int
6333main ()
6334{
6335return makedev(0, 0);
6336 ;
6337 return 0;
6338}
6339_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006340if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006341 ac_cv_header_sys_types_h_makedev=yes
6342else
Matthias Kloseb9621712010-04-24 17:59:49 +00006343 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006344fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006345rm -f core conftest.err conftest.$ac_objext \
6346 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006347
6348fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6350$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006351
6352if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006353ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006354if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006355
Matthias Kloseb9621712010-04-24 17:59:49 +00006356$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006357
6358fi
6359
6360
6361
6362 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006363 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006364if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006365
Matthias Kloseb9621712010-04-24 17:59:49 +00006366$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006367
6368fi
6369
6370
6371 fi
6372fi
6373
Michael W. Hudson54241132001-12-07 15:38:26 +00006374
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006375# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
6376for ac_header in net/if.h
6377do :
6378 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
6379#ifdef STDC_HEADERS
6380# include <stdlib.h>
6381# include <stddef.h>
6382#else
6383# ifdef HAVE_STDLIB_H
6384# include <stdlib.h>
6385# endif
6386#endif
6387#ifdef HAVE_SYS_SOCKET_H
6388# include <sys/socket.h>
6389#endif
6390
6391"
Victor Stinnere0be4232011-10-25 13:06:09 +02006392if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006393 cat >>confdefs.h <<_ACEOF
6394#define HAVE_NET_IF_H 1
6395_ACEOF
6396
6397fi
6398
6399done
6400
6401
6402
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006403# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006404for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006405do :
6406 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006407#ifdef HAVE_CURSES_H
6408#include <curses.h>
6409#endif
6410
Matthias Kloseb9621712010-04-24 17:59:49 +00006411"
Victor Stinnere0be4232011-10-25 13:06:09 +02006412if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006413 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006414#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006415_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006416
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006417fi
6418
6419done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006420
6421
Martin v. Löwis11017b12006-01-14 18:12:57 +00006422# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006423for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006424do :
6425 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 +00006426#ifdef HAVE_ASM_TYPES_H
6427#include <asm/types.h>
6428#endif
6429#ifdef HAVE_SYS_SOCKET_H
6430#include <sys/socket.h>
6431#endif
6432
Matthias Kloseb9621712010-04-24 17:59:49 +00006433"
Victor Stinnere0be4232011-10-25 13:06:09 +02006434if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006435 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006436#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006437_ACEOF
6438
6439fi
6440
6441done
6442
6443
Charles-François Natali47413c12011-10-06 19:47:44 +02006444# On Linux, can.h and can/raw.h require sys/socket.h
6445for ac_header in linux/can.h linux/can/raw.h
6446do :
6447 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6448ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
6449#ifdef HAVE_SYS_SOCKET_H
6450#include <sys/socket.h>
6451#endif
6452
6453"
6454if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6455 cat >>confdefs.h <<_ACEOF
6456#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6457_ACEOF
6458
6459fi
6460
6461done
6462
6463
Guido van Rossum627b2d71993-12-24 10:39:16 +00006464# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006465was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6467$as_echo_n "checking for clock_t in time.h... " >&6; }
6468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006469/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006470#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006471
6472_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006473if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006474 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006475 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006476else
Martin v. Löwis11437992002-04-12 09:54:03 +00006477
6478
Matthias Kloseb9621712010-04-24 17:59:49 +00006479$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006480
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006481
Guido van Rossum627b2d71993-12-24 10:39:16 +00006482fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006483rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006484
Matthias Kloseb9621712010-04-24 17:59:49 +00006485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6486$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006487
Matthias Kloseb9621712010-04-24 17:59:49 +00006488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6489$as_echo_n "checking for makedev... " >&6; }
6490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006491/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006492
Jesus Cea740f53a2010-04-28 11:35:30 +00006493#if defined(MAJOR_IN_MKDEV)
6494#include <sys/mkdev.h>
6495#elif defined(MAJOR_IN_SYSMACROS)
6496#include <sys/sysmacros.h>
6497#else
6498#include <sys/types.h>
6499#endif
6500
Neal Norwitz11690112002-07-30 01:08:28 +00006501int
6502main ()
6503{
Jesus Cea740f53a2010-04-28 11:35:30 +00006504
6505 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006506 ;
6507 return 0;
6508}
Matthias Kloseb159a552010-04-25 21:00:44 +00006509
Neal Norwitz11690112002-07-30 01:08:28 +00006510_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006511if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006512 ac_cv_has_makedev=yes
6513else
Matthias Kloseb9621712010-04-24 17:59:49 +00006514 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006515fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006516rm -f core conftest.err conftest.$ac_objext \
6517 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6519$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006520if test "$ac_cv_has_makedev" = "yes"; then
6521
Matthias Kloseb9621712010-04-24 17:59:49 +00006522$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006523
6524fi
6525
Martin v. Löwis399a6892002-10-04 10:22:02 +00006526# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6527# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6528# defined, but the compiler does not support pragma redefine_extname,
6529# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6530# structures (such as rlimit64) without declaring them. As a
6531# work-around, disable LFS on such configurations
6532
6533use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6535$as_echo_n "checking Solaris LFS bug... " >&6; }
6536cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006537/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006538
6539#define _LARGEFILE_SOURCE 1
6540#define _FILE_OFFSET_BITS 64
6541#include <sys/resource.h>
6542
Martin v. Löwis399a6892002-10-04 10:22:02 +00006543int
6544main ()
6545{
6546struct rlimit foo;
6547 ;
6548 return 0;
6549}
6550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006551if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006552 sol_lfs_bug=no
6553else
Matthias Kloseb9621712010-04-24 17:59:49 +00006554 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006555fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6558$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006559if test "$sol_lfs_bug" = "yes"; then
6560 use_lfs=no
6561fi
6562
6563if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006564# Two defines needed to enable largefile support on various platforms
6565# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006566case $ac_sys_system/$ac_sys_release in
6567AIX*)
6568
6569$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6570
6571 ;;
6572esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006573
Matthias Kloseb9621712010-04-24 17:59:49 +00006574$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006575
6576
Matthias Kloseb9621712010-04-24 17:59:49 +00006577$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006578
Martin v. Löwis399a6892002-10-04 10:22:02 +00006579fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006580
Guido van Rossum84e7b241996-08-19 21:59:00 +00006581# Add some code to confdefs.h so that the test for off_t works on SCO
6582cat >> confdefs.h <<\EOF
6583#if defined(SCO_DS)
6584#undef _OFF_T
6585#endif
6586EOF
6587
Guido van Rossumef2255b2000-03-10 22:30:29 +00006588# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006589ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006590if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006591
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006592else
Martin v. Löwis11437992002-04-12 09:54:03 +00006593
6594cat >>confdefs.h <<_ACEOF
6595#define mode_t int
6596_ACEOF
6597
6598fi
6599
Matthias Kloseb9621712010-04-24 17:59:49 +00006600ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006601if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006602
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006603else
Martin v. Löwis11437992002-04-12 09:54:03 +00006604
6605cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006606#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006607_ACEOF
6608
6609fi
6610
Matthias Kloseb9621712010-04-24 17:59:49 +00006611ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006612if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006613
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006614else
Martin v. Löwis11437992002-04-12 09:54:03 +00006615
6616cat >>confdefs.h <<_ACEOF
6617#define pid_t int
6618_ACEOF
6619
6620fi
6621
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006622
Martin v. Löwis11437992002-04-12 09:54:03 +00006623cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006624#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006625_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006626
Matthias Kloseb9621712010-04-24 17:59:49 +00006627ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006628if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006629
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006630else
Martin v. Löwis11437992002-04-12 09:54:03 +00006631
6632cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006633#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006634_ACEOF
6635
6636fi
6637
Matthias Kloseb9621712010-04-24 17:59:49 +00006638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6639$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006640if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006641 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006642else
Matthias Kloseb9621712010-04-24 17:59:49 +00006643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006644/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006645#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006646
6647_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006648if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006649 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006650 ac_cv_type_uid_t=yes
6651else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006652 ac_cv_type_uid_t=no
6653fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006654rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006655
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006656fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6658$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006659if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006660
Matthias Kloseb9621712010-04-24 17:59:49 +00006661$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006662
6663
Matthias Kloseb9621712010-04-24 17:59:49 +00006664$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006665
6666fi
6667
Matthias Kloseb9621712010-04-24 17:59:49 +00006668ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6669case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006670 no|yes) ;; #(
6671 *)
6672
Matthias Kloseb9621712010-04-24 17:59:49 +00006673$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006674
6675
6676cat >>confdefs.h <<_ACEOF
6677#define uint32_t $ac_cv_c_uint32_t
6678_ACEOF
6679;;
6680 esac
6681
Matthias Kloseb9621712010-04-24 17:59:49 +00006682ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6683case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006684 no|yes) ;; #(
6685 *)
6686
Matthias Kloseb9621712010-04-24 17:59:49 +00006687$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006688
6689
6690cat >>confdefs.h <<_ACEOF
6691#define uint64_t $ac_cv_c_uint64_t
6692_ACEOF
6693;;
6694 esac
6695
Matthias Kloseb9621712010-04-24 17:59:49 +00006696ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6697case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006698 no|yes) ;; #(
6699 *)
6700
6701cat >>confdefs.h <<_ACEOF
6702#define int32_t $ac_cv_c_int32_t
6703_ACEOF
6704;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006705esac
6706
Matthias Kloseb9621712010-04-24 17:59:49 +00006707ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6708case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006709 no|yes) ;; #(
6710 *)
6711
6712cat >>confdefs.h <<_ACEOF
6713#define int64_t $ac_cv_c_int64_t
6714_ACEOF
6715;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006716esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006717
Matthias Kloseb9621712010-04-24 17:59:49 +00006718ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006719if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006720
Matthias Kloseb9621712010-04-24 17:59:49 +00006721$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006722
6723fi
6724
Jack Jansendd19cf82001-12-06 22:36:17 +00006725
Michael W. Hudson54241132001-12-07 15:38:26 +00006726# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006727# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006728# The cast to long int works around a bug in the HP C Compiler
6729# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6730# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6731# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6733$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006734if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006735 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006736else
Matthias Kloseb9621712010-04-24 17:59:49 +00006737 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 +00006738
Martin v. Löwis11437992002-04-12 09:54:03 +00006739else
Matthias Kloseb9621712010-04-24 17:59:49 +00006740 if test "$ac_cv_type_int" = yes; then
6741 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6742$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006743as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02006744See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006745 else
6746 ac_cv_sizeof_int=0
6747 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006748fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006749
Martin v. Löwis11437992002-04-12 09:54:03 +00006750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6752$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006753
6754
6755
Martin v. Löwis11437992002-04-12 09:54:03 +00006756cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006757#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006758_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006759
6760
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006761# The cast to long int works around a bug in the HP C Compiler
6762# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6763# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6764# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6766$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006767if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006768 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006769else
Matthias Kloseb9621712010-04-24 17:59:49 +00006770 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 +00006771
Martin v. Löwis11437992002-04-12 09:54:03 +00006772else
Matthias Kloseb9621712010-04-24 17:59:49 +00006773 if test "$ac_cv_type_long" = yes; then
6774 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6775$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006776as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02006777See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006778 else
6779 ac_cv_sizeof_long=0
6780 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006782
Martin v. Löwis11437992002-04-12 09:54:03 +00006783fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6785$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006786
6787
6788
Martin v. Löwis11437992002-04-12 09:54:03 +00006789cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006790#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006791_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006792
6793
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006794# The cast to long int works around a bug in the HP C Compiler
6795# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6796# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6797# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6799$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006800if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006801 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006802else
Matthias Kloseb9621712010-04-24 17:59:49 +00006803 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 +00006804
Martin v. Löwis11437992002-04-12 09:54:03 +00006805else
Matthias Kloseb9621712010-04-24 17:59:49 +00006806 if test "$ac_cv_type_void_p" = yes; then
6807 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6808$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006809as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02006810See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006811 else
6812 ac_cv_sizeof_void_p=0
6813 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006815
Martin v. Löwis11437992002-04-12 09:54:03 +00006816fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6818$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006819
6820
6821
Martin v. Löwis11437992002-04-12 09:54:03 +00006822cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006823#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006824_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006825
6826
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006827# The cast to long int works around a bug in the HP C Compiler
6828# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6829# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6830# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6832$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006833if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006834 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006835else
Matthias Kloseb9621712010-04-24 17:59:49 +00006836 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 +00006837
Martin v. Löwis11437992002-04-12 09:54:03 +00006838else
Matthias Kloseb9621712010-04-24 17:59:49 +00006839 if test "$ac_cv_type_short" = yes; then
6840 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6841$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006842as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02006843See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006844 else
6845 ac_cv_sizeof_short=0
6846 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006848
Martin v. Löwis11437992002-04-12 09:54:03 +00006849fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6851$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006852
6853
6854
Martin v. Löwis11437992002-04-12 09:54:03 +00006855cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006856#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006857_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006858
6859
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006860# The cast to long int works around a bug in the HP C Compiler
6861# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6862# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6863# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6865$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006866if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006867 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006868else
Matthias Kloseb9621712010-04-24 17:59:49 +00006869 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 +00006870
Martin v. Löwis11437992002-04-12 09:54:03 +00006871else
Matthias Kloseb9621712010-04-24 17:59:49 +00006872 if test "$ac_cv_type_float" = yes; then
6873 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6874$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006875as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02006876See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006877 else
6878 ac_cv_sizeof_float=0
6879 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006881
Martin v. Löwis11437992002-04-12 09:54:03 +00006882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6884$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006885
6886
6887
Martin v. Löwis11437992002-04-12 09:54:03 +00006888cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006889#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006890_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006891
6892
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006893# The cast to long int works around a bug in the HP C Compiler
6894# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6895# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6896# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6898$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006899if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006900 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006901else
Matthias Kloseb9621712010-04-24 17:59:49 +00006902 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 +00006903
Martin v. Löwis11437992002-04-12 09:54:03 +00006904else
Matthias Kloseb9621712010-04-24 17:59:49 +00006905 if test "$ac_cv_type_double" = yes; then
6906 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6907$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006908as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02006909See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006910 else
6911 ac_cv_sizeof_double=0
6912 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006913fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006914
Martin v. Löwis11437992002-04-12 09:54:03 +00006915fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6917$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006918
6919
6920
Martin v. Löwis11437992002-04-12 09:54:03 +00006921cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006922#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006923_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006924
6925
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006926# The cast to long int works around a bug in the HP C Compiler
6927# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6928# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6929# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6931$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006932if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006933 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006934else
Matthias Kloseb9621712010-04-24 17:59:49 +00006935 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 +00006936
Martin v. Löwis11437992002-04-12 09:54:03 +00006937else
Matthias Kloseb9621712010-04-24 17:59:49 +00006938 if test "$ac_cv_type_fpos_t" = yes; then
6939 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6940$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006941as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02006942See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006943 else
6944 ac_cv_sizeof_fpos_t=0
6945 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006946fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006947
Martin v. Löwis11437992002-04-12 09:54:03 +00006948fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6950$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006951
6952
6953
Martin v. Löwis11437992002-04-12 09:54:03 +00006954cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006955#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006956_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006957
Michael W. Hudson54241132001-12-07 15:38:26 +00006958
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006959# The cast to long int works around a bug in the HP C Compiler
6960# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6961# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6962# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6964$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006965if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006966 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006967else
Matthias Kloseb9621712010-04-24 17:59:49 +00006968 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 +00006969
Martin v. Löwis18e16552006-02-15 17:27:45 +00006970else
Matthias Kloseb9621712010-04-24 17:59:49 +00006971 if test "$ac_cv_type_size_t" = yes; then
6972 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6973$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006974as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02006975See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006976 else
6977 ac_cv_sizeof_size_t=0
6978 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006980
Martin v. Löwis18e16552006-02-15 17:27:45 +00006981fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6983$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006984
6985
6986
Martin v. Löwis18e16552006-02-15 17:27:45 +00006987cat >>confdefs.h <<_ACEOF
6988#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6989_ACEOF
6990
6991
Christian Heimes400adb02008-02-01 08:12:03 +00006992# The cast to long int works around a bug in the HP C Compiler
6993# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6994# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6995# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6997$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006998if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006999 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007000else
Matthias Kloseb9621712010-04-24 17:59:49 +00007001 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 +00007002
Christian Heimes400adb02008-02-01 08:12:03 +00007003else
Matthias Kloseb9621712010-04-24 17:59:49 +00007004 if test "$ac_cv_type_pid_t" = yes; then
7005 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7006$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007007as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007008See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007009 else
7010 ac_cv_sizeof_pid_t=0
7011 fi
7012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007013
Christian Heimes400adb02008-02-01 08:12:03 +00007014fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7016$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007017
7018
7019
7020cat >>confdefs.h <<_ACEOF
7021#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7022_ACEOF
7023
7024
Michael W. Hudson54241132001-12-07 15:38:26 +00007025
Matthias Kloseb9621712010-04-24 17:59:49 +00007026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7027$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007028have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007030/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007031
Martin v. Löwis11437992002-04-12 09:54:03 +00007032int
7033main ()
7034{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007035long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007036 ;
7037 return 0;
7038}
7039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007040if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007041
7042
Matthias Kloseb9621712010-04-24 17:59:49 +00007043$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007044
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007045 have_long_long=yes
7046
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007047fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7050$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007051if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007052# The cast to long int works around a bug in the HP C Compiler
7053# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7054# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7055# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7057$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007058if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007059 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007060else
Matthias Kloseb9621712010-04-24 17:59:49 +00007061 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 +00007062
Martin v. Löwis11437992002-04-12 09:54:03 +00007063else
Matthias Kloseb9621712010-04-24 17:59:49 +00007064 if test "$ac_cv_type_long_long" = yes; then
7065 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7066$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007067as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007068See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007069 else
7070 ac_cv_sizeof_long_long=0
7071 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007072fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007073
Martin v. Löwis11437992002-04-12 09:54:03 +00007074fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7076$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007077
7078
7079
Martin v. Löwis11437992002-04-12 09:54:03 +00007080cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007081#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007082_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007083
Michael W. Hudson54241132001-12-07 15:38:26 +00007084
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007085fi
7086
Matthias Kloseb9621712010-04-24 17:59:49 +00007087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7088$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007089have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007091/* end confdefs.h. */
7092
7093int
7094main ()
7095{
7096long double x; x = (long double)0;
7097 ;
7098 return 0;
7099}
7100_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007101if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007102
7103
Matthias Kloseb9621712010-04-24 17:59:49 +00007104$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007105
7106 have_long_double=yes
7107
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007108fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7111$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007112if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007113# The cast to long int works around a bug in the HP C Compiler
7114# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7115# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7116# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7118$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007119if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007120 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007121else
Matthias Kloseb9621712010-04-24 17:59:49 +00007122 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 +00007123
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007124else
Matthias Kloseb9621712010-04-24 17:59:49 +00007125 if test "$ac_cv_type_long_double" = yes; then
7126 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7127$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007128as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007129See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007130 else
7131 ac_cv_sizeof_long_double=0
7132 fi
7133fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007134
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007135fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7137$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007138
7139
7140
7141cat >>confdefs.h <<_ACEOF
7142#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7143_ACEOF
7144
7145
7146fi
7147
7148
Matthias Kloseb9621712010-04-24 17:59:49 +00007149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7150$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007151have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007152cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007153/* end confdefs.h. */
7154
7155int
7156main ()
7157{
7158_Bool x; x = (_Bool)0;
7159 ;
7160 return 0;
7161}
7162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007163if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007164
7165
Matthias Kloseb9621712010-04-24 17:59:49 +00007166$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007167
7168 have_c99_bool=yes
7169
Thomas Woutersb2137042007-02-01 18:02:27 +00007170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7173$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007174if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007175# The cast to long int works around a bug in the HP C Compiler
7176# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7177# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7178# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7180$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007181if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007182 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007183else
Matthias Kloseb9621712010-04-24 17:59:49 +00007184 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 +00007185
Thomas Woutersb2137042007-02-01 18:02:27 +00007186else
Matthias Kloseb9621712010-04-24 17:59:49 +00007187 if test "$ac_cv_type__Bool" = yes; then
7188 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7189$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007190as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02007191See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007192 else
7193 ac_cv_sizeof__Bool=0
7194 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007195fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007196
Thomas Woutersb2137042007-02-01 18:02:27 +00007197fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7199$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007200
7201
7202
Thomas Woutersb2137042007-02-01 18:02:27 +00007203cat >>confdefs.h <<_ACEOF
7204#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7205_ACEOF
7206
7207
7208fi
7209
Matthias Kloseb9621712010-04-24 17:59:49 +00007210ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007211 #include <stdint.h>
7212 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007213 #ifdef HAVE_INTTYPES_H
7214 #include <inttypes.h>
7215 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007216"
Victor Stinnere0be4232011-10-25 13:06:09 +02007217if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007218
7219cat >>confdefs.h <<_ACEOF
7220#define HAVE_UINTPTR_T 1
7221_ACEOF
7222
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007223# The cast to long int works around a bug in the HP C Compiler
7224# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7225# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7226# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7228$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007229if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007230 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007231else
Matthias Kloseb9621712010-04-24 17:59:49 +00007232 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 +00007233
Martin v. Löwis11437992002-04-12 09:54:03 +00007234else
Matthias Kloseb9621712010-04-24 17:59:49 +00007235 if test "$ac_cv_type_uintptr_t" = yes; then
7236 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7237$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007238as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007239See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007240 else
7241 ac_cv_sizeof_uintptr_t=0
7242 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007243fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007244
Martin v. Löwis11437992002-04-12 09:54:03 +00007245fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7247$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007248
7249
7250
Martin v. Löwis11437992002-04-12 09:54:03 +00007251cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007252#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007253_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007254
Michael W. Hudson54241132001-12-07 15:38:26 +00007255
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007256fi
7257
Thomas Wouters89f507f2006-12-13 04:49:30 +00007258
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007259# The cast to long int works around a bug in the HP C Compiler
7260# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7261# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7262# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7264$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007265if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007266 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007267else
Matthias Kloseb9621712010-04-24 17:59:49 +00007268 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007269#ifdef HAVE_SYS_TYPES_H
7270#include <sys/types.h>
7271#endif
7272
Matthias Kloseb9621712010-04-24 17:59:49 +00007273"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007274
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007275else
Matthias Kloseb9621712010-04-24 17:59:49 +00007276 if test "$ac_cv_type_off_t" = yes; then
7277 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7278$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007279as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007280See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007281 else
7282 ac_cv_sizeof_off_t=0
7283 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007284fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007285
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007286fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7288$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007289
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007290
7291
Martin v. Löwis11437992002-04-12 09:54:03 +00007292cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007293#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007294_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007295
Michael W. Hudson54241132001-12-07 15:38:26 +00007296
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007297
Matthias Kloseb9621712010-04-24 17:59:49 +00007298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7299$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007300if test "$have_long_long" = yes
7301then
7302if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007303 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007304
Matthias Kloseb9621712010-04-24 17:59:49 +00007305$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007306
Matthias Kloseb9621712010-04-24 17:59:49 +00007307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7308$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007309else
Matthias Kloseb9621712010-04-24 17:59:49 +00007310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7311$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007312fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007313else
Matthias Kloseb9621712010-04-24 17:59:49 +00007314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7315$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007316fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007317
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007318# The cast to long int works around a bug in the HP C Compiler
7319# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7320# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7321# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7323$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007324if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007325 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007326else
Matthias Kloseb9621712010-04-24 17:59:49 +00007327 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007328#ifdef HAVE_SYS_TYPES_H
7329#include <sys/types.h>
7330#endif
7331#ifdef HAVE_TIME_H
7332#include <time.h>
7333#endif
7334
Matthias Kloseb9621712010-04-24 17:59:49 +00007335"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007336
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007337else
Matthias Kloseb9621712010-04-24 17:59:49 +00007338 if test "$ac_cv_type_time_t" = yes; then
7339 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7340$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007341as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007342See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007343 else
7344 ac_cv_sizeof_time_t=0
7345 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007346fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007347
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007348fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7350$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007351
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007352
7353
Martin v. Löwis11437992002-04-12 09:54:03 +00007354cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007355#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007356_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007357
Michael W. Hudson54241132001-12-07 15:38:26 +00007358
7359
Trent Mick635f6fb2000-08-23 21:33:05 +00007360# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007361ac_save_cc="$CC"
7362if test "$ac_cv_kpthread" = "yes"
7363then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007364elif test "$ac_cv_kthread" = "yes"
7365then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007366elif test "$ac_cv_pthread" = "yes"
7367then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007368fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007369
Matthias Kloseb9621712010-04-24 17:59:49 +00007370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7371$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007372have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007374/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007375
7376 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007377int
7378main ()
7379{
Guido van Rossum12580492000-09-24 16:47:19 +00007380pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007381 ;
7382 return 0;
7383}
Matthias Kloseb159a552010-04-25 21:00:44 +00007384
Martin v. Löwis11437992002-04-12 09:54:03 +00007385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007386if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007387 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007388fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7391$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007392if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007393 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007394# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7395# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7396# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7398$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007399if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007400 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007401else
Matthias Kloseb9621712010-04-24 17:59:49 +00007402 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007403#ifdef HAVE_PTHREAD_H
7404#include <pthread.h>
7405#endif
7406
Matthias Kloseb9621712010-04-24 17:59:49 +00007407"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007408
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007409else
Matthias Kloseb9621712010-04-24 17:59:49 +00007410 if test "$ac_cv_type_pthread_t" = yes; then
7411 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7412$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007413as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007414See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007415 else
7416 ac_cv_sizeof_pthread_t=0
7417 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007418fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007419
Trent Mick635f6fb2000-08-23 21:33:05 +00007420fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7422$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007423
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007424
7425
Martin v. Löwis11437992002-04-12 09:54:03 +00007426cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007427#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007428_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007429
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007430
Trent Mick635f6fb2000-08-23 21:33:05 +00007431fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007432CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007433
Michael W. Hudson54241132001-12-07 15:38:26 +00007434
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007435case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007436 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007437 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7438 ;;
7439 Darwin/*)
7440 OTHER_LIBTOOL_OPT=""
7441 ;;
7442esac
7443
7444
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007445ARCH_RUN_32BIT=""
7446
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007447case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007448 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007449 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7450 if test "${enable_universalsdk}"; then
7451 :
7452 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007453 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007454 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007455 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007456 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007457 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007458 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007459 if test ${gcc_version} '<' 4.0
7460 then
7461 LIBTOOL_CRUFT="-lcc_dynamic"
7462 else
7463 LIBTOOL_CRUFT=""
7464 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007465 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007466 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007467else
Matthias Kloseb9621712010-04-24 17:59:49 +00007468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007469/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007470
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007471 #include <unistd.h>
7472 int main(int argc, char*argv[])
7473 {
7474 if (sizeof(long) == 4) {
7475 return 0;
7476 } else {
7477 return 1;
7478 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007479 }
7480
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007482if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007483 ac_osx_32bit=yes
7484else
Matthias Kloseb9621712010-04-24 17:59:49 +00007485 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007486fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007487rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7488 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007489fi
7490
7491
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007492 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007493 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007494 i386)
7495 MACOSX_DEFAULT_ARCH="i386"
7496 ;;
7497 ppc)
7498 MACOSX_DEFAULT_ARCH="ppc"
7499 ;;
7500 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007501 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007502 ;;
7503 esac
7504 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007505 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007506 i386)
7507 MACOSX_DEFAULT_ARCH="x86_64"
7508 ;;
7509 ppc)
7510 MACOSX_DEFAULT_ARCH="ppc64"
7511 ;;
7512 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007513 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007514 ;;
7515 esac
7516
7517 #ARCH_RUN_32BIT="true"
7518 fi
7519
7520 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007521 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007522 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007523esac
7524
Matthias Kloseb9621712010-04-24 17:59:49 +00007525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7526$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007527if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007528then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007529 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007530 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007531 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007532
Matthias Kloseb9621712010-04-24 17:59:49 +00007533$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007534
Matthias Kloseb9621712010-04-24 17:59:49 +00007535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7536$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007537 if test $enable_shared = "yes"
7538 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007539 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 +00007540 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007541else
Matthias Kloseb9621712010-04-24 17:59:49 +00007542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7543$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007544fi
7545
Matthias Kloseb9621712010-04-24 17:59:49 +00007546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7547$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007548case $ac_sys_system/$ac_sys_release in
7549 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007550
Matthias Kloseb9621712010-04-24 17:59:49 +00007551$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007552
Matthias Kloseb9621712010-04-24 17:59:49 +00007553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7554$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007555 ;;
7556 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7558$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007559 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007560esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007561
Guido van Rossum0a516c91994-09-12 10:58:40 +00007562# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007563
Michael W. Hudson54241132001-12-07 15:38:26 +00007564
7565
7566
7567
Benjamin Peterson99f03762010-04-11 22:15:28 +00007568
Thomas Wouters477c8d52006-05-27 19:21:47 +00007569
Georg Brandlb1441c72009-01-03 22:33:39 +00007570
Thomas Wouters477c8d52006-05-27 19:21:47 +00007571cat >>confdefs.h <<_ACEOF
7572#define SHLIB_EXT "$SO"
7573_ACEOF
7574
Guido van Rossum0a516c91994-09-12 10:58:40 +00007575# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007576# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007577# (Shared libraries in this instance are shared modules to be loaded into
7578# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7580$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007581if test -z "$LDSHARED"
7582then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007583 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007584 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007585 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007586 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007587 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007588 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007589 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007590 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007591 if test "$GCC" = "yes" ; then
7592 LDSHARED='$(CC) -shared'
7593 LDCXXSHARED='$(CXX) -shared'
7594 else
7595 LDSHARED='$(CC) -G'
7596 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007597 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007598 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007599 if test "$GCC" = "yes" ; then
7600 LDSHARED='$(CC) -shared'
7601 LDCXXSHARED='$(CXX) -shared'
7602 else
7603 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007604 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00007605 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007606 LDSHARED='$(CC) -bundle'
7607 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007608 if test "$enable_framework" ; then
7609 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007610 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7611 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007612 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007613 else
7614 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007615 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007616 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007617 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007618 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007619 LDSHARED='$(CC) -bundle'
7620 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007621 if test "$enable_framework" ; then
7622 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007623 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7624 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007625 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007626 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007627 # No framework, use the Python app as bundle-loader
7628 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007629 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007630 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007631 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007632 Darwin/*)
7633 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7634 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007635
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007636 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007637 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007638 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007639 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007640 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007641 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7642 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007643 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007644 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007645 LDSHARED='$(CC) -bundle'
7646 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007647 if test "$enable_framework" ; then
7648 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007649 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7650 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007651 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007652 else
7653 # No framework, use the Python app as bundle-loader
7654 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7655 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007656 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007657 fi
7658 fi
7659 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007660 Linux*|GNU*|QNX*)
7661 LDSHARED='$(CC) -shared'
7662 LDCXXSHARED='$(CXX) -shared';;
7663 BSD/OS*/4*)
7664 LDSHARED="gcc -shared"
7665 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007666 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007667 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007668 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007669 LDSHARED='$(CC) -shared'
7670 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007671 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007672 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007673 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007674 OpenBSD*)
7675 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7676 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007677 LDSHARED='$(CC) -shared $(CCSHARED)'
7678 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007679 else
7680 case `uname -r` in
7681 [01].* | 2.[0-7] | 2.[0-7].*)
7682 LDSHARED="ld -Bshareable ${LDFLAGS}"
7683 ;;
7684 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007685 LDSHARED='$(CC) -shared $(CCSHARED)'
7686 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007687 ;;
7688 esac
7689 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007690 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007691 LDSHARED='$(CC) -shared'
7692 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007693 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007694 if test "$GCC" = "yes" ; then
7695 LDSHARED='$(CC) -shared'
7696 LDCXXSHARED='$(CXX) -shared'
7697 else
7698 LDSHARED='$(CC) -G'
7699 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007700 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007701 SCO_SV*)
7702 LDSHARED='$(CC) -Wl,-G,-Bexport'
7703 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7704 CYGWIN*)
7705 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7706 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007707 *) LDSHARED="ld";;
7708 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007709fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7711$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007712LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007713BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007714# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007715# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7717$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007718if test -z "$CCSHARED"
7719then
Guido van Rossum07397971997-04-29 21:49:50 +00007720 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007721 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007722 then CCSHARED="-fPIC";
7723 elif test `uname -p` = sparc;
7724 then CCSHARED="-xcode=pic32";
7725 else CCSHARED="-Kpic";
7726 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007727 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007728 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007729 else CCSHARED="+z";
7730 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007731 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007732 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007733 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007734 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007735 if test "$GCC" = "yes"
7736 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007737 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007738 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007739 SCO_SV*)
7740 if test "$GCC" = "yes"
7741 then CCSHARED="-fPIC"
7742 else CCSHARED="-Kpic -belf"
7743 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007744 IRIX*/6*) case $CC in
7745 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007746 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007747 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007748 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7751$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007752# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007753# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7755$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007756if test -z "$LINKFORSHARED"
7757then
Guido van Rossum07397971997-04-29 21:49:50 +00007758 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007759 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007760 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007761 LINKFORSHARED="-Wl,-E -Wl,+s";;
7762# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007763 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007764 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007765 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007766 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007767 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007768 if test "$enable_framework"
7769 then
Jack Jansenda49e192005-01-07 13:08:22 +00007770 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007771 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007772 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007773 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007774 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007775 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007776 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007777 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7778 then
7779 LINKFORSHARED="-Wl,--export-dynamic"
7780 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007781 SunOS/5*) case $CC in
7782 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007783 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007784 then
7785 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007786 fi;;
7787 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007788 CYGWIN*)
7789 if test $enable_shared = "no"
7790 then
7791 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7792 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007793 QNX*)
7794 # -Wl,-E causes the symbols to be added to the dynamic
7795 # symbol table so that they can be found when a module
7796 # is loaded. -N 2048K causes the stack size to be set
7797 # to 2048 kilobytes so that the stack doesn't overflow
7798 # when running test_compile.py.
7799 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007800 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007801fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7803$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007804
Michael W. Hudson54241132001-12-07 15:38:26 +00007805
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007806
Matthias Kloseb9621712010-04-24 17:59:49 +00007807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7808$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007809if test ! "$LIBRARY" = "$LDLIBRARY"
7810then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007811 case $ac_sys_system in
7812 CYGWIN*)
7813 # Cygwin needs CCSHARED when building extension DLLs
7814 # but not when building the interpreter DLL.
7815 CFLAGSFORSHARED='';;
7816 *)
7817 CFLAGSFORSHARED='$(CCSHARED)'
7818 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007819fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7821$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007822
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007823# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7824# library (with --enable-shared).
7825# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007826# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7827# if it is not required, since it creates a dependency of the shared library
7828# to LIBS. This, in turn, means that applications linking the shared libpython
7829# don't need to link LIBS explicitly. The default should be only changed
7830# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007831
Matthias Kloseb9621712010-04-24 17:59:49 +00007832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7833$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007834case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007835 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007836 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007837esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7839$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007840
7841
Guido van Rossum627b2d71993-12-24 10:39:16 +00007842# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00007843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
7844$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007845if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007846 $as_echo_n "(cached) " >&6
7847else
7848 ac_check_lib_save_LIBS=$LIBS
7849LIBS="-lsendfile $LIBS"
7850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7851/* end confdefs.h. */
7852
7853/* Override any GCC internal prototype to avoid an error.
7854 Use char because int might match the return type of a GCC
7855 builtin and then its argument prototype would still apply. */
7856#ifdef __cplusplus
7857extern "C"
7858#endif
7859char sendfile ();
7860int
7861main ()
7862{
7863return sendfile ();
7864 ;
7865 return 0;
7866}
7867_ACEOF
7868if ac_fn_c_try_link "$LINENO"; then :
7869 ac_cv_lib_sendfile_sendfile=yes
7870else
7871 ac_cv_lib_sendfile_sendfile=no
7872fi
7873rm -f core conftest.err conftest.$ac_objext \
7874 conftest$ac_exeext conftest.$ac_ext
7875LIBS=$ac_check_lib_save_LIBS
7876fi
7877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
7878$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007879if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007880 cat >>confdefs.h <<_ACEOF
7881#define HAVE_LIBSENDFILE 1
7882_ACEOF
7883
7884 LIBS="-lsendfile $LIBS"
7885
7886fi
7887
Matthias Kloseb9621712010-04-24 17:59:49 +00007888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7889$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007890if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007891 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007892else
Martin v. Löwis11437992002-04-12 09:54:03 +00007893 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007894LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007896/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007897
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007898/* Override any GCC internal prototype to avoid an error.
7899 Use char because int might match the return type of a GCC
7900 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007901#ifdef __cplusplus
7902extern "C"
7903#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007904char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007905int
7906main ()
7907{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007908return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007909 ;
7910 return 0;
7911}
7912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007913if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007914 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007915else
Matthias Kloseb9621712010-04-24 17:59:49 +00007916 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007918rm -f core conftest.err conftest.$ac_objext \
7919 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007920LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007921fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7923$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007924if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007925 cat >>confdefs.h <<_ACEOF
7926#define HAVE_LIBDL 1
7927_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007928
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007929 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007930
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007931fi
7932 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7934$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007935if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007936 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007937else
Martin v. Löwis11437992002-04-12 09:54:03 +00007938 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007939LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007941/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007942
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007943/* Override any GCC internal prototype to avoid an error.
7944 Use char because int might match the return type of a GCC
7945 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007946#ifdef __cplusplus
7947extern "C"
7948#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007949char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007950int
7951main ()
7952{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007953return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007954 ;
7955 return 0;
7956}
7957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007958if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007959 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007960else
Matthias Kloseb9621712010-04-24 17:59:49 +00007961 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007962fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007963rm -f core conftest.err conftest.$ac_objext \
7964 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007965LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007966fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7968$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007969if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007970 cat >>confdefs.h <<_ACEOF
7971#define HAVE_LIBDLD 1
7972_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007973
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007974 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007975
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007976fi
7977 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007978
Georg Brandlb1441c72009-01-03 22:33:39 +00007979# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007980if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7982$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007983if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007984 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007985else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007986 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007988/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007989
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007990/* Override any GCC internal prototype to avoid an error.
7991 Use char because int might match the return type of a GCC
7992 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007993#ifdef __cplusplus
7994extern "C"
7995#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007996char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007997int
7998main ()
7999{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008000return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008001 ;
8002 return 0;
8003}
8004_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008005for ac_lib in '' pthread rt posix4; do
8006 if test -z "$ac_lib"; then
8007 ac_res="none required"
8008 else
8009 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008010 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008011 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008012 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008013 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008014fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008015rm -f core conftest.err conftest.$ac_objext \
8016 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008017 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008018 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008019fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008020done
Victor Stinnere0be4232011-10-25 13:06:09 +02008021if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008022
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008023else
8024 ac_cv_search_sem_init=no
8025fi
8026rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008027LIBS=$ac_func_search_save_LIBS
8028fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8030$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008031ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008032if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008033 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008034
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008035fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008036 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008037 # posix4 on Solaris 2.6
8038 # pthread (first!) on Linux
8039fi
8040
Martin v. Löwis19d17342003-06-14 21:03:05 +00008041# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8043$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008044if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008045 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008046else
8047 ac_check_lib_save_LIBS=$LIBS
8048LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008049cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008050/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008051
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008052/* Override any GCC internal prototype to avoid an error.
8053 Use char because int might match the return type of a GCC
8054 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008055#ifdef __cplusplus
8056extern "C"
8057#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008058char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008059int
8060main ()
8061{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008062return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008063 ;
8064 return 0;
8065}
8066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008067if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008068 ac_cv_lib_intl_textdomain=yes
8069else
Matthias Kloseb9621712010-04-24 17:59:49 +00008070 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008071fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008072rm -f core conftest.err conftest.$ac_objext \
8073 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008074LIBS=$ac_check_lib_save_LIBS
8075fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8077$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008078if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008079
Matthias Kloseb9621712010-04-24 17:59:49 +00008080$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008081
Brett Cannonc6d936e2009-06-07 20:09:53 +00008082 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008083fi
8084
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008085
8086# checks for system dependent C++ extensions support
8087case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008088 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8089$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008091/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008092
Georg Brandl59e87bd2011-02-15 19:48:59 +00008093 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008094int
8095main ()
8096{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008097loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008098 ;
8099 return 0;
8100}
Matthias Kloseb159a552010-04-25 21:00:44 +00008101
Martin v. Löwis11437992002-04-12 09:54:03 +00008102_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008103if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008104
Matthias Kloseb159a552010-04-25 21:00:44 +00008105
Matthias Kloseb9621712010-04-24 17:59:49 +00008106$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008107
Matthias Kloseb159a552010-04-25 21:00:44 +00008108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008109$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008110
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008111else
Matthias Kloseb159a552010-04-25 21:00:44 +00008112
8113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008114$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008115
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008116fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008117rm -f core conftest.err conftest.$ac_objext \
8118 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008119 *) ;;
8120esac
8121
Guido van Rossum70c7f481998-03-26 18:44:10 +00008122# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8124$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008125if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008126 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008127else
Martin v. Löwis11437992002-04-12 09:54:03 +00008128 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008129LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008131/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008132
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008133/* Override any GCC internal prototype to avoid an error.
8134 Use char because int might match the return type of a GCC
8135 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008136#ifdef __cplusplus
8137extern "C"
8138#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008139char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008140int
8141main ()
8142{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008143return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008144 ;
8145 return 0;
8146}
8147_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008148if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008149 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008150else
Matthias Kloseb9621712010-04-24 17:59:49 +00008151 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008152fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008153rm -f core conftest.err conftest.$ac_objext \
8154 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008155LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008156fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8158$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008159if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008160 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008161fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008162 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8164$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008165if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008166 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008167else
Martin v. Löwis11437992002-04-12 09:54:03 +00008168 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008169LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008171/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008172
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008173/* Override any GCC internal prototype to avoid an error.
8174 Use char because int might match the return type of a GCC
8175 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008176#ifdef __cplusplus
8177extern "C"
8178#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008179char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008180int
8181main ()
8182{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008183return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008184 ;
8185 return 0;
8186}
8187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008188if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008189 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008190else
Matthias Kloseb9621712010-04-24 17:59:49 +00008191 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008192fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008193rm -f core conftest.err conftest.$ac_objext \
8194 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008195LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008196fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8198$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008199if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008200 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008201fi
8202 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008203
Matthias Kloseb9621712010-04-24 17:59:49 +00008204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8205$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008206
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008207# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008208if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008209 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8211$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008212LIBS="$withval $LIBS"
8213
8214else
Matthias Kloseb9621712010-04-24 17:59:49 +00008215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8216$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008217fi
8218
Guido van Rossum7f43da71994-08-01 12:15:30 +00008219
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008220if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008221 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8222set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8224$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008225if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008226 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008227else
8228 case $PKG_CONFIG in
8229 [\\/]* | ?:[\\/]*)
8230 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8231 ;;
8232 *)
8233 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8234for as_dir in $PATH
8235do
8236 IFS=$as_save_IFS
8237 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008238 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008239 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8240 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008241 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008242 break 2
8243 fi
8244done
Matthias Kloseb9621712010-04-24 17:59:49 +00008245 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008246IFS=$as_save_IFS
8247
8248 ;;
8249esac
8250fi
8251PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8252if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8254$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008255else
Matthias Kloseb9621712010-04-24 17:59:49 +00008256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8257$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008258fi
8259
8260
8261fi
8262if test -z "$ac_cv_path_PKG_CONFIG"; then
8263 ac_pt_PKG_CONFIG=$PKG_CONFIG
8264 # Extract the first word of "pkg-config", so it can be a program name with args.
8265set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8267$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008268if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008269 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008270else
8271 case $ac_pt_PKG_CONFIG in
8272 [\\/]* | ?:[\\/]*)
8273 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8274 ;;
8275 *)
8276 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8277for as_dir in $PATH
8278do
8279 IFS=$as_save_IFS
8280 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008281 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008282 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8283 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008284 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008285 break 2
8286 fi
8287done
Matthias Kloseb9621712010-04-24 17:59:49 +00008288 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008289IFS=$as_save_IFS
8290
8291 ;;
8292esac
8293fi
8294ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8295if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8297$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008298else
Matthias Kloseb9621712010-04-24 17:59:49 +00008299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8300$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008301fi
8302
8303 if test "x$ac_pt_PKG_CONFIG" = x; then
8304 PKG_CONFIG=""
8305 else
8306 case $cross_compiling:$ac_tool_warned in
8307yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008308{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8309$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008310ac_tool_warned=yes ;;
8311esac
8312 PKG_CONFIG=$ac_pt_PKG_CONFIG
8313 fi
8314else
8315 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8316fi
8317
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008318
8319# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8321$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008322
8323# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008324if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008325 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008326else
8327 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008328fi
8329
8330
Matthias Kloseb9621712010-04-24 17:59:49 +00008331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8332$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008333
8334# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8336$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008337
8338# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008339if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008340 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008341else
8342 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008343fi
8344
8345
8346if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008347 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8348else
8349 LIBFFI_INCLUDEDIR=""
8350fi
8351
8352
Matthias Kloseb9621712010-04-24 17:59:49 +00008353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8354$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008355
Benjamin Peterson076ed002010-10-31 17:11:02 +00008356# Check for support for loadable sqlite extensions
8357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8358$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8359# Check whether --enable-loadable-sqlite-extensions was given.
8360if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8361 enableval=$enable_loadable_sqlite_extensions;
8362else
8363 enable_loadable_sqlite_extensions="no"
8364fi
8365
8366
8367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8368$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8369
Matthias Klose55708cc2009-04-30 08:06:49 +00008370# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8372$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008373
8374# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008375if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008376 withval=$with_dbmliborder;
8377if test x$with_dbmliborder = xyes
8378then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008379as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008380else
8381 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8382 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8383 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008384 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008385 fi
8386 done
8387fi
8388fi
8389
Matthias Kloseb9621712010-04-24 17:59:49 +00008390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8391$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008392
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008393# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008394
8395
Matthias Kloseb9621712010-04-24 17:59:49 +00008396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8397$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008398
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008399# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008400if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008401 withval=$with_signal_module;
8402fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008403
8404
8405if test -z "$with_signal_module"
8406then with_signal_module="yes"
8407fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8409$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008410
8411if test "${with_signal_module}" = "yes"; then
8412 USE_SIGNAL_MODULE=""
8413 SIGNAL_OBJS=""
8414else
8415 USE_SIGNAL_MODULE="#"
8416 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8417fi
8418
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008419# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008420
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008421USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008422
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008423
Martin v. Löwis11437992002-04-12 09:54:03 +00008424
8425# Templates for things AC_DEFINEd more than once.
8426# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008427
8428
Martin v. Löwis11437992002-04-12 09:54:03 +00008429
Matthias Kloseb9621712010-04-24 17:59:49 +00008430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8431$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008432
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008433# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008434if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008435 withval=$with_threads;
8436fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008437
8438
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008439# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008440
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008441# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008442if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008443 withval=$with_thread; with_threads=$with_thread
8444fi
8445
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008446
8447if test -z "$with_threads"
8448then with_threads="yes"
8449fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8451$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008452
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008453
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008454if test "$with_threads" = "no"
8455then
8456 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008457elif test "$ac_cv_pthread_is_default" = yes
8458then
Matthias Kloseb9621712010-04-24 17:59:49 +00008459 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008460
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008461 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008462 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008463
8464 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008465 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008466elif test "$ac_cv_kpthread" = "yes"
8467then
8468 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008469 if test "$ac_cv_cxx_thread" = "yes"; then
8470 CXX="$CXX -Kpthread"
8471 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008472 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008473
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008474 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008475 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008476elif test "$ac_cv_kthread" = "yes"
8477then
8478 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008479 if test "$ac_cv_cxx_thread" = "yes"; then
8480 CXX="$CXX -Kthread"
8481 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008482 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008483
8484 posix_threads=yes
8485 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008486elif test "$ac_cv_pthread" = "yes"
8487then
8488 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008489 if test "$ac_cv_cxx_thread" = "yes"; then
8490 CXX="$CXX -pthread"
8491 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008492 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008493
8494 posix_threads=yes
8495 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008496else
8497 if test ! -z "$with_threads" -a -d "$with_threads"
8498 then LDFLAGS="$LDFLAGS -L$with_threads"
8499 fi
8500 if test ! -z "$withval" -a -d "$withval"
8501 then LDFLAGS="$LDFLAGS -L$withval"
8502 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008503
8504 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008505 # define _POSIX_THREADS in unistd.h. Some apparently don't
8506 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8508$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008510/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008511
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008512#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008513#ifdef _POSIX_THREADS
8514yes
8515#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008516
8517_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008518if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008519 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008520 unistd_defines_pthreads=yes
8521else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008522 unistd_defines_pthreads=no
8523fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008524rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008525
Matthias Kloseb9621712010-04-24 17:59:49 +00008526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8527$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008528
Matthias Kloseb9621712010-04-24 17:59:49 +00008529 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008530
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008531 # Just looking for pthread_create in libpthread is not enough:
8532 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8533 # So we really have to include pthread.h, and then link.
8534 _libs=$LIBS
8535 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8537$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008539/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008540#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008541
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008542void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008543int
8544main ()
8545{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008546
8547pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008548 ;
8549 return 0;
8550}
8551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008552if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008553
Matthias Kloseb9621712010-04-24 17:59:49 +00008554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8555$as_echo "yes" >&6; }
8556 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008557
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008558 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008559 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008560else
Martin v. Löwis11437992002-04-12 09:54:03 +00008561
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008562 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008563 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02008564if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008565 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008566
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008567 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008568 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008569else
Guido van Rossumad678af1998-10-02 14:42:15 +00008570
Matthias Kloseb9621712010-04-24 17:59:49 +00008571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8572$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008573if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008574 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008575else
Martin v. Löwis11437992002-04-12 09:54:03 +00008576 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008577LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008579/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008580
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008581/* Override any GCC internal prototype to avoid an error.
8582 Use char because int might match the return type of a GCC
8583 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008584#ifdef __cplusplus
8585extern "C"
8586#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008587char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008588int
8589main ()
8590{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008591return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008592 ;
8593 return 0;
8594}
8595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008596if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008597 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008598else
Matthias Kloseb9621712010-04-24 17:59:49 +00008599 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008600fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008601rm -f core conftest.err conftest.$ac_objext \
8602 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008603LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008604fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8606$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008607if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008608 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008609
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008610 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008611 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008612 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008613else
Greg Steinadf63d62000-07-05 10:38:09 +00008614
Matthias Kloseb9621712010-04-24 17:59:49 +00008615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8616$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008617if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008618 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008619else
Martin v. Löwis11437992002-04-12 09:54:03 +00008620 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008621LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008623/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008624
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008625/* Override any GCC internal prototype to avoid an error.
8626 Use char because int might match the return type of a GCC
8627 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008628#ifdef __cplusplus
8629extern "C"
8630#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008631char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008632int
8633main ()
8634{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008635return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008636 ;
8637 return 0;
8638}
8639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008640if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008641 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008642else
Matthias Kloseb9621712010-04-24 17:59:49 +00008643 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008644fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008645rm -f core conftest.err conftest.$ac_objext \
8646 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008647LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008648fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8650$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008651if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008652 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008653
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008654 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008655 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008656 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008657else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008658
Matthias Kloseb9621712010-04-24 17:59:49 +00008659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8660$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008661if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008662 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008663else
Martin v. Löwis11437992002-04-12 09:54:03 +00008664 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008665LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008667/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008668
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008669/* Override any GCC internal prototype to avoid an error.
8670 Use char because int might match the return type of a GCC
8671 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008672#ifdef __cplusplus
8673extern "C"
8674#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008675char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008676int
8677main ()
8678{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008679return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008680 ;
8681 return 0;
8682}
8683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008684if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008685 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008686else
Matthias Kloseb9621712010-04-24 17:59:49 +00008687 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008689rm -f core conftest.err conftest.$ac_objext \
8690 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008691LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008692fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8694$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008695if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008696 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008697
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008698 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008699 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008700 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008701else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008702
Matthias Kloseb9621712010-04-24 17:59:49 +00008703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8704$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008705if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008706 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008707else
Martin v. Löwis11437992002-04-12 09:54:03 +00008708 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008709LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008712
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008713/* Override any GCC internal prototype to avoid an error.
8714 Use char because int might match the return type of a GCC
8715 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008716#ifdef __cplusplus
8717extern "C"
8718#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008719char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008720int
8721main ()
8722{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008723return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008724 ;
8725 return 0;
8726}
8727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008728if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008729 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008730else
Matthias Kloseb9621712010-04-24 17:59:49 +00008731 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008733rm -f core conftest.err conftest.$ac_objext \
8734 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008735LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008736fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8738$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008739if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008740 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008741
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008742 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008743 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008744 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008745else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008746
Martin v. Löwis130fb172001-07-19 11:00:41 +00008747 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008748fi
8749
Guido van Rossum627b2d71993-12-24 10:39:16 +00008750
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008751fi
8752
Guido van Rossum0be3e491997-05-22 20:33:33 +00008753fi
8754
Guido van Rossum49545951997-12-02 19:28:29 +00008755fi
8756
Guido van Rossumb93a8621998-05-07 13:27:32 +00008757fi
8758
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008760rm -f core conftest.err conftest.$ac_objext \
8761 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008762
Matthias Kloseb9621712010-04-24 17:59:49 +00008763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8764$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008765if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008766 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008767else
Martin v. Löwis11437992002-04-12 09:54:03 +00008768 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008769LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008772
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008773/* Override any GCC internal prototype to avoid an error.
8774 Use char because int might match the return type of a GCC
8775 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008776#ifdef __cplusplus
8777extern "C"
8778#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008779char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008780int
8781main ()
8782{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008783return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008784 ;
8785 return 0;
8786}
8787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008788if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008789 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008790else
Matthias Kloseb9621712010-04-24 17:59:49 +00008791 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008792fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008793rm -f core conftest.err conftest.$ac_objext \
8794 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008795LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008796fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8798$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008799if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008800 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008801
Martin v. Löwis130fb172001-07-19 11:00:41 +00008802 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008803 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008804 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008805fi
8806
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008807
Neal Norwitza978ab02002-11-02 16:58:05 +00008808 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8810$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008811if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008812 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008813else
Martin v. Löwis11437992002-04-12 09:54:03 +00008814 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008815LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008817/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008818
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008819/* Override any GCC internal prototype to avoid an error.
8820 Use char because int might match the return type of a GCC
8821 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008822#ifdef __cplusplus
8823extern "C"
8824#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008825char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008826int
8827main ()
8828{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008829return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008830 ;
8831 return 0;
8832}
8833_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008834if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008835 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008836else
Matthias Kloseb9621712010-04-24 17:59:49 +00008837 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008838fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008839rm -f core conftest.err conftest.$ac_objext \
8840 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008841LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008842fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8844$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008845if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008846 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008847
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008848 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008849 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008850 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008851fi
8852
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008853 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008854fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008855
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008856if test "$posix_threads" = "yes"; then
8857 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008858
Matthias Kloseb9621712010-04-24 17:59:49 +00008859$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008860
8861 fi
8862
8863 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8864 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02008865 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008866$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008867
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008868 ;;
8869 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008870$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008871
8872 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02008873 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00008874$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008875
8876 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008877 esac
8878
Matthias Kloseb9621712010-04-24 17:59:49 +00008879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8880$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008881 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008882 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008883else
Matthias Kloseb9621712010-04-24 17:59:49 +00008884 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008885 ac_cv_pthread_system_supported=no
8886else
Matthias Kloseb9621712010-04-24 17:59:49 +00008887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008888/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008889#include <pthread.h>
8890 void *foo(void *parm) {
8891 return NULL;
8892 }
8893 main() {
8894 pthread_attr_t attr;
8895 pthread_t id;
8896 if (pthread_attr_init(&attr)) exit(-1);
8897 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8898 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8899 exit(0);
8900 }
8901_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008902if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008903 ac_cv_pthread_system_supported=yes
8904else
Matthias Kloseb9621712010-04-24 17:59:49 +00008905 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008906fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008907rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8908 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008909fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008910
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008911
Guido van Rossum627b2d71993-12-24 10:39:16 +00008912fi
8913
Matthias Kloseb9621712010-04-24 17:59:49 +00008914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8915$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008916 if test "$ac_cv_pthread_system_supported" = "yes"; then
8917
Matthias Kloseb9621712010-04-24 17:59:49 +00008918$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008919
8920 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008921 for ac_func in pthread_sigmask
8922do :
8923 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02008924if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008925 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008926#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008927_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008928 case $ac_sys_system in
8929 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008930
Matthias Kloseb9621712010-04-24 17:59:49 +00008931$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008932
8933 ;;
8934 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008935fi
8936done
8937
8938fi
8939
8940
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008941# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008942
Matthias Kloseb9621712010-04-24 17:59:49 +00008943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8944$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008945# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008946if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008947 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008948 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8950$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008951 ipv6=no
8952 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008953 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8954$as_echo "yes" >&6; }
8955 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008956
8957 ipv6=yes
8958 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008959 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008960else
Martin v. Löwis11437992002-04-12 09:54:03 +00008961
Matthias Kloseb9621712010-04-24 17:59:49 +00008962 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008963
Matthias Kloseb9621712010-04-24 17:59:49 +00008964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8965$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008966 ipv6=no
8967
8968else
Matthias Kloseb9621712010-04-24 17:59:49 +00008969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008970/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008971 /* AF_INET6 available check */
8972#include <sys/types.h>
8973#include <sys/socket.h>
8974main()
8975{
8976 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8977 exit(1);
8978 else
8979 exit(0);
8980}
8981
Martin v. Löwis11437992002-04-12 09:54:03 +00008982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008983if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008984
Matthias Kloseb9621712010-04-24 17:59:49 +00008985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8986$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008987 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008988
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008989else
Matthias Kloseb159a552010-04-25 21:00:44 +00008990
Matthias Kloseb9621712010-04-24 17:59:49 +00008991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8992$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008993 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008994
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008995fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008996rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8997 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008998fi
8999
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009000
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009001if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9003$as_echo_n "checking if RFC2553 API is available... " >&6; }
9004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009005/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009006
9007 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009008#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009009int
9010main ()
9011{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009012struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009013 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009014 ;
9015 return 0;
9016}
Matthias Kloseb159a552010-04-25 21:00:44 +00009017
Martin v. Löwis11437992002-04-12 09:54:03 +00009018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009019if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009020
9021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009022$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009023 ipv6=yes
9024
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009025else
Matthias Kloseb159a552010-04-25 21:00:44 +00009026
9027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009028$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009029 ipv6=no
9030
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009031fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009033fi
9034
9035if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009036 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009037
9038fi
9039
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009040fi
9041
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009042
9043ipv6type=unknown
9044ipv6lib=none
9045ipv6trylibc=no
9046
9047if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9049$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009050 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9051 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009052 case $i in
9053 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009055/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009056
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009057#include <netinet/in.h>
9058#ifdef IPV6_INRIA_VERSION
9059yes
9060#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009061_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009062if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009063 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009064 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009065fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009066rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009067
9068 ;;
9069 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009071/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009072
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009073#include <netinet/in.h>
9074#ifdef __KAME__
9075yes
9076#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009077_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009078if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009079 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009080 ipv6type=$i;
9081 ipv6lib=inet6
9082 ipv6libdir=/usr/local/v6/lib
9083 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009084fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009085rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009086
9087 ;;
9088 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009090/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009091
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009092#include <features.h>
9093#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9094yes
9095#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009096_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009097if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009098 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009099 ipv6type=$i;
9100 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009101fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009102rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009103
9104 ;;
9105 linux-inet6)
9106 if test -d /usr/inet6; then
9107 ipv6type=$i
9108 ipv6lib=inet6
9109 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009110 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009111 fi
9112 ;;
9113 solaris)
9114 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009115 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009116 ipv6type=$i
9117 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009118 fi
9119 fi
9120 ;;
9121 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009123/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009124
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009125#include <sys/param.h>
9126#ifdef _TOSHIBA_INET6
9127yes
9128#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009129_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009130if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009131 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009132 ipv6type=$i;
9133 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009134 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009135fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009136rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009137
9138 ;;
9139 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009141/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009142
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009143#include </usr/local/v6/include/sys/v6config.h>
9144#ifdef __V6D__
9145yes
9146#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009147_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009148if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009149 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009150 ipv6type=$i;
9151 ipv6lib=v6;
9152 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009153 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009154fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009155rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009156
9157 ;;
9158 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009160/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009161
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009162#include <sys/param.h>
9163#ifdef _ZETA_MINAMI_INET6
9164yes
9165#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009166_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009167if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009168 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009169 ipv6type=$i;
9170 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009171 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009172fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009173rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009174
9175 ;;
9176 esac
9177 if test "$ipv6type" != "unknown"; then
9178 break
9179 fi
9180 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9182$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009183fi
9184
9185if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9186 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9187 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9188 echo "using lib$ipv6lib"
9189 else
9190 if test $ipv6trylibc = "yes"; then
9191 echo "using libc"
9192 else
9193 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9194 echo "You need to fetch lib$ipv6lib.a from appropriate"
9195 echo 'ipv6 kit and compile beforehand.'
9196 exit 1
9197 fi
9198 fi
9199fi
9200
Matthias Kloseb9621712010-04-24 17:59:49 +00009201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9202$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009204/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009205
9206 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009207int
9208main ()
9209{
9210FSIORefNum fRef = 0
9211 ;
9212 return 0;
9213}
Matthias Kloseb159a552010-04-25 21:00:44 +00009214
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009216if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009217
Matthias Kloseb159a552010-04-25 21:00:44 +00009218
Matthias Kloseb9621712010-04-24 17:59:49 +00009219$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009220
Matthias Kloseb9621712010-04-24 17:59:49 +00009221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9222$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009223
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009224else
Matthias Kloseb159a552010-04-25 21:00:44 +00009225
Matthias Kloseb9621712010-04-24 17:59:49 +00009226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9227$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009228
9229fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9231
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009232# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9234$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009235
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009236# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009237if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009238 withval=$with_doc_strings;
9239fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009240
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009241
9242if test -z "$with_doc_strings"
9243then with_doc_strings="yes"
9244fi
9245if test "$with_doc_strings" != "no"
9246then
9247
Matthias Kloseb9621712010-04-24 17:59:49 +00009248$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009249
9250fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9252$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009253
Antoine Pitrou042b1282010-08-13 21:15:58 +00009254# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9256$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009257
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009258# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009259if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009260 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009261if test "$withval" != no
9262then
9263
Matthias Kloseb9621712010-04-24 17:59:49 +00009264$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009265
Matthias Kloseb9621712010-04-24 17:59:49 +00009266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9267$as_echo "yes" >&6; }
9268else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9269$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009270fi
9271else
Matthias Kloseb9621712010-04-24 17:59:49 +00009272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9273$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009274fi
9275
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009276
9277# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9279$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009280
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009281# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009282if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009283 withval=$with_pymalloc;
9284fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009285
Neil Schemenauera35c6882001-02-27 04:45:05 +00009286
Neil Schemenauer16c22972002-03-22 15:34:49 +00009287if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009288then
9289 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009290 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009291fi
9292if test "$with_pymalloc" != "no"
9293then
Martin v. Löwis11437992002-04-12 09:54:03 +00009294
Matthias Kloseb9621712010-04-24 17:59:49 +00009295$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009296
9297fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9299$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009300
Benjamin Peterson05159c42009-12-03 03:01:27 +00009301# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9303$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009304
9305# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009306if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009307 withval=$with_valgrind;
9308else
9309 with_valgrind=no
9310fi
9311
Matthias Kloseb9621712010-04-24 17:59:49 +00009312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9313$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009314if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009315 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02009316if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009317
Matthias Kloseb9621712010-04-24 17:59:49 +00009318$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009319
9320else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009321 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009322
9323fi
9324
9325
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009326 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009327fi
9328
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009329# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009330
Guido van Rossum98935bf2001-09-05 19:13:16 +00009331DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009332
Guido van Rossume97ee181999-12-20 21:27:22 +00009333# the dlopen() function means we might want to use dynload_shlib.o. some
9334# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009335for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009336do :
9337 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +02009338if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009339 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009340#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009341_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009342
Guido van Rossume97ee181999-12-20 21:27:22 +00009343fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009344done
Guido van Rossume97ee181999-12-20 21:27:22 +00009345
Michael W. Hudson54241132001-12-07 15:38:26 +00009346
Guido van Rossume97ee181999-12-20 21:27:22 +00009347# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9348# loading of modules.
9349
Matthias Kloseb9621712010-04-24 17:59:49 +00009350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9351$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009352if test -z "$DYNLOADFILE"
9353then
9354 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009355 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9356 if test "$ac_cv_func_dlopen" = yes
9357 then DYNLOADFILE="dynload_shlib.o"
9358 else DYNLOADFILE="dynload_aix.o"
9359 fi
9360 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009361 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009362 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9363 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009364 *)
9365 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9366 # out any dynamic loading
9367 if test "$ac_cv_func_dlopen" = yes
9368 then DYNLOADFILE="dynload_shlib.o"
9369 else DYNLOADFILE="dynload_stub.o"
9370 fi
9371 ;;
9372 esac
9373fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9375$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009376if test "$DYNLOADFILE" != "dynload_stub.o"
9377then
Martin v. Löwis11437992002-04-12 09:54:03 +00009378
Matthias Kloseb9621712010-04-24 17:59:49 +00009379$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009380
9381fi
9382
Neil Schemenauer4e425612001-06-19 15:44:15 +00009383# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9384
Michael W. Hudson54241132001-12-07 15:38:26 +00009385
Matthias Kloseb9621712010-04-24 17:59:49 +00009386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9387$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009388if test -z "$MACHDEP_OBJS"
9389then
Jack Jansene578a632001-08-15 01:27:14 +00009390 MACHDEP_OBJS=$extra_machdep_objs
9391else
9392 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009393fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9395$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009396
Guido van Rossum627b2d71993-12-24 10:39:16 +00009397# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009398for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -08009399 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009400 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009401 futimens futimes gai_strerror \
9402 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009403 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07009404 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +01009405 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
9406 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +02009407 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009408 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009409 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009410 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009411 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009412 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009413 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
9414 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +02009415 sigaction sigaltstack siginterrupt sigpending sigrelse \
9416 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009417 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009418 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
9419 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009420do :
9421 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9422ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009423if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009424 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009425#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009426_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009427
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009428fi
9429done
9430
Michael W. Hudson54241132001-12-07 15:38:26 +00009431
Gregory P. Smithdf300d52012-01-21 18:20:15 -08009432ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
9433 #include <dirent.h>
9434"
9435if test "x$ac_cv_have_decl_dirfd" = xyes; then :
9436
9437$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
9438
9439fi
9440
9441
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009442# For some functions, having a definition is not sufficient, since
9443# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9445$as_echo_n "checking for chroot... " >&6; }
9446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009447/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009448#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009449int
9450main ()
9451{
9452void *x=chroot
9453 ;
9454 return 0;
9455}
9456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009457if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009458
Matthias Kloseb9621712010-04-24 17:59:49 +00009459$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009460
Matthias Kloseb159a552010-04-25 21:00:44 +00009461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009462$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009463else
Matthias Kloseb9621712010-04-24 17:59:49 +00009464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9465$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009466
9467fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9470$as_echo_n "checking for link... " >&6; }
9471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009472/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009473#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009474int
9475main ()
9476{
9477void *x=link
9478 ;
9479 return 0;
9480}
9481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009482if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009483
Matthias Kloseb9621712010-04-24 17:59:49 +00009484$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009485
Matthias Kloseb159a552010-04-25 21:00:44 +00009486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009487$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009488else
Matthias Kloseb9621712010-04-24 17:59:49 +00009489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9490$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009491
9492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9495$as_echo_n "checking for symlink... " >&6; }
9496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009497/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009498#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009499int
9500main ()
9501{
9502void *x=symlink
9503 ;
9504 return 0;
9505}
9506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009507if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009508
Matthias Kloseb9621712010-04-24 17:59:49 +00009509$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009510
Matthias Kloseb159a552010-04-25 21:00:44 +00009511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009512$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009513else
Matthias Kloseb9621712010-04-24 17:59:49 +00009514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9515$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009516
9517fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9520$as_echo_n "checking for fchdir... " >&6; }
9521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009522/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009523#include <unistd.h>
9524int
9525main ()
9526{
9527void *x=fchdir
9528 ;
9529 return 0;
9530}
9531_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009532if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009533
Matthias Kloseb9621712010-04-24 17:59:49 +00009534$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009535
Matthias Kloseb159a552010-04-25 21:00:44 +00009536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009537$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009538else
Matthias Kloseb9621712010-04-24 17:59:49 +00009539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9540$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009541
9542fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9545$as_echo_n "checking for fsync... " >&6; }
9546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009547/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009548#include <unistd.h>
9549int
9550main ()
9551{
9552void *x=fsync
9553 ;
9554 return 0;
9555}
9556_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009557if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009558
Matthias Kloseb9621712010-04-24 17:59:49 +00009559$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009560
Matthias Kloseb159a552010-04-25 21:00:44 +00009561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009562$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009563else
Matthias Kloseb9621712010-04-24 17:59:49 +00009564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9565$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009566
9567fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9570$as_echo_n "checking for fdatasync... " >&6; }
9571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009572/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009573#include <unistd.h>
9574int
9575main ()
9576{
9577void *x=fdatasync
9578 ;
9579 return 0;
9580}
9581_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009582if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009583
Matthias Kloseb9621712010-04-24 17:59:49 +00009584$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009585
Matthias Kloseb159a552010-04-25 21:00:44 +00009586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009587$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009588else
Matthias Kloseb9621712010-04-24 17:59:49 +00009589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9590$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009591
9592fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9595$as_echo_n "checking for epoll... " >&6; }
9596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009597/* end confdefs.h. */
9598#include <sys/epoll.h>
9599int
9600main ()
9601{
9602void *x=epoll_create
9603 ;
9604 return 0;
9605}
9606_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009607if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009608
Matthias Kloseb9621712010-04-24 17:59:49 +00009609$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009610
Matthias Kloseb159a552010-04-25 21:00:44 +00009611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009612$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009613else
Matthias Kloseb9621712010-04-24 17:59:49 +00009614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9615$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009616
9617fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -06009619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
9620$as_echo_n "checking for epoll_create1... " >&6; }
9621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9622/* end confdefs.h. */
9623#include <sys/epoll.h>
9624int
9625main ()
9626{
9627void *x=epoll_create1
9628 ;
9629 return 0;
9630}
9631_ACEOF
9632if ac_fn_c_try_compile "$LINENO"; then :
9633
9634$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
9635
9636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9637$as_echo "yes" >&6; }
9638else
9639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9640$as_echo "no" >&6; }
9641
9642fi
9643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9645$as_echo_n "checking for kqueue... " >&6; }
9646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009647/* end confdefs.h. */
9648
9649#include <sys/types.h>
9650#include <sys/event.h>
9651
9652int
9653main ()
9654{
9655int x=kqueue()
9656 ;
9657 return 0;
9658}
9659_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009660if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009661
Matthias Kloseb9621712010-04-24 17:59:49 +00009662$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009663
Matthias Kloseb159a552010-04-25 21:00:44 +00009664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009665$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009666else
Matthias Kloseb9621712010-04-24 17:59:49 +00009667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9668$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009669
9670fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009672# On some systems (eg. FreeBSD 5), we would find a definition of the
9673# functions ctermid_r, setgroups in the library, but no prototype
9674# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9675# address to avoid compiler warnings and potential miscompilations
9676# because of the missing prototypes.
9677
Matthias Kloseb9621712010-04-24 17:59:49 +00009678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9679$as_echo_n "checking for ctermid_r... " >&6; }
9680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009681/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009682
Martin v. Löwisd5843682002-11-21 20:41:28 +00009683#include <stdio.h>
9684
Martin v. Löwisd5843682002-11-21 20:41:28 +00009685int
9686main ()
9687{
9688void* p = ctermid_r
9689 ;
9690 return 0;
9691}
9692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009693if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009694
Matthias Kloseb9621712010-04-24 17:59:49 +00009695$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009696
Matthias Kloseb159a552010-04-25 21:00:44 +00009697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009698$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009699else
Matthias Kloseb9621712010-04-24 17:59:49 +00009700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9701$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009702
9703fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9705
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9707$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009708if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009709 $as_echo_n "(cached) " >&6
9710else
9711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009712/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009713#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009714int
9715main ()
9716{
9717void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009718
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009719 ;
9720 return 0;
9721}
9722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009723if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009724 ac_cv_flock_decl=yes
9725else
9726 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009727
9728fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009730
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009731fi
9732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9733$as_echo "$ac_cv_flock_decl" >&6; }
9734if test "x${ac_cv_flock_decl}" = xyes; then
9735 for ac_func in flock
9736do :
9737 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +02009738if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009739 cat >>confdefs.h <<_ACEOF
9740#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009741_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009742
Antoine Pitroua3000072010-09-07 14:52:42 +00009743else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009745$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009746if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009747 $as_echo_n "(cached) " >&6
9748else
9749 ac_check_lib_save_LIBS=$LIBS
9750LIBS="-lbsd $LIBS"
9751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9752/* end confdefs.h. */
9753
9754/* Override any GCC internal prototype to avoid an error.
9755 Use char because int might match the return type of a GCC
9756 builtin and then its argument prototype would still apply. */
9757#ifdef __cplusplus
9758extern "C"
9759#endif
9760char flock ();
9761int
9762main ()
9763{
9764return flock ();
9765 ;
9766 return 0;
9767}
9768_ACEOF
9769if ac_fn_c_try_link "$LINENO"; then :
9770 ac_cv_lib_bsd_flock=yes
9771else
9772 ac_cv_lib_bsd_flock=no
9773fi
9774rm -f core conftest.err conftest.$ac_objext \
9775 conftest$ac_exeext conftest.$ac_ext
9776LIBS=$ac_check_lib_save_LIBS
9777fi
9778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9779$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009780if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009781 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009782
9783
9784$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9785
9786
9787fi
9788
9789
9790fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009791done
9792
Antoine Pitroua3000072010-09-07 14:52:42 +00009793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009794
Matthias Kloseb9621712010-04-24 17:59:49 +00009795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9796$as_echo_n "checking for getpagesize... " >&6; }
9797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009798/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009799
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009800#include <unistd.h>
9801
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009802int
9803main ()
9804{
9805void* p = getpagesize
9806 ;
9807 return 0;
9808}
9809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009810if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009811
Matthias Kloseb9621712010-04-24 17:59:49 +00009812$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009813
Matthias Kloseb159a552010-04-25 21:00:44 +00009814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009815$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009816else
Matthias Kloseb9621712010-04-24 17:59:49 +00009817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9818$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009819
9820fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009822
Victor Stinner984890f2011-11-24 13:53:38 +01009823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
9824$as_echo_n "checking for broken unsetenv... " >&6; }
9825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9826/* end confdefs.h. */
9827
9828#include <stdlib.h>
9829
9830int
9831main ()
9832{
9833int res = unsetenv("DUMMY")
9834 ;
9835 return 0;
9836}
9837_ACEOF
9838if ac_fn_c_try_compile "$LINENO"; then :
9839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9840$as_echo "no" >&6; }
9841else
9842
9843$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
9844
9845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9846$as_echo "yes" >&6; }
9847
9848fi
9849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9850
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009851for ac_prog in true
9852do
9853 # Extract the first word of "$ac_prog", so it can be a program name with args.
9854set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9856$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009857if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009858 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009859else
9860 if test -n "$TRUE"; then
9861 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9862else
9863as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9864for as_dir in $PATH
9865do
9866 IFS=$as_save_IFS
9867 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009868 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009869 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 +00009870 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009871 $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 +00009872 break 2
9873 fi
9874done
Matthias Kloseb9621712010-04-24 17:59:49 +00009875 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009876IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009877
9878fi
9879fi
9880TRUE=$ac_cv_prog_TRUE
9881if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9883$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009884else
Matthias Kloseb9621712010-04-24 17:59:49 +00009885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9886$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009887fi
9888
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009889
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009890 test -n "$TRUE" && break
9891done
9892test -n "$TRUE" || TRUE="/bin/true"
9893
9894
Matthias Kloseb9621712010-04-24 17:59:49 +00009895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9896$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009897if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009898 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009899else
9900 ac_check_lib_save_LIBS=$LIBS
9901LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009903/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009904
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009905/* Override any GCC internal prototype to avoid an error.
9906 Use char because int might match the return type of a GCC
9907 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009908#ifdef __cplusplus
9909extern "C"
9910#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009911char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009912int
9913main ()
9914{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009915return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009916 ;
9917 return 0;
9918}
9919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009920if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009921 ac_cv_lib_c_inet_aton=yes
9922else
Matthias Kloseb9621712010-04-24 17:59:49 +00009923 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009924fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009925rm -f core conftest.err conftest.$ac_objext \
9926 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009927LIBS=$ac_check_lib_save_LIBS
9928fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9930$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009931if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009932 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009933else
Matthias Kloseb9621712010-04-24 17:59:49 +00009934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9935$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009936if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009937 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009938else
9939 ac_check_lib_save_LIBS=$LIBS
9940LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009942/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009943
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009944/* Override any GCC internal prototype to avoid an error.
9945 Use char because int might match the return type of a GCC
9946 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009947#ifdef __cplusplus
9948extern "C"
9949#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009950char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009951int
9952main ()
9953{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009954return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009955 ;
9956 return 0;
9957}
9958_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009959if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009960 ac_cv_lib_resolv_inet_aton=yes
9961else
Matthias Kloseb9621712010-04-24 17:59:49 +00009962 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009963fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009964rm -f core conftest.err conftest.$ac_objext \
9965 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009966LIBS=$ac_check_lib_save_LIBS
9967fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9969$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009970if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009971 cat >>confdefs.h <<_ACEOF
9972#define HAVE_LIBRESOLV 1
9973_ACEOF
9974
9975 LIBS="-lresolv $LIBS"
9976
9977fi
9978
9979
9980fi
9981
9982
Christian Heimesd0764e22007-12-04 15:00:33 +00009983# On Tru64, chflags seems to be present, but calling it will
9984# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9986$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009987if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009988 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009989else
Matthias Kloseb9621712010-04-24 17:59:49 +00009990 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009991 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009992else
Matthias Kloseb9621712010-04-24 17:59:49 +00009993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009994/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009995
Christian Heimesd0764e22007-12-04 15:00:33 +00009996#include <sys/stat.h>
9997#include <unistd.h>
9998int main(int argc, char*argv[])
9999{
10000 if(chflags(argv[0], 0) != 0)
10001 return 1;
10002 return 0;
10003}
Ned Deily3eb67d52011-06-28 00:00:28 -070010004
Christian Heimesd0764e22007-12-04 15:00:33 +000010005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010006if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010007 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010008else
Matthias Kloseb9621712010-04-24 17:59:49 +000010009 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010010fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010011rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10012 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010013fi
10014
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010015
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010016fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10018$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010019if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010020 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010021if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010022 ac_cv_have_chflags="yes"
10023else
10024 ac_cv_have_chflags="no"
10025fi
10026
10027fi
10028if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010029
Matthias Kloseb9621712010-04-24 17:59:49 +000010030$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010031
10032fi
10033
Matthias Kloseb9621712010-04-24 17:59:49 +000010034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10035$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010036if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010037 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010038else
Matthias Kloseb9621712010-04-24 17:59:49 +000010039 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010040 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010041else
Matthias Kloseb9621712010-04-24 17:59:49 +000010042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010043/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010044
Christian Heimesd0764e22007-12-04 15:00:33 +000010045#include <sys/stat.h>
10046#include <unistd.h>
10047int main(int argc, char*argv[])
10048{
10049 if(lchflags(argv[0], 0) != 0)
10050 return 1;
10051 return 0;
10052}
Ned Deily3eb67d52011-06-28 00:00:28 -070010053
Christian Heimesd0764e22007-12-04 15:00:33 +000010054_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010055if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010056 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010057else
Matthias Kloseb9621712010-04-24 17:59:49 +000010058 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010059fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010060rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10061 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010062fi
10063
10064
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010065fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10067$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010068if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010069 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010070if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010071 ac_cv_have_lchflags="yes"
10072else
10073 ac_cv_have_lchflags="no"
10074fi
10075
10076fi
10077if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010078
Matthias Kloseb9621712010-04-24 17:59:49 +000010079$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010080
10081fi
10082
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010083case $ac_sys_system/$ac_sys_release in
10084Darwin/*)
10085 _CUR_CFLAGS="${CFLAGS}"
10086 _CUR_LDFLAGS="${LDFLAGS}"
10087 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10088 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10089 ;;
10090esac
10091
Matthias Kloseb9621712010-04-24 17:59:49 +000010092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10093$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010094if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010095 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010096else
10097 ac_check_lib_save_LIBS=$LIBS
10098LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010099cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010100/* end confdefs.h. */
10101
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010102/* Override any GCC internal prototype to avoid an error.
10103 Use char because int might match the return type of a GCC
10104 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010105#ifdef __cplusplus
10106extern "C"
10107#endif
10108char inflateCopy ();
10109int
10110main ()
10111{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010112return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010113 ;
10114 return 0;
10115}
10116_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010117if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010118 ac_cv_lib_z_inflateCopy=yes
10119else
Matthias Kloseb9621712010-04-24 17:59:49 +000010120 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010121fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010122rm -f core conftest.err conftest.$ac_objext \
10123 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010124LIBS=$ac_check_lib_save_LIBS
10125fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10127$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010128if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010129
Matthias Kloseb9621712010-04-24 17:59:49 +000010130$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010131
10132fi
10133
10134
10135case $ac_sys_system/$ac_sys_release in
10136Darwin/*)
10137 CFLAGS="${_CUR_CFLAGS}"
10138 LDFLAGS="${_CUR_LDFLAGS}"
10139 ;;
10140esac
10141
Matthias Kloseb9621712010-04-24 17:59:49 +000010142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10143$as_echo_n "checking for hstrerror... " >&6; }
10144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010145/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010146
Martin v. Löwise9416172003-05-03 10:12:45 +000010147#include <netdb.h>
10148
Martin v. Löwise9416172003-05-03 10:12:45 +000010149int
10150main ()
10151{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010152void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010153 ;
10154 return 0;
10155}
10156_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010157if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010158
Matthias Kloseb9621712010-04-24 17:59:49 +000010159$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010160
Matthias Kloseb159a552010-04-25 21:00:44 +000010161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010162$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010163else
Matthias Kloseb9621712010-04-24 17:59:49 +000010164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10165$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010166
10167fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010168rm -f core conftest.err conftest.$ac_objext \
10169 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010170
Matthias Kloseb9621712010-04-24 17:59:49 +000010171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10172$as_echo_n "checking for inet_aton... " >&6; }
10173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010174/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010175
Martin v. Löwis86d66262006-02-17 08:40:11 +000010176#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010177#include <sys/socket.h>
10178#include <netinet/in.h>
10179#include <arpa/inet.h>
10180
Martin v. Löwise9416172003-05-03 10:12:45 +000010181int
10182main ()
10183{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010184void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010185 ;
10186 return 0;
10187}
10188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010189if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010190
Matthias Kloseb9621712010-04-24 17:59:49 +000010191$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010192
Matthias Kloseb159a552010-04-25 21:00:44 +000010193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010194$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010195else
Matthias Kloseb9621712010-04-24 17:59:49 +000010196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10197$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010198
10199fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010200rm -f core conftest.err conftest.$ac_objext \
10201 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010202
Matthias Kloseb9621712010-04-24 17:59:49 +000010203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10204$as_echo_n "checking for inet_pton... " >&6; }
10205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010206/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010207
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010208#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010209#include <sys/socket.h>
10210#include <netinet/in.h>
10211#include <arpa/inet.h>
10212
Martin v. Löwise9416172003-05-03 10:12:45 +000010213int
10214main ()
10215{
10216void* p = inet_pton
10217 ;
10218 return 0;
10219}
10220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010221if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010222
Matthias Kloseb9621712010-04-24 17:59:49 +000010223$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010224
Matthias Kloseb159a552010-04-25 21:00:44 +000010225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010226$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010227else
Matthias Kloseb9621712010-04-24 17:59:49 +000010228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10229$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010230
10231fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010233
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010234# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10236$as_echo_n "checking for setgroups... " >&6; }
10237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010238/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010239
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010240#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010241#ifdef HAVE_GRP_H
10242#include <grp.h>
10243#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010244
Martin v. Löwisd5843682002-11-21 20:41:28 +000010245int
10246main ()
10247{
10248void* p = setgroups
10249 ;
10250 return 0;
10251}
10252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010253if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010254
Matthias Kloseb9621712010-04-24 17:59:49 +000010255$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010256
Matthias Kloseb159a552010-04-25 21:00:44 +000010257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010258$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010259else
Matthias Kloseb9621712010-04-24 17:59:49 +000010260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10261$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010262
10263fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010265
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010266# check for openpty and forkpty
10267
10268for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010269do :
10270 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020010271if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010272 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010273#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010274_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010275
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010276else
Matthias Kloseb9621712010-04-24 17:59:49 +000010277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10278$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010279if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010280 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010281else
Martin v. Löwis11437992002-04-12 09:54:03 +000010282 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010283LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010284cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010285/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010286
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010287/* Override any GCC internal prototype to avoid an error.
10288 Use char because int might match the return type of a GCC
10289 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010290#ifdef __cplusplus
10291extern "C"
10292#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010293char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010294int
10295main ()
10296{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010297return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010298 ;
10299 return 0;
10300}
10301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010302if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010303 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010304else
Matthias Kloseb9621712010-04-24 17:59:49 +000010305 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010306fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010307rm -f core conftest.err conftest.$ac_objext \
10308 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010309LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010310fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10312$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010313if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010314 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010315 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010316else
Matthias Kloseb9621712010-04-24 17:59:49 +000010317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10318$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010319if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010320 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010321else
10322 ac_check_lib_save_LIBS=$LIBS
10323LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010325/* end confdefs.h. */
10326
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010327/* Override any GCC internal prototype to avoid an error.
10328 Use char because int might match the return type of a GCC
10329 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010330#ifdef __cplusplus
10331extern "C"
10332#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010333char openpty ();
10334int
10335main ()
10336{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010337return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010338 ;
10339 return 0;
10340}
10341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010342if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010343 ac_cv_lib_bsd_openpty=yes
10344else
Matthias Kloseb9621712010-04-24 17:59:49 +000010345 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010346fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010347rm -f core conftest.err conftest.$ac_objext \
10348 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010349LIBS=$ac_check_lib_save_LIBS
10350fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10352$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010353if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010354 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010355 LIBS="$LIBS -lbsd"
10356fi
10357
10358
10359fi
10360
Fred Drake8cef4cf2000-06-28 16:40:38 +000010361
10362fi
10363done
10364
10365for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010366do :
10367 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020010368if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010369 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010370#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010371_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010372
Fred Drake8cef4cf2000-06-28 16:40:38 +000010373else
Matthias Kloseb9621712010-04-24 17:59:49 +000010374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10375$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010376if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010377 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010378else
Martin v. Löwis11437992002-04-12 09:54:03 +000010379 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010380LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010381cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010382/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010383
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010384/* Override any GCC internal prototype to avoid an error.
10385 Use char because int might match the return type of a GCC
10386 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010387#ifdef __cplusplus
10388extern "C"
10389#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010390char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010391int
10392main ()
10393{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010394return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010395 ;
10396 return 0;
10397}
10398_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010399if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010400 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010401else
Matthias Kloseb9621712010-04-24 17:59:49 +000010402 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010403fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010404rm -f core conftest.err conftest.$ac_objext \
10405 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010406LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010407fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10409$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010410if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010411 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010412 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010413else
Matthias Kloseb9621712010-04-24 17:59:49 +000010414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10415$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010416if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010417 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010418else
10419 ac_check_lib_save_LIBS=$LIBS
10420LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010422/* end confdefs.h. */
10423
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010424/* Override any GCC internal prototype to avoid an error.
10425 Use char because int might match the return type of a GCC
10426 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010427#ifdef __cplusplus
10428extern "C"
10429#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010430char forkpty ();
10431int
10432main ()
10433{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010434return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010435 ;
10436 return 0;
10437}
10438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010439if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010440 ac_cv_lib_bsd_forkpty=yes
10441else
Matthias Kloseb9621712010-04-24 17:59:49 +000010442 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010443fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010444rm -f core conftest.err conftest.$ac_objext \
10445 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010446LIBS=$ac_check_lib_save_LIBS
10447fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10449$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010450if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010451 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010452 LIBS="$LIBS -lbsd"
10453fi
10454
10455
10456fi
10457
Fred Drake8cef4cf2000-06-28 16:40:38 +000010458
10459fi
10460done
10461
Jack Jansendd19cf82001-12-06 22:36:17 +000010462
Christian Heimesb186d002008-03-18 15:15:01 +000010463# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010464for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010465do :
10466 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020010467if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010468 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010469#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010470_ACEOF
10471
10472fi
10473done
10474
10475
Michael W. Hudson54241132001-12-07 15:38:26 +000010476# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010477for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010478do :
10479 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10480ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010481if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010482 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010483#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010484_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010485
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010486fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010487done
10488
Michael W. Hudson54241132001-12-07 15:38:26 +000010489
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010490ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020010491if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010492 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010493
Martin v. Löwis1142de32002-03-29 16:28:31 +000010494else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010495 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010496 *" dup2.$ac_objext "* ) ;;
10497 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010498 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010499esac
10500
Martin v. Löwis1142de32002-03-29 16:28:31 +000010501fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010502
10503ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020010504if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010505 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10506
10507else
10508 case " $LIBOBJS " in
10509 *" getcwd.$ac_objext "* ) ;;
10510 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10511 ;;
10512esac
10513
10514fi
10515
10516ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020010517if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010518 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10519
10520else
10521 case " $LIBOBJS " in
10522 *" strdup.$ac_objext "* ) ;;
10523 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10524 ;;
10525esac
10526
10527fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010528
10529
10530for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010531do :
10532 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020010533if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010534 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010535#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010536_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010538/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010539#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010540int
10541main ()
10542{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010543getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010544 ;
10545 return 0;
10546}
10547_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010548if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010549
Matthias Kloseb9621712010-04-24 17:59:49 +000010550$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010551
Guido van Rossum627b2d71993-12-24 10:39:16 +000010552fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010554
Guido van Rossum627b2d71993-12-24 10:39:16 +000010555fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010556done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010557
Jack Jansen150753c2003-03-29 22:07:47 +000010558for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010559do :
10560 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020010561if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010562 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010563#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010566/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010567#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010568int
10569main ()
10570{
10571setpgrp(0,0);
10572 ;
10573 return 0;
10574}
10575_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010576if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010577
Matthias Kloseb9621712010-04-24 17:59:49 +000010578$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010579
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010580fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010582
10583fi
10584done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010585
Thomas Wouters3a584202000-08-05 23:28:51 +000010586for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010587do :
10588 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020010589if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010590 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010591#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010592_ACEOF
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. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010595#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010596int
10597main ()
10598{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010599gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010600 ;
10601 return 0;
10602}
10603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010604if ac_fn_c_try_compile "$LINENO"; then :
10605
Guido van Rossum627b2d71993-12-24 10:39:16 +000010606else
Skip Montanaro6dead952003-09-25 14:50:04 +000010607
Matthias Kloseb9621712010-04-24 17:59:49 +000010608$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010609
Martin v. Löwis11437992002-04-12 09:54:03 +000010610
Guido van Rossum627b2d71993-12-24 10:39:16 +000010611fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010613
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010614fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010615done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010616
Michael W. Hudson54241132001-12-07 15:38:26 +000010617
Victor Stinnere0be4232011-10-25 13:06:09 +020010618for ac_func in clock_gettime
10619do :
10620 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
10621if test "x$ac_cv_func_clock_gettime" = xyes; then :
10622 cat >>confdefs.h <<_ACEOF
10623#define HAVE_CLOCK_GETTIME 1
10624_ACEOF
10625
10626else
10627
10628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
10629$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
10630if ${ac_cv_lib_rt_clock_gettime+:} false; then :
10631 $as_echo_n "(cached) " >&6
10632else
10633 ac_check_lib_save_LIBS=$LIBS
10634LIBS="-lrt $LIBS"
10635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10636/* end confdefs.h. */
10637
10638/* Override any GCC internal prototype to avoid an error.
10639 Use char because int might match the return type of a GCC
10640 builtin and then its argument prototype would still apply. */
10641#ifdef __cplusplus
10642extern "C"
10643#endif
10644char clock_gettime ();
10645int
10646main ()
10647{
10648return clock_gettime ();
10649 ;
10650 return 0;
10651}
10652_ACEOF
10653if ac_fn_c_try_link "$LINENO"; then :
10654 ac_cv_lib_rt_clock_gettime=yes
10655else
10656 ac_cv_lib_rt_clock_gettime=no
10657fi
10658rm -f core conftest.err conftest.$ac_objext \
10659 conftest$ac_exeext conftest.$ac_ext
10660LIBS=$ac_check_lib_save_LIBS
10661fi
10662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
10663$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
10664if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
10665
10666 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
10667
10668
10669$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
10670
10671
10672fi
10673
10674
10675fi
10676done
10677
10678
10679for ac_func in clock_getres
10680do :
10681 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
10682if test "x$ac_cv_func_clock_getres" = xyes; then :
10683 cat >>confdefs.h <<_ACEOF
10684#define HAVE_CLOCK_GETRES 1
10685_ACEOF
10686
10687else
10688
10689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
10690$as_echo_n "checking for clock_getres in -lrt... " >&6; }
10691if ${ac_cv_lib_rt_clock_getres+:} false; then :
10692 $as_echo_n "(cached) " >&6
10693else
10694 ac_check_lib_save_LIBS=$LIBS
10695LIBS="-lrt $LIBS"
10696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10697/* end confdefs.h. */
10698
10699/* Override any GCC internal prototype to avoid an error.
10700 Use char because int might match the return type of a GCC
10701 builtin and then its argument prototype would still apply. */
10702#ifdef __cplusplus
10703extern "C"
10704#endif
10705char clock_getres ();
10706int
10707main ()
10708{
10709return clock_getres ();
10710 ;
10711 return 0;
10712}
10713_ACEOF
10714if ac_fn_c_try_link "$LINENO"; then :
10715 ac_cv_lib_rt_clock_getres=yes
10716else
10717 ac_cv_lib_rt_clock_getres=no
10718fi
10719rm -f core conftest.err conftest.$ac_objext \
10720 conftest$ac_exeext conftest.$ac_ext
10721LIBS=$ac_check_lib_save_LIBS
10722fi
10723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
10724$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
10725if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
10726
10727 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
10728
10729
10730fi
10731
10732
10733fi
10734done
10735
10736
Matthias Kloseb9621712010-04-24 17:59:49 +000010737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10738$as_echo_n "checking for major... " >&6; }
10739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010740/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010741
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010742#if defined(MAJOR_IN_MKDEV)
10743#include <sys/mkdev.h>
10744#elif defined(MAJOR_IN_SYSMACROS)
10745#include <sys/sysmacros.h>
10746#else
10747#include <sys/types.h>
10748#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010749
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010750int
10751main ()
10752{
10753
10754 makedev(major(0),minor(0));
10755
10756 ;
10757 return 0;
10758}
10759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010760if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010761
10762
Matthias Kloseb9621712010-04-24 17:59:49 +000010763$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010764
Matthias Kloseb9621712010-04-24 17:59:49 +000010765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10766$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010767
10768else
Skip Montanaro6dead952003-09-25 14:50:04 +000010769
Matthias Kloseb9621712010-04-24 17:59:49 +000010770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10771$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010772
10773fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010774rm -f core conftest.err conftest.$ac_objext \
10775 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010776
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010777# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010778# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10780$as_echo_n "checking for getaddrinfo... " >&6; }
10781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010782/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010783
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010784#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010785#include <sys/socket.h>
10786#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010787#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010788
Martin v. Löwis11437992002-04-12 09:54:03 +000010789int
10790main ()
10791{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010792getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010793 ;
10794 return 0;
10795}
10796_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010797if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010798 have_getaddrinfo=yes
10799else
Matthias Kloseb9621712010-04-24 17:59:49 +000010800 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010801fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010802rm -f core conftest.err conftest.$ac_objext \
10803 conftest$ac_exeext conftest.$ac_ext
10804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10805$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010806if test $have_getaddrinfo = yes
10807then
Matthias Kloseb9621712010-04-24 17:59:49 +000010808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10809$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010810 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010811 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010812else
Matthias Kloseb9621712010-04-24 17:59:49 +000010813 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010814 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010815else
Matthias Kloseb9621712010-04-24 17:59:49 +000010816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010817/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010818
10819#include <sys/types.h>
10820#include <netdb.h>
10821#include <string.h>
10822#include <sys/socket.h>
10823#include <netinet/in.h>
10824
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010825int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010826{
10827 int passive, gaierr, inet4 = 0, inet6 = 0;
10828 struct addrinfo hints, *ai, *aitop;
10829 char straddr[INET6_ADDRSTRLEN], strport[16];
10830
10831 for (passive = 0; passive <= 1; passive++) {
10832 memset(&hints, 0, sizeof(hints));
10833 hints.ai_family = AF_UNSPEC;
10834 hints.ai_flags = passive ? AI_PASSIVE : 0;
10835 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010836 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010837 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10838 (void)gai_strerror(gaierr);
10839 goto bad;
10840 }
10841 for (ai = aitop; ai; ai = ai->ai_next) {
10842 if (ai->ai_addr == NULL ||
10843 ai->ai_addrlen == 0 ||
10844 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10845 straddr, sizeof(straddr), strport, sizeof(strport),
10846 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10847 goto bad;
10848 }
10849 switch (ai->ai_family) {
10850 case AF_INET:
10851 if (strcmp(strport, "54321") != 0) {
10852 goto bad;
10853 }
10854 if (passive) {
10855 if (strcmp(straddr, "0.0.0.0") != 0) {
10856 goto bad;
10857 }
10858 } else {
10859 if (strcmp(straddr, "127.0.0.1") != 0) {
10860 goto bad;
10861 }
10862 }
10863 inet4++;
10864 break;
10865 case AF_INET6:
10866 if (strcmp(strport, "54321") != 0) {
10867 goto bad;
10868 }
10869 if (passive) {
10870 if (strcmp(straddr, "::") != 0) {
10871 goto bad;
10872 }
10873 } else {
10874 if (strcmp(straddr, "::1") != 0) {
10875 goto bad;
10876 }
10877 }
10878 inet6++;
10879 break;
10880 case AF_UNSPEC:
10881 goto bad;
10882 break;
10883 default:
10884 /* another family support? */
10885 break;
10886 }
10887 }
10888 }
10889
10890 if (!(inet4 == 0 || inet4 == 2))
10891 goto bad;
10892 if (!(inet6 == 0 || inet6 == 2))
10893 goto bad;
10894
10895 if (aitop)
10896 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010897 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010898
10899 bad:
10900 if (aitop)
10901 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010902 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010903}
10904
Martin v. Löwis11437992002-04-12 09:54:03 +000010905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010906if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010907 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010908else
Matthias Kloseb9621712010-04-24 17:59:49 +000010909 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010910fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010911rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10912 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010913fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010914
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010915fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010916
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010917fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010918
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10920$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10921
Mark Dickinson2df5d282009-12-31 21:22:50 +000010922if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010923then
10924 if test $ipv6 = yes
10925 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010926 echo 'Fatal: You must get working getaddrinfo() function.'
10927 echo ' or you can specify "--disable-ipv6"'.
10928 exit 1
10929 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010930else
Martin v. Löwis11437992002-04-12 09:54:03 +000010931
Matthias Kloseb9621712010-04-24 17:59:49 +000010932$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010933
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010934fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010935
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010936for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010937do :
10938 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020010939if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010940 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010941#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010942_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010943
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010944fi
10945done
10946
Michael W. Hudson54241132001-12-07 15:38:26 +000010947
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010948# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10950$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010951if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010952 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010953else
Matthias Kloseb9621712010-04-24 17:59:49 +000010954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010955/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010956#include <sys/types.h>
10957#include <sys/time.h>
10958#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010959
Martin v. Löwis11437992002-04-12 09:54:03 +000010960int
10961main ()
10962{
10963if ((struct tm *) 0)
10964return 0;
10965 ;
10966 return 0;
10967}
10968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010969if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010970 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010971else
Matthias Kloseb9621712010-04-24 17:59:49 +000010972 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010973fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010975fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10977$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010978if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010979
Matthias Kloseb9621712010-04-24 17:59:49 +000010980$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010981
10982fi
10983
Matthias Kloseb9621712010-04-24 17:59:49 +000010984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10985$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010986if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010987 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010988else
Matthias Kloseb9621712010-04-24 17:59:49 +000010989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010990/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010991#include <sys/types.h>
10992#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010993
Martin v. Löwis11437992002-04-12 09:54:03 +000010994int
10995main ()
10996{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010997struct tm tm;
10998 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010999 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011000 ;
11001 return 0;
11002}
11003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011004if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011005 ac_cv_struct_tm=time.h
11006else
Matthias Kloseb9621712010-04-24 17:59:49 +000011007 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011008fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011010fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11012$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011013if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011014
Matthias Kloseb9621712010-04-24 17:59:49 +000011015$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011016
11017fi
11018
Matthias Kloseb9621712010-04-24 17:59:49 +000011019ac_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 +000011020#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011021
Matthias Kloseb9621712010-04-24 17:59:49 +000011022"
Victor Stinnere0be4232011-10-25 13:06:09 +020011023if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011024
11025cat >>confdefs.h <<_ACEOF
11026#define HAVE_STRUCT_TM_TM_ZONE 1
11027_ACEOF
11028
11029
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011030fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011031
Martin v. Löwis11437992002-04-12 09:54:03 +000011032if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11033
Matthias Kloseb9621712010-04-24 17:59:49 +000011034$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011035
11036else
Matthias Kloseb9621712010-04-24 17:59:49 +000011037 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11038"
Victor Stinnere0be4232011-10-25 13:06:09 +020011039if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011040 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011041else
Matthias Kloseb9621712010-04-24 17:59:49 +000011042 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011043fi
11044
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011045cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011046#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011047_ACEOF
11048
Matthias Kloseb9621712010-04-24 17:59:49 +000011049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11050$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011051if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011052 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011053else
Matthias Kloseb9621712010-04-24 17:59:49 +000011054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011055/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011056#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011057#if !HAVE_DECL_TZNAME
11058extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011059#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011060
Martin v. Löwis11437992002-04-12 09:54:03 +000011061int
11062main ()
11063{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011064return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011065 ;
11066 return 0;
11067}
11068_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011069if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011070 ac_cv_var_tzname=yes
11071else
Matthias Kloseb9621712010-04-24 17:59:49 +000011072 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011073fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011074rm -f core conftest.err conftest.$ac_objext \
11075 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011076fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11078$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011079 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011080
Matthias Kloseb9621712010-04-24 17:59:49 +000011081$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011082
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011083 fi
11084fi
11085
Matthias Kloseb9621712010-04-24 17:59:49 +000011086ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020011087if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011088
11089cat >>confdefs.h <<_ACEOF
11090#define HAVE_STRUCT_STAT_ST_RDEV 1
11091_ACEOF
11092
11093
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011094fi
11095
Matthias Kloseb9621712010-04-24 17:59:49 +000011096ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020011097if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011098
Martin v. Löwis11437992002-04-12 09:54:03 +000011099cat >>confdefs.h <<_ACEOF
11100#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11101_ACEOF
11102
11103
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011104fi
11105
Matthias Kloseb9621712010-04-24 17:59:49 +000011106ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020011107if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011108
11109cat >>confdefs.h <<_ACEOF
11110#define HAVE_STRUCT_STAT_ST_FLAGS 1
11111_ACEOF
11112
11113
11114fi
11115
Matthias Kloseb9621712010-04-24 17:59:49 +000011116ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020011117if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011118
11119cat >>confdefs.h <<_ACEOF
11120#define HAVE_STRUCT_STAT_ST_GEN 1
11121_ACEOF
11122
11123
11124fi
11125
Matthias Kloseb9621712010-04-24 17:59:49 +000011126ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020011127if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011128
11129cat >>confdefs.h <<_ACEOF
11130#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11131_ACEOF
11132
11133
11134fi
11135
Matthias Kloseb9621712010-04-24 17:59:49 +000011136ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020011137if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011138
Martin v. Löwis11437992002-04-12 09:54:03 +000011139cat >>confdefs.h <<_ACEOF
11140#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11141_ACEOF
11142
11143
Matthias Kloseb9621712010-04-24 17:59:49 +000011144$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011145
11146else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011147 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011148 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011149 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11150 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011151esac
11152
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011153fi
11154
Michael W. Hudson54241132001-12-07 15:38:26 +000011155
Martin v. Löwis11437992002-04-12 09:54:03 +000011156
Matthias Kloseb9621712010-04-24 17:59:49 +000011157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11158$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011159if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011160 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011161else
Matthias Kloseb159a552010-04-25 21:00:44 +000011162
Matthias Kloseb9621712010-04-24 17:59:49 +000011163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011164/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011165#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011166int
11167main ()
11168{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011169return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011170 ;
11171 return 0;
11172}
11173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011174if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011175 ac_cv_header_time_altzone=yes
11176else
Matthias Kloseb9621712010-04-24 17:59:49 +000011177 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011178fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011180
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011181fi
11182
Matthias Kloseb9621712010-04-24 17:59:49 +000011183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11184$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011185if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011186
Matthias Kloseb9621712010-04-24 17:59:49 +000011187$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011188
11189fi
11190
Guido van Rossumda88dad1995-01-26 00:46:29 +000011191was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11193$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11194cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011195/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011196
11197#include <sys/types.h>
11198#include <sys/select.h>
11199#include <sys/time.h>
11200
Martin v. Löwis11437992002-04-12 09:54:03 +000011201int
11202main ()
11203{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011204;
Martin v. Löwis11437992002-04-12 09:54:03 +000011205 ;
11206 return 0;
11207}
11208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011209if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011210
11211
Matthias Kloseb9621712010-04-24 17:59:49 +000011212$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011213
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011214 was_it_defined=yes
11215
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011216fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11219$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011220
Matthias Kloseb9621712010-04-24 17:59:49 +000011221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11222$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011223if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011224 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011225else
Matthias Kloseb9621712010-04-24 17:59:49 +000011226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011227/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011228#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011229int
11230main ()
11231{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011232struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011233 ;
11234 return 0;
11235}
11236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011237if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011238 ac_cv_struct_addrinfo=yes
11239else
Matthias Kloseb9621712010-04-24 17:59:49 +000011240 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11243fi
11244
Matthias Kloseb9621712010-04-24 17:59:49 +000011245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11246$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011247if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011248
Matthias Kloseb9621712010-04-24 17:59:49 +000011249$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011250
11251fi
11252
Matthias Kloseb9621712010-04-24 17:59:49 +000011253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11254$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011255if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011256 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011257else
Matthias Kloseb9621712010-04-24 17:59:49 +000011258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011259/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011260
11261# include <sys/types.h>
11262# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011263int
11264main ()
11265{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011266struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011267 ;
11268 return 0;
11269}
11270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011271if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011272 ac_cv_struct_sockaddr_storage=yes
11273else
Matthias Kloseb9621712010-04-24 17:59:49 +000011274 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11277fi
11278
Matthias Kloseb9621712010-04-24 17:59:49 +000011279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11280$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011281if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011282
Matthias Kloseb9621712010-04-24 17:59:49 +000011283$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011284
11285fi
11286
Guido van Rossum627b2d71993-12-24 10:39:16 +000011287# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011288
Matthias Kloseb9621712010-04-24 17:59:49 +000011289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11290$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011291if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011292 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011293else
Matthias Kloseb9621712010-04-24 17:59:49 +000011294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011295/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011296$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011297int
11298main ()
11299{
11300static int test_array [1 - 2 * !(((char) -1) < 0)];
11301test_array [0] = 0
11302
11303 ;
11304 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011305}
Martin v. Löwis11437992002-04-12 09:54:03 +000011306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011307if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011308 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011309else
Matthias Kloseb9621712010-04-24 17:59:49 +000011310 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011313fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11315$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011316if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011317 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011318
11319fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011320
Matthias Kloseb9621712010-04-24 17:59:49 +000011321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11322$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011323if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011324 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011325else
Matthias Kloseb9621712010-04-24 17:59:49 +000011326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011327/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011328
Martin v. Löwis11437992002-04-12 09:54:03 +000011329int
11330main ()
11331{
11332/* FIXME: Include the comments suggested by Paul. */
11333#ifndef __cplusplus
11334 /* Ultrix mips cc rejects this. */
11335 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011336 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011337 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011338 char const *const *pcpcc;
11339 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011340 /* NEC SVR4.0.2 mips cc rejects this. */
11341 struct point {int x, y;};
11342 static struct point const zero = {0,0};
11343 /* AIX XL C 1.02.0.0 rejects this.
11344 It does not let you subtract one const X* pointer from another in
11345 an arm of an if-expression whose if-part is not a constant
11346 expression */
11347 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011348 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011349 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011350 ++pcpcc;
11351 ppc = (char**) pcpcc;
11352 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011353 { /* SCO 3.2v4 cc rejects this. */
11354 char *t;
11355 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011356
Martin v. Löwis11437992002-04-12 09:54:03 +000011357 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011358 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011359 }
11360 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11361 int x[] = {25, 17};
11362 const int *foo = &x[0];
11363 ++foo;
11364 }
11365 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11366 typedef const int *iptr;
11367 iptr p = 0;
11368 ++p;
11369 }
11370 { /* AIX XL C 1.02.0.0 rejects this saying
11371 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11372 struct s { int j; const int *ap[3]; };
11373 struct s *b; b->j = 5;
11374 }
11375 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11376 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011377 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011378 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011379 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011380#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011381
Martin v. Löwis11437992002-04-12 09:54:03 +000011382 ;
11383 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011384}
Martin v. Löwis11437992002-04-12 09:54:03 +000011385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011386if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011387 ac_cv_c_const=yes
11388else
Matthias Kloseb9621712010-04-24 17:59:49 +000011389 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011392fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11394$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011395if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011396
Matthias Kloseb9621712010-04-24 17:59:49 +000011397$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011398
11399fi
11400
Michael W. Hudson54241132001-12-07 15:38:26 +000011401
Guido van Rossumda88dad1995-01-26 00:46:29 +000011402works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11404$as_echo_n "checking for working volatile... " >&6; }
11405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011406/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011407
Martin v. Löwis11437992002-04-12 09:54:03 +000011408int
11409main ()
11410{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011411volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011412 ;
11413 return 0;
11414}
11415_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011416if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011417 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011418else
Skip Montanaro6dead952003-09-25 14:50:04 +000011419
Matthias Kloseb9621712010-04-24 17:59:49 +000011420$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011421
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011422
Guido van Rossum627b2d71993-12-24 10:39:16 +000011423fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11426$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011427
Guido van Rossumda88dad1995-01-26 00:46:29 +000011428works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11430$as_echo_n "checking for working signed char... " >&6; }
11431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011432/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011433
Martin v. Löwis11437992002-04-12 09:54:03 +000011434int
11435main ()
11436{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011437signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011438 ;
11439 return 0;
11440}
11441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011442if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011443 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011444else
Skip Montanaro6dead952003-09-25 14:50:04 +000011445
Matthias Kloseb9621712010-04-24 17:59:49 +000011446$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011447
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011448
Guido van Rossum7f43da71994-08-01 12:15:30 +000011449fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11452$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011453
Guido van Rossumda88dad1995-01-26 00:46:29 +000011454have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11456$as_echo_n "checking for prototypes... " >&6; }
11457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011458/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011459int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011460int
11461main ()
11462{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011463return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011464 ;
11465 return 0;
11466}
11467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011468if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011469
Matthias Kloseb9621712010-04-24 17:59:49 +000011470$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011471
Matthias Kloseb159a552010-04-25 21:00:44 +000011472 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011473fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11476$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011477
Guido van Rossumda88dad1995-01-26 00:46:29 +000011478works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11480$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11481cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011482/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011483
11484#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011485int foo(int x, ...) {
11486 va_list va;
11487 va_start(va, x);
11488 va_arg(va, int);
11489 va_arg(va, char *);
11490 va_arg(va, double);
11491 return 0;
11492}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011493
Martin v. Löwis11437992002-04-12 09:54:03 +000011494int
11495main ()
11496{
Guido van Rossum90eea071996-08-30 20:58:57 +000011497return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011498 ;
11499 return 0;
11500}
11501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011502if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011503
11504
Matthias Kloseb9621712010-04-24 17:59:49 +000011505$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011506
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011507 works=yes
11508
Guido van Rossum627b2d71993-12-24 10:39:16 +000011509fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11512$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011513
Martin v. Löwisd6320502004-08-12 13:45:08 +000011514# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11516$as_echo_n "checking for socketpair... " >&6; }
11517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011518/* end confdefs.h. */
11519
11520#include <sys/types.h>
11521#include <sys/socket.h>
11522
11523int
11524main ()
11525{
11526void *x=socketpair
11527 ;
11528 return 0;
11529}
11530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011531if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011532
Matthias Kloseb9621712010-04-24 17:59:49 +000011533$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011534
Matthias Kloseb159a552010-04-25 21:00:44 +000011535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011536$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011537else
Matthias Kloseb9621712010-04-24 17:59:49 +000011538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11539$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011540
11541fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011543
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011544# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11546$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011548/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011549#include <sys/types.h>
11550#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011551int
11552main ()
11553{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011554struct sockaddr x;
11555x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011556 ;
11557 return 0;
11558}
11559_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011560if ac_fn_c_try_compile "$LINENO"; then :
11561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11562$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011563
Matthias Kloseb9621712010-04-24 17:59:49 +000011564$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011565
11566else
Matthias Kloseb9621712010-04-24 17:59:49 +000011567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11568$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011569
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011570fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011572
Guido van Rossumda88dad1995-01-26 00:46:29 +000011573va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11575$as_echo_n "checking whether va_list is an array... " >&6; }
11576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011577/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011578
11579#ifdef HAVE_STDARG_PROTOTYPES
11580#include <stdarg.h>
11581#else
11582#include <varargs.h>
11583#endif
11584
Martin v. Löwis11437992002-04-12 09:54:03 +000011585int
11586main ()
11587{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011588va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011589 ;
11590 return 0;
11591}
11592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011593if ac_fn_c_try_compile "$LINENO"; then :
11594
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011595else
Skip Montanaro6dead952003-09-25 14:50:04 +000011596
Martin v. Löwis11437992002-04-12 09:54:03 +000011597
Matthias Kloseb9621712010-04-24 17:59:49 +000011598$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011599
Guido van Rossumda88dad1995-01-26 00:46:29 +000011600 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011601
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011602fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11605$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011606
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011607# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011608
11609
Matthias Kloseb9621712010-04-24 17:59:49 +000011610ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020011611if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011612
Matthias Kloseb9621712010-04-24 17:59:49 +000011613 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011614
Matthias Kloseb9621712010-04-24 17:59:49 +000011615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11616$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011617 OLD_CFLAGS=$CFLAGS
11618 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011620/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011621
11622# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011623
Martin v. Löwis11437992002-04-12 09:54:03 +000011624int
11625main ()
11626{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011627
11628 char *name;
11629 struct hostent *he, *res;
11630 char buffer[2048];
11631 int buflen = 2048;
11632 int h_errnop;
11633
11634 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011635
11636 ;
11637 return 0;
11638}
11639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011640if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011641
Matthias Kloseb9621712010-04-24 17:59:49 +000011642 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011643
Martin v. Löwis11437992002-04-12 09:54:03 +000011644
Matthias Kloseb9621712010-04-24 17:59:49 +000011645$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011646
Matthias Kloseb9621712010-04-24 17:59:49 +000011647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11648$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011649
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011650else
Skip Montanaro6dead952003-09-25 14:50:04 +000011651
Matthias Kloseb9621712010-04-24 17:59:49 +000011652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11653$as_echo "no" >&6; }
11654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11655$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011657/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011658
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011659# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011660
Martin v. Löwis11437992002-04-12 09:54:03 +000011661int
11662main ()
11663{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011664
11665 char *name;
11666 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011667 char buffer[2048];
11668 int buflen = 2048;
11669 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011670
Matthias Kloseb159a552010-04-25 21:00:44 +000011671 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011672
11673 ;
11674 return 0;
11675}
11676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011677if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011678
Matthias Kloseb9621712010-04-24 17:59:49 +000011679 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011680
Martin v. Löwis11437992002-04-12 09:54:03 +000011681
Matthias Kloseb159a552010-04-25 21:00:44 +000011682$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011683
Matthias Kloseb9621712010-04-24 17:59:49 +000011684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11685$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011686
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011687else
Skip Montanaro6dead952003-09-25 14:50:04 +000011688
Matthias Kloseb9621712010-04-24 17:59:49 +000011689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11690$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11692$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11694/* end confdefs.h. */
11695
11696# include <netdb.h>
11697
11698int
11699main ()
11700{
11701
11702 char *name;
11703 struct hostent *he;
11704 struct hostent_data data;
11705
11706 (void) gethostbyname_r(name, he, &data);
11707
11708 ;
11709 return 0;
11710}
11711_ACEOF
11712if ac_fn_c_try_compile "$LINENO"; then :
11713
11714 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11715
11716
11717$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11718
11719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11720$as_echo "yes" >&6; }
11721
11722else
11723
11724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11725$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011726
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011727fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011729
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011730fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011732
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011735 CFLAGS=$OLD_CFLAGS
11736
11737else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011738
Matthias Kloseb9621712010-04-24 17:59:49 +000011739 for ac_func in gethostbyname
11740do :
11741 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020011742if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011743 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011744#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011745_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011746
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011747fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011748done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011749
Michael W. Hudson54241132001-12-07 15:38:26 +000011750
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011751fi
11752
Michael W. Hudson54241132001-12-07 15:38:26 +000011753
11754
11755
11756
11757
11758
Guido van Rossum627b2d71993-12-24 10:39:16 +000011759# checks for system services
11760# (none yet)
11761
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011762# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011763ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020011764if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011765
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011766else
Matthias Kloseb9621712010-04-24 17:59:49 +000011767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11768$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011769if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011770 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011771else
Martin v. Löwis11437992002-04-12 09:54:03 +000011772 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011773LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011775/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011776
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011777/* Override any GCC internal prototype to avoid an error.
11778 Use char because int might match the return type of a GCC
11779 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011780#ifdef __cplusplus
11781extern "C"
11782#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011783char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011784int
11785main ()
11786{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011787return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011788 ;
11789 return 0;
11790}
11791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011792if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011793 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011794else
Matthias Kloseb9621712010-04-24 17:59:49 +000011795 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011796fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011797rm -f core conftest.err conftest.$ac_objext \
11798 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011799LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011800fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11802$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011803if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011804 cat >>confdefs.h <<_ACEOF
11805#define HAVE_LIBIEEE 1
11806_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011807
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011808 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011809
Guido van Rossum627b2d71993-12-24 10:39:16 +000011810fi
11811
Michael W. Hudson54241132001-12-07 15:38:26 +000011812
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011813fi
11814
Michael W. Hudson54241132001-12-07 15:38:26 +000011815
Guido van Rossum7f253911997-05-09 02:42:48 +000011816# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11818$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011819
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011820# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011821if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011822 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011823if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011824then
11825
Matthias Kloseb9621712010-04-24 17:59:49 +000011826$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011827
Matthias Kloseb9621712010-04-24 17:59:49 +000011828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11829$as_echo "yes" >&6; }
11830else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11831$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011832fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011833else
Matthias Kloseb9621712010-04-24 17:59:49 +000011834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11835$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011836fi
11837
Guido van Rossum7f253911997-05-09 02:42:48 +000011838
Guido van Rossum7f43da71994-08-01 12:15:30 +000011839# check for --with-libm=...
11840
Guido van Rossum563e7081996-09-10 18:20:48 +000011841case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011842Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011843*) LIBM=-lm
11844esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11846$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011847
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011848# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011849if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011850 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011851if test "$withval" = no
11852then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11854$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011855elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011856then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11858$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011859else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011860fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011861else
Matthias Kloseb9621712010-04-24 17:59:49 +000011862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11863$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011864fi
11865
Guido van Rossum7f43da71994-08-01 12:15:30 +000011866
11867# check for --with-libc=...
11868
Matthias Kloseb9621712010-04-24 17:59:49 +000011869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11870$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011871
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011872# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011873if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011874 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011875if test "$withval" = no
11876then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11878$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011879elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011880then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11882$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011883else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011884fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011885else
Matthias Kloseb9621712010-04-24 17:59:49 +000011886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11887$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011888fi
11889
Guido van Rossum7f43da71994-08-01 12:15:30 +000011890
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011891# **************************************************
11892# * Check for various properties of floating point *
11893# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011894
Matthias Kloseb9621712010-04-24 17:59:49 +000011895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11896$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011897if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011898 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011899else
11900
Matthias Kloseb9621712010-04-24 17:59:49 +000011901if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011902 ac_cv_little_endian_double=no
11903else
Matthias Kloseb9621712010-04-24 17:59:49 +000011904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011905/* end confdefs.h. */
11906
11907#include <string.h>
11908int main() {
11909 double x = 9006104071832581.0;
11910 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11911 return 0;
11912 else
11913 return 1;
11914}
11915
11916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011917if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011918 ac_cv_little_endian_double=yes
11919else
Matthias Kloseb9621712010-04-24 17:59:49 +000011920 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011921fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011922rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11923 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011924fi
11925
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011926fi
11927
Matthias Kloseb9621712010-04-24 17:59:49 +000011928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11929$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011930if test "$ac_cv_little_endian_double" = yes
11931then
11932
Matthias Kloseb9621712010-04-24 17:59:49 +000011933$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011934
11935fi
11936
Matthias Kloseb9621712010-04-24 17:59:49 +000011937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11938$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011939if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011940 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011941else
11942
Matthias Kloseb9621712010-04-24 17:59:49 +000011943if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011944 ac_cv_big_endian_double=no
11945else
Matthias Kloseb9621712010-04-24 17:59:49 +000011946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011947/* end confdefs.h. */
11948
11949#include <string.h>
11950int main() {
11951 double x = 9006104071832581.0;
11952 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11953 return 0;
11954 else
11955 return 1;
11956}
11957
11958_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011959if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011960 ac_cv_big_endian_double=yes
11961else
Matthias Kloseb9621712010-04-24 17:59:49 +000011962 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011963fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011964rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11965 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011966fi
11967
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011968fi
11969
Matthias Kloseb9621712010-04-24 17:59:49 +000011970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11971$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011972if test "$ac_cv_big_endian_double" = yes
11973then
11974
Matthias Kloseb9621712010-04-24 17:59:49 +000011975$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011976
11977fi
11978
11979# Some ARM platforms use a mixed-endian representation for doubles.
11980# While Python doesn't currently have full support for these platforms
11981# (see e.g., issue 1762561), we can at least make sure that float <-> string
11982# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11984$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011985if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011986 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011987else
11988
Matthias Kloseb9621712010-04-24 17:59:49 +000011989if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011990 ac_cv_mixed_endian_double=no
11991else
Matthias Kloseb9621712010-04-24 17:59:49 +000011992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011993/* end confdefs.h. */
11994
11995#include <string.h>
11996int main() {
11997 double x = 9006104071832581.0;
11998 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11999 return 0;
12000 else
12001 return 1;
12002}
12003
12004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012005if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012006 ac_cv_mixed_endian_double=yes
12007else
Matthias Kloseb9621712010-04-24 17:59:49 +000012008 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012009fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012010rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12011 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012012fi
12013
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012014fi
12015
Matthias Kloseb9621712010-04-24 17:59:49 +000012016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12017$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012018if test "$ac_cv_mixed_endian_double" = yes
12019then
12020
Matthias Kloseb9621712010-04-24 17:59:49 +000012021$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012022
12023fi
12024
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012025# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012026# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012027# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012028# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012029# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012030# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012031
12032# This inline assembler syntax may also work for suncc and icc,
12033# so we try it on all platforms.
12034
Matthias Kloseb9621712010-04-24 17:59:49 +000012035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12036$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012038/* end confdefs.h. */
12039
12040int
12041main ()
12042{
12043
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012044 unsigned short cw;
12045 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12046 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012047
12048 ;
12049 return 0;
12050}
12051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012052if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012053 have_gcc_asm_for_x87=yes
12054else
Matthias Kloseb9621712010-04-24 17:59:49 +000012055 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012056fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12059$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012060if test "$have_gcc_asm_for_x87" = yes
12061then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012062
Matthias Kloseb9621712010-04-24 17:59:49 +000012063$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012064
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012065fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012066
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012067# Detect whether system arithmetic is subject to x87-style double
12068# rounding issues. The result of this test has little meaning on non
12069# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12070# mode is round-to-nearest and double rounding issues are present, and
12071# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12073$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012074# $BASECFLAGS may affect the result
12075ac_save_cc="$CC"
12076CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012077if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012078 ac_cv_x87_double_rounding=no
12079else
Matthias Kloseb9621712010-04-24 17:59:49 +000012080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012081/* end confdefs.h. */
12082
12083#include <stdlib.h>
12084#include <math.h>
12085int main() {
12086 volatile double x, y, z;
12087 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12088 x = 0.99999999999999989; /* 1-2**-53 */
12089 y = 1./x;
12090 if (y != 1.)
12091 exit(0);
12092 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12093 x = 1e16;
12094 y = 2.99999;
12095 z = x + y;
12096 if (z != 1e16+4.)
12097 exit(0);
12098 /* both tests show evidence of double rounding */
12099 exit(1);
12100}
12101
12102_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012103if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012104 ac_cv_x87_double_rounding=no
12105else
Matthias Kloseb9621712010-04-24 17:59:49 +000012106 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012107fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012108rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12109 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012110fi
12111
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012112CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12114$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012115if test "$ac_cv_x87_double_rounding" = yes
12116then
12117
Matthias Kloseb9621712010-04-24 17:59:49 +000012118$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012119
12120fi
12121
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012122# ************************************
12123# * Check for mathematical functions *
12124# ************************************
12125
12126LIBS_SAVE=$LIBS
12127LIBS="$LIBS $LIBM"
12128
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012129for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12130do :
12131 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12132ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012133if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012134 cat >>confdefs.h <<_ACEOF
12135#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12136_ACEOF
12137
12138fi
12139done
12140
Victor Stinner8f9f8d62011-05-09 12:45:41 +020012141for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012142do :
12143 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12144ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012145if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012146 cat >>confdefs.h <<_ACEOF
12147#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12148_ACEOF
12149
12150fi
12151done
12152
12153ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12154"
Victor Stinnere0be4232011-10-25 13:06:09 +020012155if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012156 ac_have_decl=1
12157else
12158 ac_have_decl=0
12159fi
12160
12161cat >>confdefs.h <<_ACEOF
12162#define HAVE_DECL_ISINF $ac_have_decl
12163_ACEOF
12164ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12165"
Victor Stinnere0be4232011-10-25 13:06:09 +020012166if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012167 ac_have_decl=1
12168else
12169 ac_have_decl=0
12170fi
12171
12172cat >>confdefs.h <<_ACEOF
12173#define HAVE_DECL_ISNAN $ac_have_decl
12174_ACEOF
12175ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12176"
Victor Stinnere0be4232011-10-25 13:06:09 +020012177if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012178 ac_have_decl=1
12179else
12180 ac_have_decl=0
12181fi
12182
12183cat >>confdefs.h <<_ACEOF
12184#define HAVE_DECL_ISFINITE $ac_have_decl
12185_ACEOF
12186
12187
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012188# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12189# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12191$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012192if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012193 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012194else
12195
Matthias Kloseb9621712010-04-24 17:59:49 +000012196if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012197 ac_cv_tanh_preserves_zero_sign=no
12198else
Matthias Kloseb9621712010-04-24 17:59:49 +000012199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012200/* end confdefs.h. */
12201
12202#include <math.h>
12203#include <stdlib.h>
12204int main() {
12205 /* return 0 if either negative zeros don't exist
12206 on this platform or if negative zeros exist
12207 and tanh(-0.) == -0. */
12208 if (atan2(0., -1.) == atan2(-0., -1.) ||
12209 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12210 else exit(1);
12211}
12212
12213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012214if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012215 ac_cv_tanh_preserves_zero_sign=yes
12216else
Matthias Kloseb9621712010-04-24 17:59:49 +000012217 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012218fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012219rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12220 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012221fi
12222
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012223fi
12224
Matthias Kloseb9621712010-04-24 17:59:49 +000012225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12226$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012227if test "$ac_cv_tanh_preserves_zero_sign" = yes
12228then
12229
Matthias Kloseb9621712010-04-24 17:59:49 +000012230$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012231
12232fi
12233
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012234if test "$ac_cv_func_log1p" = yes
12235then
12236 # On some versions of AIX, log1p(-0.) returns 0. instead of
12237 # -0. See issue #9920.
12238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12239$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012240 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012241 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012242else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012243
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012244 if test "$cross_compiling" = yes; then :
12245 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012246else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12248/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012249
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012250 #include <math.h>
12251 #include <stdlib.h>
12252 int main() {
12253 /* Fail if the signs of log1p(-0.) and -0. can be
12254 distinguished. */
12255 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12256 return 0;
12257 else
12258 return 1;
12259 }
12260
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012261_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012262if ac_fn_c_try_run "$LINENO"; then :
12263 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012264else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012265 ac_cv_log1p_drops_zero_sign=yes
12266fi
12267rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12268 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012269fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012270
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012271fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012272
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12274$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12275fi
12276if test "$ac_cv_log1p_drops_zero_sign" = yes
12277then
12278
12279$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12280
12281fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012282
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012283LIBS=$LIBS_SAVE
12284
Mark Dickinsona614f042009-11-28 12:48:43 +000012285# For multiprocessing module, check that sem_open
12286# actually works. For FreeBSD versions <= 7.2,
12287# the kernel module that provides POSIX semaphores
12288# isn't loaded by default, so an attempt to call
12289# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12291$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012292if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012293 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012294else
Matthias Kloseb9621712010-04-24 17:59:49 +000012295 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012296 ac_cv_posix_semaphores_enabled=yes
12297else
Matthias Kloseb9621712010-04-24 17:59:49 +000012298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012299/* end confdefs.h. */
12300
12301#include <unistd.h>
12302#include <fcntl.h>
12303#include <stdio.h>
12304#include <semaphore.h>
12305#include <sys/stat.h>
12306
12307int main(void) {
12308 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12309 if (a == SEM_FAILED) {
12310 perror("sem_open");
12311 return 1;
12312 }
12313 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012314 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012315 return 0;
12316}
12317
12318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012319if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012320 ac_cv_posix_semaphores_enabled=yes
12321else
Matthias Kloseb9621712010-04-24 17:59:49 +000012322 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012323fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012324rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12325 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012326fi
12327
12328
Mark Dickinsona614f042009-11-28 12:48:43 +000012329fi
12330
Matthias Kloseb9621712010-04-24 17:59:49 +000012331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12332$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012333if test $ac_cv_posix_semaphores_enabled = no
12334then
12335
Matthias Kloseb9621712010-04-24 17:59:49 +000012336$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012337
12338fi
12339
Mark Dickinson10683072009-04-18 21:18:19 +000012340# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12342$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012343if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012344 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012345else
Matthias Kloseb9621712010-04-24 17:59:49 +000012346 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012347 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012348else
Matthias Kloseb9621712010-04-24 17:59:49 +000012349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012350/* end confdefs.h. */
12351
12352#include <unistd.h>
12353#include <fcntl.h>
12354#include <stdio.h>
12355#include <semaphore.h>
12356#include <sys/stat.h>
12357
12358int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012359 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012360 int count;
12361 int res;
12362 if(a==SEM_FAILED){
12363 perror("sem_open");
12364 return 1;
12365
12366 }
12367 res = sem_getvalue(a, &count);
12368 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012369 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012370 return res==-1 ? 1 : 0;
12371}
12372
Mark Dickinson10683072009-04-18 21:18:19 +000012373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012374if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012375 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012376else
Matthias Kloseb9621712010-04-24 17:59:49 +000012377 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012378fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012379rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12380 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012381fi
12382
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012383
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012384fi
12385
Matthias Kloseb9621712010-04-24 17:59:49 +000012386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12387$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012388if test $ac_cv_broken_sem_getvalue = yes
12389then
12390
Matthias Kloseb9621712010-04-24 17:59:49 +000012391$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012392
12393fi
12394
Mark Dickinsonbd792642009-03-18 20:06:12 +000012395# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12397$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012398# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012399if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012400 enableval=$enable_big_digits; case $enable_big_digits in
12401yes)
12402 enable_big_digits=30 ;;
12403no)
12404 enable_big_digits=15 ;;
1240515|30)
12406 ;;
12407*)
Victor Stinnere0be4232011-10-25 13:06:09 +020012408 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 +000012409esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12411$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012412
12413cat >>confdefs.h <<_ACEOF
12414#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12415_ACEOF
12416
12417
12418else
Matthias Kloseb9621712010-04-24 17:59:49 +000012419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12420$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012421fi
12422
12423
Guido van Rossumef2255b2000-03-10 22:30:29 +000012424# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012425ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012426if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012427
12428
Matthias Kloseb9621712010-04-24 17:59:49 +000012429$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012430
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012431 wchar_h="yes"
12432
Guido van Rossumef2255b2000-03-10 22:30:29 +000012433else
Martin v. Löwis11437992002-04-12 09:54:03 +000012434 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012435
12436fi
12437
Michael W. Hudson54241132001-12-07 15:38:26 +000012438
Martin v. Löwis11437992002-04-12 09:54:03 +000012439
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012440# determine wchar_t size
12441if test "$wchar_h" = yes
12442then
Matthias Kloseb9621712010-04-24 17:59:49 +000012443 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012444# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12445# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12446# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12448$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012449if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012450 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012451else
Matthias Kloseb9621712010-04-24 17:59:49 +000012452 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12453"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012454
Martin v. Löwis11437992002-04-12 09:54:03 +000012455else
Matthias Kloseb9621712010-04-24 17:59:49 +000012456 if test "$ac_cv_type_wchar_t" = yes; then
12457 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12458$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012459as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020012460See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012461 else
12462 ac_cv_sizeof_wchar_t=0
12463 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012464fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012465
Martin v. Löwis11437992002-04-12 09:54:03 +000012466fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12468$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012469
12470
12471
Martin v. Löwis11437992002-04-12 09:54:03 +000012472cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012473#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012474_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012475
Michael W. Hudson54241132001-12-07 15:38:26 +000012476
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012477fi
12478
Matthias Kloseb9621712010-04-24 17:59:49 +000012479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12480$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012481have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012483/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012484
12485#include <tcl.h>
12486#if TCL_UTF_MAX != 6
12487# error "NOT UCS4_TCL"
12488#endif
12489int
12490main ()
12491{
12492
12493 ;
12494 return 0;
12495}
12496_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012497if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012498
12499
Matthias Kloseb9621712010-04-24 17:59:49 +000012500$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012501
12502 have_ucs4_tcl=yes
12503
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012504fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12507$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012508
Skip Montanaro6dead952003-09-25 14:50:04 +000012509# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012510if test "$wchar_h" = yes
12511then
12512 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12514$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012515 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012516 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012517else
12518
Matthias Kloseb9621712010-04-24 17:59:49 +000012519 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012520 ac_cv_wchar_t_signed=yes
12521else
Matthias Kloseb9621712010-04-24 17:59:49 +000012522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012523/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012524
12525 #include <wchar.h>
12526 int main()
12527 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012528 /* Success: exit code 0 */
12529 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012530 }
12531
12532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012533if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012534 ac_cv_wchar_t_signed=yes
12535else
Matthias Kloseb9621712010-04-24 17:59:49 +000012536 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012537fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012538rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12539 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012540fi
12541
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012542fi
12543
Matthias Kloseb9621712010-04-24 17:59:49 +000012544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12545$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012546fi
12547
Georg Brandl52d168a2008-01-07 18:10:24 +000012548# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012549if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012550 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012551then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012552 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012553
Matthias Kloseb9621712010-04-24 17:59:49 +000012554$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012555
Georg Brandl52d168a2008-01-07 18:10:24 +000012556else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012557 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012558fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
12560$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012561
12562# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12564$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012565if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012566 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012567else
Matthias Kloseb9621712010-04-24 17:59:49 +000012568 ac_cv_c_bigendian=unknown
12569 # See if we're dealing with a universal compiler.
12570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12571/* end confdefs.h. */
12572#ifndef __APPLE_CC__
12573 not a universal capable compiler
12574 #endif
12575 typedef int dummy;
12576
Skip Montanaro6dead952003-09-25 14:50:04 +000012577_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012578if ac_fn_c_try_compile "$LINENO"; then :
12579
12580 # Check for potential -arch flags. It is not universal unless
12581 # there are at least two -arch flags with different values.
12582 ac_arch=
12583 ac_prev=
12584 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12585 if test -n "$ac_prev"; then
12586 case $ac_word in
12587 i?86 | x86_64 | ppc | ppc64)
12588 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12589 ac_arch=$ac_word
12590 else
12591 ac_cv_c_bigendian=universal
12592 break
12593 fi
12594 ;;
12595 esac
12596 ac_prev=
12597 elif test "x$ac_word" = "x-arch"; then
12598 ac_prev=arch
12599 fi
12600 done
12601fi
12602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12603 if test $ac_cv_c_bigendian = unknown; then
12604 # See if sys/param.h defines the BYTE_ORDER macro.
12605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012606/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012607#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012608 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012609
Martin v. Löwis11437992002-04-12 09:54:03 +000012610int
12611main ()
12612{
Matthias Kloseb9621712010-04-24 17:59:49 +000012613#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12614 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12615 && LITTLE_ENDIAN)
12616 bogus endian macros
12617 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012618
12619 ;
12620 return 0;
12621}
12622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012623if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012624 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012626/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012627#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012628 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012629
Martin v. Löwis11437992002-04-12 09:54:03 +000012630int
12631main ()
12632{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012633#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012634 not big endian
12635 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012636
12637 ;
12638 return 0;
12639}
12640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012641if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012642 ac_cv_c_bigendian=yes
12643else
Matthias Kloseb9621712010-04-24 17:59:49 +000012644 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012645fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012647fi
12648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12649 fi
12650 if test $ac_cv_c_bigendian = unknown; then
12651 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012653/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012654#include <limits.h>
12655
Martin v. Löwis11437992002-04-12 09:54:03 +000012656int
12657main ()
12658{
Matthias Kloseb9621712010-04-24 17:59:49 +000012659#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12660 bogus endian macros
12661 #endif
12662
Martin v. Löwis11437992002-04-12 09:54:03 +000012663 ;
12664 return 0;
12665}
12666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012667if ac_fn_c_try_compile "$LINENO"; then :
12668 # It does; now see whether it defined to _BIG_ENDIAN or not.
12669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12670/* end confdefs.h. */
12671#include <limits.h>
12672
12673int
12674main ()
12675{
12676#ifndef _BIG_ENDIAN
12677 not big endian
12678 #endif
12679
12680 ;
12681 return 0;
12682}
12683_ACEOF
12684if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012685 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012686else
Matthias Kloseb9621712010-04-24 17:59:49 +000012687 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012688fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12690fi
12691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12692 fi
12693 if test $ac_cv_c_bigendian = unknown; then
12694 # Compile a test program.
12695 if test "$cross_compiling" = yes; then :
12696 # Try to guess by grepping values from an object file.
12697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12698/* end confdefs.h. */
12699short int ascii_mm[] =
12700 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12701 short int ascii_ii[] =
12702 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12703 int use_ascii (int i) {
12704 return ascii_mm[i] + ascii_ii[i];
12705 }
12706 short int ebcdic_ii[] =
12707 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12708 short int ebcdic_mm[] =
12709 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12710 int use_ebcdic (int i) {
12711 return ebcdic_mm[i] + ebcdic_ii[i];
12712 }
12713 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012714
Matthias Kloseb9621712010-04-24 17:59:49 +000012715int
12716main ()
12717{
12718return use_ascii (foo) == use_ebcdic (foo);
12719 ;
12720 return 0;
12721}
12722_ACEOF
12723if ac_fn_c_try_compile "$LINENO"; then :
12724 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12725 ac_cv_c_bigendian=yes
12726 fi
12727 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12728 if test "$ac_cv_c_bigendian" = unknown; then
12729 ac_cv_c_bigendian=no
12730 else
12731 # finding both strings is unlikely to happen, but who knows?
12732 ac_cv_c_bigendian=unknown
12733 fi
12734 fi
12735fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012737else
Matthias Kloseb9621712010-04-24 17:59:49 +000012738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012739/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012740$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012741int
12742main ()
12743{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012744
Matthias Kloseb9621712010-04-24 17:59:49 +000012745 /* Are we little or big endian? From Harbison&Steele. */
12746 union
12747 {
12748 long int l;
12749 char c[sizeof (long int)];
12750 } u;
12751 u.l = 1;
12752 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012753
12754 ;
12755 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012756}
Martin v. Löwis11437992002-04-12 09:54:03 +000012757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012758if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012759 ac_cv_c_bigendian=no
12760else
Matthias Kloseb9621712010-04-24 17:59:49 +000012761 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012762fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012763rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12764 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012765fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012766
Matthias Kloseb9621712010-04-24 17:59:49 +000012767 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012768fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12770$as_echo "$ac_cv_c_bigendian" >&6; }
12771 case $ac_cv_c_bigendian in #(
12772 yes)
12773 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12774;; #(
12775 no)
12776 ;; #(
12777 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012778
Matthias Kloseb9621712010-04-24 17:59:49 +000012779$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012780
Matthias Kloseb9621712010-04-24 17:59:49 +000012781 ;; #(
12782 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012783 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020012784 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012785 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012786
Michael W. Hudson54241132001-12-07 15:38:26 +000012787
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012788# ABI version string for Python extension modules. This appears between the
12789# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12790# from the following attributes which affect the ABI of this Python build (in
12791# this order):
12792#
12793# * The Python implementation (always 'cpython-' for us)
12794# * The major and minor version numbers
12795# * --with-pydebug (adds a 'd')
12796# * --with-pymalloc (adds a 'm')
12797# * --with-wide-unicode (adds a 'u')
12798#
12799# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012800# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12801# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012802
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12804$as_echo_n "checking ABIFLAGS... " >&6; }
12805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12806$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12808$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012809SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12811$as_echo "$SOABI" >&6; }
12812
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12814$as_echo_n "checking LDVERSION... " >&6; }
12815LDVERSION='$(VERSION)$(ABIFLAGS)'
12816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12817$as_echo "$LDVERSION" >&6; }
12818
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012819# SO is the extension of shared libraries `(including the dot!)
12820# -- usually .so, .sl on HP-UX, .dll on Cygwin
12821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12822$as_echo_n "checking SO... " >&6; }
12823if test -z "$SO"
12824then
12825 case $ac_sys_system in
12826 hp*|HP*)
12827 case `uname -m` in
12828 ia64) SO=.so;;
12829 *) SO=.sl;;
12830 esac
12831 ;;
12832 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012833 Linux*|GNU*)
12834 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012835 *) SO=.so;;
12836 esac
12837else
12838 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012839 echo
12840 echo '====================================================================='
12841 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012842 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012843 echo '+ Do you really mean to change the extension for shared libraries? +'
12844 echo '+ Continuing in 10 seconds to let you to ponder. +'
12845 echo '+ +'
12846 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012847 sleep 10
12848fi
12849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12850$as_echo "$SO" >&6; }
12851
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012852# Check whether right shifting a negative integer extends the sign bit
12853# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12855$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012856if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012857 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012858else
Martin v. Löwis11437992002-04-12 09:54:03 +000012859
Matthias Kloseb9621712010-04-24 17:59:49 +000012860if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012861 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012862else
Matthias Kloseb9621712010-04-24 17:59:49 +000012863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012864/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012865
12866int main()
12867{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012868 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012869}
12870
Martin v. Löwis11437992002-04-12 09:54:03 +000012871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012872if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012873 ac_cv_rshift_extends_sign=yes
12874else
Matthias Kloseb9621712010-04-24 17:59:49 +000012875 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012876fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012877rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12878 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012879fi
12880
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012881fi
12882
Matthias Kloseb9621712010-04-24 17:59:49 +000012883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12884$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012885if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012886then
Martin v. Löwis11437992002-04-12 09:54:03 +000012887
Matthias Kloseb9621712010-04-24 17:59:49 +000012888$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012889
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012890fi
12891
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012892# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12894$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012895if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012896 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012897else
Martin v. Löwis11437992002-04-12 09:54:03 +000012898
Matthias Kloseb9621712010-04-24 17:59:49 +000012899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012900/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012901#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012902int
12903main ()
12904{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012905
12906 FILE *f = fopen("/dev/null", "r");
12907 flockfile(f);
12908 getc_unlocked(f);
12909 funlockfile(f);
12910
Martin v. Löwis11437992002-04-12 09:54:03 +000012911 ;
12912 return 0;
12913}
12914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012915if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012916 ac_cv_have_getc_unlocked=yes
12917else
Matthias Kloseb9621712010-04-24 17:59:49 +000012918 ac_cv_have_getc_unlocked=no
12919fi
12920rm -f core conftest.err conftest.$ac_objext \
12921 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012922fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012923
Matthias Kloseb9621712010-04-24 17:59:49 +000012924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12925$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012926if test "$ac_cv_have_getc_unlocked" = yes
12927then
Martin v. Löwis11437992002-04-12 09:54:03 +000012928
Matthias Kloseb9621712010-04-24 17:59:49 +000012929$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012930
12931fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012932
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012933# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012934# save the value of LIBS so we don't actually link Python with readline
12935LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012936
Gregory P. Smith18820942008-09-07 06:24:49 +000012937# On some systems we need to link readline to a termcap compatible
12938# library. NOTE: Keep the precedence of listed libraries synchronised
12939# with setup.py.
12940py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12942$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012943for py_libtermcap in "" ncursesw ncurses curses termcap; do
12944 if test -z "$py_libtermcap"; then
12945 READLINE_LIBS="-lreadline"
12946 else
12947 READLINE_LIBS="-lreadline -l$py_libtermcap"
12948 fi
12949 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012951/* end confdefs.h. */
12952
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012953/* Override any GCC internal prototype to avoid an error.
12954 Use char because int might match the return type of a GCC
12955 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012956#ifdef __cplusplus
12957extern "C"
12958#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012959char readline ();
12960int
12961main ()
12962{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012963return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012964 ;
12965 return 0;
12966}
12967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012968if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012969 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012970fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012971rm -f core conftest.err conftest.$ac_objext \
12972 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012973 if test $py_cv_lib_readline = yes; then
12974 break
12975 fi
12976done
12977# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12978#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012979if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12981$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012982else
Matthias Kloseb9621712010-04-24 17:59:49 +000012983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12984$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012985
Matthias Kloseb9621712010-04-24 17:59:49 +000012986$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012987
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012988fi
12989
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012990# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12992$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012993if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012994 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012995else
12996 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012997LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012999/* end confdefs.h. */
13000
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013001/* Override any GCC internal prototype to avoid an error.
13002 Use char because int might match the return type of a GCC
13003 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013004#ifdef __cplusplus
13005extern "C"
13006#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013007char rl_callback_handler_install ();
13008int
13009main ()
13010{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013011return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013012 ;
13013 return 0;
13014}
13015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013016if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013017 ac_cv_lib_readline_rl_callback_handler_install=yes
13018else
Matthias Kloseb9621712010-04-24 17:59:49 +000013019 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013020fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013021rm -f core conftest.err conftest.$ac_objext \
13022 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013023LIBS=$ac_check_lib_save_LIBS
13024fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13026$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013027if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013028
Matthias Kloseb9621712010-04-24 17:59:49 +000013029$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013030
13031fi
13032
13033
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013034# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013036/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013037#include <readline/readline.h>
13038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013039if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013040 have_readline=yes
13041else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013042 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013043
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013044fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013045rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013046if test $have_readline = yes
13047then
Matthias Kloseb9621712010-04-24 17:59:49 +000013048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013049/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013050#include <readline/readline.h>
13051
13052_ACEOF
13053if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013054 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013055
Matthias Kloseb9621712010-04-24 17:59:49 +000013056$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013057
13058fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013059rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013060
Matthias Kloseb9621712010-04-24 17:59:49 +000013061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013062/* end confdefs.h. */
13063#include <readline/readline.h>
13064
13065_ACEOF
13066if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013067 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013068
Matthias Kloseb9621712010-04-24 17:59:49 +000013069$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013070
13071fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013072rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013073
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013074fi
13075
Martin v. Löwis0daad592001-09-30 21:09:59 +000013076# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13078$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013079if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013080 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013081else
Martin v. Löwis11437992002-04-12 09:54:03 +000013082 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013083LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013085/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013086
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013087/* Override any GCC internal prototype to avoid an error.
13088 Use char because int might match the return type of a GCC
13089 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013090#ifdef __cplusplus
13091extern "C"
13092#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013093char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013094int
13095main ()
13096{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013097return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013098 ;
13099 return 0;
13100}
13101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013102if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013103 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013104else
Matthias Kloseb9621712010-04-24 17:59:49 +000013105 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013106fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013107rm -f core conftest.err conftest.$ac_objext \
13108 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013109LIBS=$ac_check_lib_save_LIBS
13110fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13112$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013113if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013114
Matthias Kloseb9621712010-04-24 17:59:49 +000013115$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013116
Martin v. Löwis0daad592001-09-30 21:09:59 +000013117fi
13118
Michael W. Hudson54241132001-12-07 15:38:26 +000013119
Thomas Wouters89d996e2007-09-08 17:39:28 +000013120# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13122$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013123if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013124 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013125else
13126 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013127LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013128cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013129/* end confdefs.h. */
13130
13131/* Override any GCC internal prototype to avoid an error.
13132 Use char because int might match the return type of a GCC
13133 builtin and then its argument prototype would still apply. */
13134#ifdef __cplusplus
13135extern "C"
13136#endif
13137char rl_completion_display_matches_hook ();
13138int
13139main ()
13140{
13141return rl_completion_display_matches_hook ();
13142 ;
13143 return 0;
13144}
13145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013146if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013147 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13148else
Matthias Kloseb9621712010-04-24 17:59:49 +000013149 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013150fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013151rm -f core conftest.err conftest.$ac_objext \
13152 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013153LIBS=$ac_check_lib_save_LIBS
13154fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13156$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013157if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013158
Matthias Kloseb9621712010-04-24 17:59:49 +000013159$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013160
13161fi
13162
13163
Martin v. Löwis0daad592001-09-30 21:09:59 +000013164# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13166$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013167if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013168 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013169else
Martin v. Löwis11437992002-04-12 09:54:03 +000013170 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013171LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013173/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013174
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013175/* Override any GCC internal prototype to avoid an error.
13176 Use char because int might match the return type of a GCC
13177 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013178#ifdef __cplusplus
13179extern "C"
13180#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013181char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013182int
13183main ()
13184{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013185return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013186 ;
13187 return 0;
13188}
13189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013190if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013191 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013192else
Matthias Kloseb9621712010-04-24 17:59:49 +000013193 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013194fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013195rm -f core conftest.err conftest.$ac_objext \
13196 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013197LIBS=$ac_check_lib_save_LIBS
13198fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13200$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013201if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013202
Matthias Kloseb9621712010-04-24 17:59:49 +000013203$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013204
Guido van Rossum353ae582001-07-10 16:45:32 +000013205fi
13206
Jack Jansendd19cf82001-12-06 22:36:17 +000013207
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013208# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013210/* end confdefs.h. */
13211#include <readline/readline.h>
13212_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013213if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013214 have_readline=yes
13215else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013216 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013217
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013218fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013219rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013220if test $have_readline = yes
13221then
Matthias Kloseb9621712010-04-24 17:59:49 +000013222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013223/* end confdefs.h. */
13224#include <readline/readline.h>
13225
13226_ACEOF
13227if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013228 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013229
Matthias Kloseb9621712010-04-24 17:59:49 +000013230$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013231
13232fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013233rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013234
13235fi
13236
Martin v. Löwis82bca632006-02-10 20:49:30 +000013237# End of readline checks: restore LIBS
13238LIBS=$LIBS_no_readline
13239
Matthias Kloseb9621712010-04-24 17:59:49 +000013240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13241$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013242if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013243 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013244else
Martin v. Löwis11437992002-04-12 09:54:03 +000013245
Matthias Kloseb9621712010-04-24 17:59:49 +000013246if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013247 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013248else
Matthias Kloseb9621712010-04-24 17:59:49 +000013249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013250/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013251
13252int main()
13253{
13254 int val1 = nice(1);
13255 if (val1 != -1 && val1 == nice(2))
13256 exit(0);
13257 exit(1);
13258}
13259
Martin v. Löwis11437992002-04-12 09:54:03 +000013260_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013261if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013262 ac_cv_broken_nice=yes
13263else
Matthias Kloseb9621712010-04-24 17:59:49 +000013264 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013265fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013266rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13267 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013268fi
13269
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013270fi
13271
Matthias Kloseb9621712010-04-24 17:59:49 +000013272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13273$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013274if test "$ac_cv_broken_nice" = yes
13275then
Martin v. Löwis11437992002-04-12 09:54:03 +000013276
Matthias Kloseb9621712010-04-24 17:59:49 +000013277$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013278
13279fi
13280
Matthias Kloseb9621712010-04-24 17:59:49 +000013281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13282$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013283if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013284 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013285else
Matthias Kloseb9621712010-04-24 17:59:49 +000013286 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013287 ac_cv_broken_poll=no
13288else
Matthias Kloseb9621712010-04-24 17:59:49 +000013289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013290/* end confdefs.h. */
13291
13292#include <poll.h>
13293
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013294int main()
13295{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013296 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013297 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013298
13299 close (42);
13300
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013301 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013302 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013303 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013304 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013305 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013306 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013307 return 1;
13308}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013309
13310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013311if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013312 ac_cv_broken_poll=yes
13313else
Matthias Kloseb9621712010-04-24 17:59:49 +000013314 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013315fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013316rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13317 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013319
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013320fi
13321
Matthias Kloseb9621712010-04-24 17:59:49 +000013322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13323$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013324if test "$ac_cv_broken_poll" = yes
13325then
13326
Matthias Kloseb9621712010-04-24 17:59:49 +000013327$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013328
13329fi
13330
Brett Cannon43802422005-02-10 20:48:03 +000013331# 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 +000013332# (which is not required by ISO C or UNIX spec) and/or if we support
13333# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013334ac_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 +000013335#include <$ac_cv_struct_tm>
13336
Matthias Kloseb9621712010-04-24 17:59:49 +000013337"
Victor Stinnere0be4232011-10-25 13:06:09 +020013338if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013339
13340cat >>confdefs.h <<_ACEOF
13341#define HAVE_STRUCT_TM_TM_ZONE 1
13342_ACEOF
13343
13344
13345fi
13346
13347if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13348
Matthias Kloseb9621712010-04-24 17:59:49 +000013349$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013350
13351else
Matthias Kloseb9621712010-04-24 17:59:49 +000013352 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13353"
Victor Stinnere0be4232011-10-25 13:06:09 +020013354if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013355 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013356else
Matthias Kloseb9621712010-04-24 17:59:49 +000013357 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013358fi
13359
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013360cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013361#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013362_ACEOF
13363
Matthias Kloseb9621712010-04-24 17:59:49 +000013364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13365$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013366if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013367 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013368else
Matthias Kloseb9621712010-04-24 17:59:49 +000013369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013370/* end confdefs.h. */
13371#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013372#if !HAVE_DECL_TZNAME
13373extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013374#endif
13375
13376int
13377main ()
13378{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013379return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013380 ;
13381 return 0;
13382}
13383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013384if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013385 ac_cv_var_tzname=yes
13386else
Matthias Kloseb9621712010-04-24 17:59:49 +000013387 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013388fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013389rm -f core conftest.err conftest.$ac_objext \
13390 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013391fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13393$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013394 if test $ac_cv_var_tzname = yes; then
13395
Matthias Kloseb9621712010-04-24 17:59:49 +000013396$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013397
13398 fi
13399fi
13400
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013401
Martin v. Löwis1d459062005-03-14 21:23:33 +000013402# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13404$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013405if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013406 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013407else
13408
Matthias Kloseb9621712010-04-24 17:59:49 +000013409if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013410 ac_cv_working_tzset=no
13411else
Matthias Kloseb9621712010-04-24 17:59:49 +000013412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013413/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013414
13415#include <stdlib.h>
13416#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013417#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013418
13419#if HAVE_TZNAME
13420extern char *tzname[];
13421#endif
13422
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013423int main()
13424{
Brett Cannon18367812003-09-19 00:59:16 +000013425 /* Note that we need to ensure that not only does tzset(3)
13426 do 'something' with localtime, but it works as documented
13427 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013428 This includes making sure that tzname is set properly if
13429 tm->tm_zone does not exist since it is the alternative way
13430 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013431
13432 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013433 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013434 */
13435
Martin v. Löwis1d459062005-03-14 21:23:33 +000013436 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013437 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13438
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013439 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013440 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013441 if (localtime(&groundhogday)->tm_hour != 0)
13442 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013443#if HAVE_TZNAME
13444 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13445 if (strcmp(tzname[0], "UTC") ||
13446 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13447 exit(1);
13448#endif
Brett Cannon18367812003-09-19 00:59:16 +000013449
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013450 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013451 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013452 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013453 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013454#if HAVE_TZNAME
13455 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13456 exit(1);
13457#endif
Brett Cannon18367812003-09-19 00:59:16 +000013458
13459 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13460 tzset();
13461 if (localtime(&groundhogday)->tm_hour != 11)
13462 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013463#if HAVE_TZNAME
13464 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13465 exit(1);
13466#endif
13467
13468#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013469 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13470 exit(1);
13471 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13472 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013473#endif
Brett Cannon18367812003-09-19 00:59:16 +000013474
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013475 exit(0);
13476}
13477
13478_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013479if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013480 ac_cv_working_tzset=yes
13481else
Matthias Kloseb9621712010-04-24 17:59:49 +000013482 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013483fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013484rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13485 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013486fi
13487
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013488fi
13489
Matthias Kloseb9621712010-04-24 17:59:49 +000013490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13491$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013492if test "$ac_cv_working_tzset" = yes
13493then
13494
Matthias Kloseb9621712010-04-24 17:59:49 +000013495$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013496
13497fi
13498
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013499# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13501$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013502if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013503 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013504else
Matthias Kloseb9621712010-04-24 17:59:49 +000013505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013506/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013507#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013508int
13509main ()
13510{
13511
13512struct stat st;
13513st.st_mtim.tv_nsec = 1;
13514
13515 ;
13516 return 0;
13517}
13518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013519if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013520 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013521else
Matthias Kloseb9621712010-04-24 17:59:49 +000013522 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013523fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13525fi
13526
Matthias Kloseb9621712010-04-24 17:59:49 +000013527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13528$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013529if test "$ac_cv_stat_tv_nsec" = yes
13530then
13531
Matthias Kloseb9621712010-04-24 17:59:49 +000013532$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013533
13534fi
13535
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013536# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13538$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013539if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013540 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013541else
Matthias Kloseb9621712010-04-24 17:59:49 +000013542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013543/* end confdefs.h. */
13544#include <sys/stat.h>
13545int
13546main ()
13547{
13548
13549struct stat st;
13550st.st_mtimespec.tv_nsec = 1;
13551
13552 ;
13553 return 0;
13554}
13555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013556if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013557 ac_cv_stat_tv_nsec2=yes
13558else
Matthias Kloseb9621712010-04-24 17:59:49 +000013559 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013560fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13562fi
13563
Matthias Kloseb9621712010-04-24 17:59:49 +000013564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13565$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013566if test "$ac_cv_stat_tv_nsec2" = yes
13567then
13568
Matthias Kloseb9621712010-04-24 17:59:49 +000013569$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013570
13571fi
13572
Jack Jansen666b1e72001-10-31 12:11:48 +000013573# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13575$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013576if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013577 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013578else
Matthias Kloseb9621712010-04-24 17:59:49 +000013579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013580/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013581#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013582int
13583main ()
13584{
Jack Jansen666b1e72001-10-31 12:11:48 +000013585
13586 int rtn;
13587 rtn = mvwdelch(0,0,0);
13588
Martin v. Löwis11437992002-04-12 09:54:03 +000013589 ;
13590 return 0;
13591}
13592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013593if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013594 ac_cv_mvwdelch_is_expression=yes
13595else
Matthias Kloseb9621712010-04-24 17:59:49 +000013596 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13599fi
13600
Matthias Kloseb9621712010-04-24 17:59:49 +000013601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13602$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013603
13604if test "$ac_cv_mvwdelch_is_expression" = yes
13605then
Martin v. Löwis11437992002-04-12 09:54:03 +000013606
Matthias Kloseb9621712010-04-24 17:59:49 +000013607$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013608
13609fi
13610
Matthias Kloseb9621712010-04-24 17:59:49 +000013611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13612$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013613if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013614 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013615else
Matthias Kloseb9621712010-04-24 17:59:49 +000013616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013617/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013618#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013619int
13620main ()
13621{
Jack Jansen666b1e72001-10-31 12:11:48 +000013622
13623 WINDOW *w;
13624 w->_flags = 0;
13625
Martin v. Löwis11437992002-04-12 09:54:03 +000013626 ;
13627 return 0;
13628}
13629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013630if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013631 ac_cv_window_has_flags=yes
13632else
Matthias Kloseb9621712010-04-24 17:59:49 +000013633 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013634fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13636fi
13637
Matthias Kloseb9621712010-04-24 17:59:49 +000013638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13639$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013640
Jack Jansen666b1e72001-10-31 12:11:48 +000013641
13642if test "$ac_cv_window_has_flags" = yes
13643then
Martin v. Löwis11437992002-04-12 09:54:03 +000013644
Matthias Kloseb9621712010-04-24 17:59:49 +000013645$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013646
13647fi
13648
Matthias Kloseb9621712010-04-24 17:59:49 +000013649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13650$as_echo_n "checking for is_term_resized... " >&6; }
13651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013652/* end confdefs.h. */
13653#include <curses.h>
13654int
13655main ()
13656{
13657void *x=is_term_resized
13658 ;
13659 return 0;
13660}
13661_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013662if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013663
Matthias Kloseb9621712010-04-24 17:59:49 +000013664$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013665
Matthias Kloseb159a552010-04-25 21:00:44 +000013666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013667$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013668else
Matthias Kloseb9621712010-04-24 17:59:49 +000013669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13670$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013671
13672fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13674
Matthias Kloseb9621712010-04-24 17:59:49 +000013675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13676$as_echo_n "checking for resize_term... " >&6; }
13677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013678/* end confdefs.h. */
13679#include <curses.h>
13680int
13681main ()
13682{
13683void *x=resize_term
13684 ;
13685 return 0;
13686}
13687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013688if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013689
Matthias Kloseb9621712010-04-24 17:59:49 +000013690$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013691
Matthias Kloseb159a552010-04-25 21:00:44 +000013692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013693$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013694else
Matthias Kloseb9621712010-04-24 17:59:49 +000013695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13696$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013697
13698fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13700
Matthias Kloseb9621712010-04-24 17:59:49 +000013701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13702$as_echo_n "checking for resizeterm... " >&6; }
13703cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013704/* end confdefs.h. */
13705#include <curses.h>
13706int
13707main ()
13708{
13709void *x=resizeterm
13710 ;
13711 return 0;
13712}
13713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013714if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013715
Matthias Kloseb9621712010-04-24 17:59:49 +000013716$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013717
Matthias Kloseb159a552010-04-25 21:00:44 +000013718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013719$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013720else
Matthias Kloseb9621712010-04-24 17:59:49 +000013721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13722$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013723
13724fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13726
Matthias Kloseb9621712010-04-24 17:59:49 +000013727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13728$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013729
13730if test -r /dev/ptmx
13731then
Matthias Kloseb9621712010-04-24 17:59:49 +000013732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13733$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013734
Matthias Kloseb9621712010-04-24 17:59:49 +000013735$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013736
Thomas Wouters89f507f2006-12-13 04:49:30 +000013737else
Matthias Kloseb9621712010-04-24 17:59:49 +000013738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13739$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013740fi
13741
Matthias Kloseb9621712010-04-24 17:59:49 +000013742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13743$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013744
13745if test -r /dev/ptc
13746then
Matthias Kloseb9621712010-04-24 17:59:49 +000013747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13748$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013749
Matthias Kloseb9621712010-04-24 17:59:49 +000013750$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013751
Thomas Wouters89f507f2006-12-13 04:49:30 +000013752else
Matthias Kloseb9621712010-04-24 17:59:49 +000013753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13754$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013755fi
13756
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013757if test "$have_long_long" = yes
13758then
Matthias Kloseb9621712010-04-24 17:59:49 +000013759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13760$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013761 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013762 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013763else
Matthias Kloseb9621712010-04-24 17:59:49 +000013764 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013765 ac_cv_have_long_long_format=no
13766else
Matthias Kloseb9621712010-04-24 17:59:49 +000013767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013768/* end confdefs.h. */
13769
13770 #include <stdio.h>
13771 #include <stddef.h>
13772 #include <string.h>
13773
13774 #ifdef HAVE_SYS_TYPES_H
13775 #include <sys/types.h>
13776 #endif
13777
13778 int main()
13779 {
13780 char buffer[256];
13781
13782 if (sprintf(buffer, "%lld", (long long)123) < 0)
13783 return 1;
13784 if (strcmp(buffer, "123"))
13785 return 1;
13786
13787 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13788 return 1;
13789 if (strcmp(buffer, "-123"))
13790 return 1;
13791
13792 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13793 return 1;
13794 if (strcmp(buffer, "123"))
13795 return 1;
13796
13797 return 0;
13798 }
13799
13800_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013801if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013802 ac_cv_have_long_long_format=yes
13803else
Matthias Kloseb9621712010-04-24 17:59:49 +000013804 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013805fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013806rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13807 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013808fi
13809
13810
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013811fi
13812
Matthias Kloseb9621712010-04-24 17:59:49 +000013813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13814$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013815fi
13816
Mark Dickinson89d7d412009-12-31 20:50:59 +000013817if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013818then
13819
Matthias Kloseb9621712010-04-24 17:59:49 +000013820$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013821
13822fi
13823
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013824if test $ac_sys_system = Darwin
13825then
13826 LIBS="$LIBS -framework CoreFoundation"
13827fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013828
Matthias Kloseb9621712010-04-24 17:59:49 +000013829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13830$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013831if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013832 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013833else
Matthias Kloseb9621712010-04-24 17:59:49 +000013834 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013835 ac_cv_have_size_t_format="cross -- assuming yes"
13836
Thomas Wouters477c8d52006-05-27 19:21:47 +000013837else
Matthias Kloseb9621712010-04-24 17:59:49 +000013838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013839/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013840
Thomas Wouters477c8d52006-05-27 19:21:47 +000013841#include <stdio.h>
13842#include <stddef.h>
13843#include <string.h>
13844
Christian Heimes2c181612007-12-17 20:04:13 +000013845#ifdef HAVE_SYS_TYPES_H
13846#include <sys/types.h>
13847#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013848
13849#ifdef HAVE_SSIZE_T
13850typedef ssize_t Py_ssize_t;
13851#elif SIZEOF_VOID_P == SIZEOF_LONG
13852typedef long Py_ssize_t;
13853#else
13854typedef int Py_ssize_t;
13855#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013856
Christian Heimes2c181612007-12-17 20:04:13 +000013857int main()
13858{
13859 char buffer[256];
13860
Thomas Wouters477c8d52006-05-27 19:21:47 +000013861 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13862 return 1;
13863
Thomas Wouters89f507f2006-12-13 04:49:30 +000013864 if (strcmp(buffer, "123"))
13865 return 1;
13866
13867 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13868 return 1;
13869
13870 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013871 return 1;
13872
13873 return 0;
13874}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013875
Thomas Wouters477c8d52006-05-27 19:21:47 +000013876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013877if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013878 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013879else
Matthias Kloseb9621712010-04-24 17:59:49 +000013880 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013881fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013882rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13883 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013884fi
13885
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013886fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13888$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013889if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013890
Matthias Kloseb9621712010-04-24 17:59:49 +000013891$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013892
13893fi
13894
Matthias Kloseb9621712010-04-24 17:59:49 +000013895ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013896#ifdef HAVE_SYS_TYPES_H
13897#include <sys/types.h>
13898#endif
13899#ifdef HAVE_SYS_SOCKET_H
13900#include <sys/socket.h>
13901#endif
13902
Matthias Kloseb9621712010-04-24 17:59:49 +000013903"
Victor Stinnere0be4232011-10-25 13:06:09 +020013904if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013905
Martin v. Löwis11437992002-04-12 09:54:03 +000013906else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013907
Matthias Kloseb9621712010-04-24 17:59:49 +000013908$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013909
13910fi
13911
Michael W. Hudson54241132001-12-07 15:38:26 +000013912
Matthias Kloseb9621712010-04-24 17:59:49 +000013913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13914$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013915if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013916 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013917else
Matthias Kloseb9621712010-04-24 17:59:49 +000013918 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013919 ac_cv_broken_mbstowcs=no
13920else
Matthias Kloseb9621712010-04-24 17:59:49 +000013921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013922/* end confdefs.h. */
13923
13924#include<stdlib.h>
13925int main() {
13926 size_t len = -1;
13927 const char *str = "text";
13928 len = mbstowcs(NULL, str, 0);
13929 return (len != 4);
13930}
13931
13932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013933if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013934 ac_cv_broken_mbstowcs=no
13935else
Matthias Kloseb9621712010-04-24 17:59:49 +000013936 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013937fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013938rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13939 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013940fi
13941
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013942fi
13943
Matthias Kloseb9621712010-04-24 17:59:49 +000013944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13945$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013946if test "$ac_cv_broken_mbstowcs" = yes
13947then
13948
Matthias Kloseb9621712010-04-24 17:59:49 +000013949$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013950
13951fi
13952
Antoine Pitrou042b1282010-08-13 21:15:58 +000013953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13954$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013955if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013956 $as_echo_n "(cached) " >&6
13957else
13958 if test "$cross_compiling" = yes; then :
13959 ac_cv_computed_gotos=no
13960else
13961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13962/* end confdefs.h. */
13963
13964int main(int argc, char **argv)
13965{
13966 static void *targets[1] = { &&LABEL1 };
13967 goto LABEL2;
13968LABEL1:
13969 return 0;
13970LABEL2:
13971 goto *targets[0];
13972 return 1;
13973}
13974
13975_ACEOF
13976if ac_fn_c_try_run "$LINENO"; then :
13977 ac_cv_computed_gotos=yes
13978else
13979 ac_cv_computed_gotos=no
13980fi
13981rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13982 conftest.$ac_objext conftest.beam conftest.$ac_ext
13983fi
13984
13985fi
13986
13987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13988$as_echo "$ac_cv_computed_gotos" >&6; }
13989if test "$ac_cv_computed_gotos" = yes
13990then
13991
13992$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13993
13994fi
13995
Antoine Pitroub52ec782009-01-25 16:34:23 +000013996# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13998$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013999
14000# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014001if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014002 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014003if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014004then
14005
Matthias Kloseb9621712010-04-24 17:59:49 +000014006$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014007
Matthias Kloseb9621712010-04-24 17:59:49 +000014008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14009$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014010fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014011if test "$withval" = no
14012then
14013
14014$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14015
Matthias Kloseb9621712010-04-24 17:59:49 +000014016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14017$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014018fi
14019
Antoine Pitrou042b1282010-08-13 21:15:58 +000014020else
14021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14022$as_echo "no value specified" >&6; }
14023fi
14024
Antoine Pitroub52ec782009-01-25 16:34:23 +000014025
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014026case $ac_sys_system in
14027AIX*)
14028
14029$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14030 ;;
14031esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014032
Michael W. Hudson54241132001-12-07 15:38:26 +000014033
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014034
14035
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014036for h in `(cd $srcdir;echo Python/thread_*.h)`
14037do
14038 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14039done
14040
Michael W. Hudson54241132001-12-07 15:38:26 +000014041
Neal Norwitzd24499d2005-12-18 21:36:39 +000014042SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14044$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014045for dir in $SRCDIRS; do
14046 if test ! -d $dir; then
14047 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014048 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014049done
Matthias Kloseb9621712010-04-24 17:59:49 +000014050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14051$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014052
Guido van Rossum627b2d71993-12-24 10:39:16 +000014053# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000014054ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014055
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014056ac_config_files="$ac_config_files Modules/ld_so_aix"
14057
Martin v. Löwis11437992002-04-12 09:54:03 +000014058cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014059# This file is a shell script that caches the results of configure
14060# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014061# scripts and configure runs, see configure's option --config-cache.
14062# It is not useful on other systems. If it contains results you don't
14063# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014064#
Martin v. Löwis11437992002-04-12 09:54:03 +000014065# config.status only pays attention to the cache file if you give it
14066# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014067#
Skip Montanaro6dead952003-09-25 14:50:04 +000014068# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014069# loading this file, other *unset* `ac_cv_foo' will be assigned the
14070# following values.
14071
14072_ACEOF
14073
Guido van Rossumf78abae1997-01-21 22:02:36 +000014074# The following way of writing the cache mishandles newlines in values,
14075# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014076# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014077# Ultrix sh set writes to stderr and can't be redirected directly,
14078# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014079(
14080 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14081 eval ac_val=\$$ac_var
14082 case $ac_val in #(
14083 *${as_nl}*)
14084 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014085 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14086$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014087 esac
14088 case $ac_var in #(
14089 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014090 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14091 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014092 esac ;;
14093 esac
14094 done
14095
Martin v. Löwis11437992002-04-12 09:54:03 +000014096 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014097 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14098 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000014099 # `set' does not quote correctly, so add quotes: double-quote
14100 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014101 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014102 "s/'/'\\\\''/g;
14103 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014104 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014105 *)
14106 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014107 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014108 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014109 esac |
14110 sort
14111) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014112 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014113 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014114 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014115 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014116 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14117 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014118 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14119 :end' >>confcache
14120if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14121 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020014122 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014123 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14124$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020014125 if test ! -f "$cache_file" || test -h "$cache_file"; then
14126 cat confcache >"$cache_file"
14127 else
14128 case $cache_file in #(
14129 */* | ?:*)
14130 mv -f confcache "$cache_file"$$ &&
14131 mv -f "$cache_file"$$ "$cache_file" ;; #(
14132 *)
14133 mv -f confcache "$cache_file" ;;
14134 esac
14135 fi
14136 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014137 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014138 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14139$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014140 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014141fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014142rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014143
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014144test "x$prefix" = xNONE && prefix=$ac_default_prefix
14145# Let make expand exec_prefix.
14146test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014147
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014148DEFS=-DHAVE_CONFIG_H
14149
Skip Montanaro6dead952003-09-25 14:50:04 +000014150ac_libobjs=
14151ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014152U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014153for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14154 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014155 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000014156 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014157 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14158 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000014159 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14160 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014161done
14162LIBOBJS=$ac_libobjs
14163
14164LTLIBOBJS=$ac_ltlibobjs
14165
14166
Martin v. Löwis11437992002-04-12 09:54:03 +000014167
Matthias Kloseb9621712010-04-24 17:59:49 +000014168
Victor Stinnere0be4232011-10-25 13:06:09 +020014169: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000014170ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014171ac_clean_files_save=$ac_clean_files
14172ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014173{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14174$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14175as_write_fail=0
14176cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014177#! $SHELL
14178# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014179# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014180# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014181# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014182
Martin v. Löwis11437992002-04-12 09:54:03 +000014183debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014184ac_cs_recheck=false
14185ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014186
Matthias Kloseb9621712010-04-24 17:59:49 +000014187SHELL=\${CONFIG_SHELL-$SHELL}
14188export SHELL
14189_ASEOF
14190cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14191## -------------------- ##
14192## M4sh Initialization. ##
14193## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014194
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014195# Be more Bourne compatible
14196DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014197if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014198 emulate sh
14199 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014200 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014201 # is contrary to our usage. Disable this feature.
14202 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014203 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014204else
Matthias Kloseb9621712010-04-24 17:59:49 +000014205 case `(set -o) 2>/dev/null` in #(
14206 *posix*) :
14207 set -o posix ;; #(
14208 *) :
14209 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014210esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014211fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014212
14213
Matthias Kloseb9621712010-04-24 17:59:49 +000014214as_nl='
14215'
14216export as_nl
14217# Printing a long string crashes Solaris 7 /usr/bin/printf.
14218as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14219as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14220as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14221# Prefer a ksh shell builtin over an external printf program on Solaris,
14222# but without wasting forks for bash or zsh.
14223if test -z "$BASH_VERSION$ZSH_VERSION" \
14224 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14225 as_echo='print -r --'
14226 as_echo_n='print -rn --'
14227elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14228 as_echo='printf %s\n'
14229 as_echo_n='printf %s'
14230else
14231 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14232 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14233 as_echo_n='/usr/ucb/echo -n'
14234 else
14235 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14236 as_echo_n_body='eval
14237 arg=$1;
14238 case $arg in #(
14239 *"$as_nl"*)
14240 expr "X$arg" : "X\\(.*\\)$as_nl";
14241 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14242 esac;
14243 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14244 '
14245 export as_echo_n_body
14246 as_echo_n='sh -c $as_echo_n_body as_echo'
14247 fi
14248 export as_echo_body
14249 as_echo='sh -c $as_echo_body as_echo'
14250fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014251
14252# The user is always right.
14253if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014254 PATH_SEPARATOR=:
14255 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14256 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14257 PATH_SEPARATOR=';'
14258 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014259fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014260
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014261
14262# IFS
14263# We need space, tab and new line, in precisely that order. Quoting is
14264# there to prevent editors from complaining about space-tab.
14265# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14266# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014267IFS=" "" $as_nl"
14268
14269# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020014270as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014271case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014272 *[\\/]* ) as_myself=$0 ;;
14273 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014274for as_dir in $PATH
14275do
14276 IFS=$as_save_IFS
14277 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014278 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14279 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014280IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014281
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014282 ;;
14283esac
14284# We did not find ourselves, most probably we were run as `sh COMMAND'
14285# in which case we are not to be found in the path.
14286if test "x$as_myself" = x; then
14287 as_myself=$0
14288fi
14289if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014290 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14291 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014292fi
14293
Matthias Kloseb9621712010-04-24 17:59:49 +000014294# Unset variables that we do not need and which cause bugs (e.g. in
14295# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14296# suppresses any "Segmentation fault" message there. '((' could
14297# trigger a bug in pdksh 5.2.14.
14298for as_var in BASH_ENV ENV MAIL MAILPATH
14299do eval test x\${$as_var+set} = xset \
14300 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014301done
14302PS1='$ '
14303PS2='> '
14304PS4='+ '
14305
14306# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014307LC_ALL=C
14308export LC_ALL
14309LANGUAGE=C
14310export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014311
Matthias Kloseb9621712010-04-24 17:59:49 +000014312# CDPATH.
14313(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14314
14315
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014316# as_fn_error STATUS ERROR [LINENO LOG_FD]
14317# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014318# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14319# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014320# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014321as_fn_error ()
14322{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014323 as_status=$1; test $as_status -eq 0 && as_status=1
14324 if test "$4"; then
14325 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14326 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014327 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014328 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014329 as_fn_exit $as_status
14330} # as_fn_error
14331
14332
14333# as_fn_set_status STATUS
14334# -----------------------
14335# Set $? to STATUS, without forking.
14336as_fn_set_status ()
14337{
14338 return $1
14339} # as_fn_set_status
14340
14341# as_fn_exit STATUS
14342# -----------------
14343# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14344as_fn_exit ()
14345{
14346 set +e
14347 as_fn_set_status $1
14348 exit $1
14349} # as_fn_exit
14350
14351# as_fn_unset VAR
14352# ---------------
14353# Portably unset VAR.
14354as_fn_unset ()
14355{
14356 { eval $1=; unset $1;}
14357}
14358as_unset=as_fn_unset
14359# as_fn_append VAR VALUE
14360# ----------------------
14361# Append the text in VALUE to the end of the definition contained in VAR. Take
14362# advantage of any shell optimizations that allow amortized linear growth over
14363# repeated appends, instead of the typical quadratic growth present in naive
14364# implementations.
14365if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14366 eval 'as_fn_append ()
14367 {
14368 eval $1+=\$2
14369 }'
14370else
14371 as_fn_append ()
14372 {
14373 eval $1=\$$1\$2
14374 }
14375fi # as_fn_append
14376
14377# as_fn_arith ARG...
14378# ------------------
14379# Perform arithmetic evaluation on the ARGs, and store the result in the
14380# global $as_val. Take advantage of shells that can avoid forks. The arguments
14381# must be portable across $(()) and expr.
14382if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14383 eval 'as_fn_arith ()
14384 {
14385 as_val=$(( $* ))
14386 }'
14387else
14388 as_fn_arith ()
14389 {
14390 as_val=`expr "$@" || test $? -eq 1`
14391 }
14392fi # as_fn_arith
14393
14394
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014395if expr a : '\(a\)' >/dev/null 2>&1 &&
14396 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14397 as_expr=expr
14398else
14399 as_expr=false
14400fi
14401
14402if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14403 as_basename=basename
14404else
14405 as_basename=false
14406fi
14407
Matthias Kloseb9621712010-04-24 17:59:49 +000014408if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14409 as_dirname=dirname
14410else
14411 as_dirname=false
14412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014413
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014414as_me=`$as_basename -- "$0" ||
14415$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14416 X"$0" : 'X\(//\)$' \| \
14417 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014418$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014419 sed '/^.*\/\([^/][^/]*\)\/*$/{
14420 s//\1/
14421 q
14422 }
14423 /^X\/\(\/\/\)$/{
14424 s//\1/
14425 q
14426 }
14427 /^X\/\(\/\).*/{
14428 s//\1/
14429 q
14430 }
14431 s/.*/./; q'`
14432
Matthias Kloseb9621712010-04-24 17:59:49 +000014433# Avoid depending upon Character Ranges.
14434as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14435as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14436as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14437as_cr_digits='0123456789'
14438as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014439
14440ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014441case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014442-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014443 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014444 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014445 xy) ECHO_C='\c';;
14446 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14447 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014448 esac;;
14449*)
14450 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014451esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014452
Martin v. Löwis11437992002-04-12 09:54:03 +000014453rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014454if test -d conf$$.dir; then
14455 rm -f conf$$.dir/conf$$.file
14456else
14457 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014458 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014459fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014460if (echo >conf$$.file) 2>/dev/null; then
14461 if ln -s conf$$.file conf$$ 2>/dev/null; then
14462 as_ln_s='ln -s'
14463 # ... but there are two gotchas:
14464 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14465 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14466 # In both cases, we have to default to `cp -p'.
14467 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14468 as_ln_s='cp -p'
14469 elif ln conf$$.file conf$$ 2>/dev/null; then
14470 as_ln_s=ln
14471 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014472 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014473 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014474else
14475 as_ln_s='cp -p'
14476fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014477rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14478rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014479
Matthias Kloseb9621712010-04-24 17:59:49 +000014480
14481# as_fn_mkdir_p
14482# -------------
14483# Create "$as_dir" as a directory, including parents if necessary.
14484as_fn_mkdir_p ()
14485{
14486
14487 case $as_dir in #(
14488 -*) as_dir=./$as_dir;;
14489 esac
14490 test -d "$as_dir" || eval $as_mkdir_p || {
14491 as_dirs=
14492 while :; do
14493 case $as_dir in #(
14494 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14495 *) as_qdir=$as_dir;;
14496 esac
14497 as_dirs="'$as_qdir' $as_dirs"
14498 as_dir=`$as_dirname -- "$as_dir" ||
14499$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14500 X"$as_dir" : 'X\(//\)[^/]' \| \
14501 X"$as_dir" : 'X\(//\)$' \| \
14502 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14503$as_echo X"$as_dir" |
14504 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14505 s//\1/
14506 q
14507 }
14508 /^X\(\/\/\)[^/].*/{
14509 s//\1/
14510 q
14511 }
14512 /^X\(\/\/\)$/{
14513 s//\1/
14514 q
14515 }
14516 /^X\(\/\).*/{
14517 s//\1/
14518 q
14519 }
14520 s/.*/./; q'`
14521 test -d "$as_dir" && break
14522 done
14523 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014524 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014525
14526
14527} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014528if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014529 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014530else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014531 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014532 as_mkdir_p=false
14533fi
14534
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014535if test -x / >/dev/null 2>&1; then
14536 as_test_x='test -x'
14537else
14538 if ls -dL / >/dev/null 2>&1; then
14539 as_ls_L_option=L
14540 else
14541 as_ls_L_option=
14542 fi
14543 as_test_x='
14544 eval sh -c '\''
14545 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014546 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014547 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014548 case $1 in #(
14549 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014550 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014551 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014552 ???[sx]*):;;*)false;;esac;fi
14553 '\'' sh
14554 '
14555fi
14556as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014557
14558# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014559as_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 +000014560
14561# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014562as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014563
14564
Martin v. Löwis11437992002-04-12 09:54:03 +000014565exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014566## ----------------------------------- ##
14567## Main body of $CONFIG_STATUS script. ##
14568## ----------------------------------- ##
14569_ASEOF
14570test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014571
Matthias Kloseb9621712010-04-24 17:59:49 +000014572cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14573# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014574# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014575# values after options handling.
14576ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014577This file was extended by python $as_me 3.3, which was
Victor Stinnere0be4232011-10-25 13:06:09 +020014578generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014579
14580 CONFIG_FILES = $CONFIG_FILES
14581 CONFIG_HEADERS = $CONFIG_HEADERS
14582 CONFIG_LINKS = $CONFIG_LINKS
14583 CONFIG_COMMANDS = $CONFIG_COMMANDS
14584 $ $0 $@
14585
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014586on `(hostname || uname -n) 2>/dev/null | sed 1q`
14587"
14588
Martin v. Löwis11437992002-04-12 09:54:03 +000014589_ACEOF
14590
Matthias Kloseb9621712010-04-24 17:59:49 +000014591case $ac_config_files in *"
14592"*) set x $ac_config_files; shift; ac_config_files=$*;;
14593esac
14594
14595case $ac_config_headers in *"
14596"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14597esac
14598
14599
14600cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014601# Files that config.status was made for.
Benjamin Peterson95c16622011-12-27 15:36:32 -060014602config_files="$ac_config_files"
14603config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014604
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014605_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014606
Matthias Kloseb9621712010-04-24 17:59:49 +000014607cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014608ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014609\`$as_me' instantiates files and other configuration actions
14610from templates according to the current configuration. Unless the files
14611and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014612
Matthias Kloseb9621712010-04-24 17:59:49 +000014613Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014614
14615 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014616 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014617 --config print configuration, then exit
14618 -q, --quiet, --silent
14619 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014620 -d, --debug don't remove temporary files
14621 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014622 --file=FILE[:TEMPLATE]
14623 instantiate the configuration file FILE
14624 --header=FILE[:TEMPLATE]
14625 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014626
14627Configuration files:
14628$config_files
14629
14630Configuration headers:
14631$config_headers
14632
Matthias Kloseb9621712010-04-24 17:59:49 +000014633Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014634
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014635_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014636cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14637ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014638ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014639python config.status 3.3
Victor Stinnere0be4232011-10-25 13:06:09 +020014640configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000014641 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014642
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014643Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014644This config.status script is free software; the Free Software Foundation
14645gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014646
14647ac_pwd='$ac_pwd'
14648srcdir='$srcdir'
14649INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014650test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014651_ACEOF
14652
Matthias Kloseb9621712010-04-24 17:59:49 +000014653cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14654# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014655ac_need_defaults=:
14656while test $# != 0
14657do
14658 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014659 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014660 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14661 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014662 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014663 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014664 --*=)
14665 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14666 ac_optarg=
14667 ac_shift=:
14668 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014669 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014670 ac_option=$1
14671 ac_optarg=$2
14672 ac_shift=shift
14673 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014674 esac
14675
Skip Montanaro6dead952003-09-25 14:50:04 +000014676 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014677 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014678 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14679 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014680 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014681 $as_echo "$ac_cs_version"; exit ;;
14682 --config | --confi | --conf | --con | --co | --c )
14683 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014684 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014685 debug=: ;;
14686 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014687 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014688 case $ac_optarg in
14689 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014690 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014691 esac
14692 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014693 ac_need_defaults=false;;
14694 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014695 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014696 case $ac_optarg in
14697 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14698 esac
14699 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014700 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014701 --he | --h)
14702 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014703 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014704Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014705 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014706 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014707 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14708 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14709 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014710
14711 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014712 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014713Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014714
Matthias Kloseb9621712010-04-24 17:59:49 +000014715 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014716 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014717
14718 esac
14719 shift
14720done
14721
Skip Montanaro6dead952003-09-25 14:50:04 +000014722ac_configure_extra_args=
14723
14724if $ac_cs_silent; then
14725 exec 6>/dev/null
14726 ac_configure_extra_args="$ac_configure_extra_args --silent"
14727fi
14728
14729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014730cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014731if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014732 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14733 shift
14734 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14735 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014736 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014737 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014738fi
14739
Martin v. Löwis11437992002-04-12 09:54:03 +000014740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014741cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014742exec 5>>config.log
14743{
14744 echo
14745 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14746## Running $as_me. ##
14747_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014748 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014749} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014750
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014752cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014753_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014754
Matthias Kloseb9621712010-04-24 17:59:49 +000014755cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014756
14757# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014758for ac_config_target in $ac_config_targets
14759do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014760 case $ac_config_target in
14761 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14762 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14763 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014764 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14765 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014766 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14767 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014768 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014769 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014770
Victor Stinnere0be4232011-10-25 13:06:09 +020014771 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014772 esac
14773done
14774
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014775
Martin v. Löwis11437992002-04-12 09:54:03 +000014776# If the user did not use the arguments to specify the items to instantiate,
14777# then the envvar interface is used. Set only those that are not.
14778# We use the long form for the default assignment because of an extremely
14779# bizarre bug on SunOS 4.1.3.
14780if $ac_need_defaults; then
14781 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14782 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14783fi
14784
Skip Montanaro6dead952003-09-25 14:50:04 +000014785# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014786# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014787# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014788# Hook for its removal unless debugging.
14789# Note that there is a small window in which the directory will not be cleaned:
14790# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014791$debug ||
14792{
Victor Stinnere0be4232011-10-25 13:06:09 +020014793 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014794 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020014795 : "${ac_tmp:=$tmp}"
14796 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014797' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014798 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014799}
Martin v. Löwis11437992002-04-12 09:54:03 +000014800# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014801
Martin v. Löwis11437992002-04-12 09:54:03 +000014802{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014803 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020014804 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014805} ||
14806{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014807 tmp=./conf$$-$RANDOM
14808 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014809} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020014810ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014811
Matthias Kloseb9621712010-04-24 17:59:49 +000014812# Set up the scripts for CONFIG_FILES section.
14813# No need to generate them if there are no CONFIG_FILES.
14814# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014815if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014816
Matthias Kloseb9621712010-04-24 17:59:49 +000014817
14818ac_cr=`echo X | tr X '\015'`
14819# On cygwin, bash can eat \r inside `` if the user requested igncr.
14820# But we know of no other shell where ac_cr would be empty at this
14821# point, so we can use a bashism as a fallback.
14822if test "x$ac_cr" = x; then
14823 eval ac_cr=\$\'\\r\'
14824fi
14825ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14826if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014827 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014828else
14829 ac_cs_awk_cr=$ac_cr
14830fi
14831
Victor Stinnere0be4232011-10-25 13:06:09 +020014832echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014833_ACEOF
14834
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014835
Matthias Kloseb9621712010-04-24 17:59:49 +000014836{
14837 echo "cat >conf$$subs.awk <<_ACEOF" &&
14838 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14839 echo "_ACEOF"
14840} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014841 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14842ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014843ac_delim='%!_!# '
14844for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014845 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014846 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014847
Matthias Kloseb9621712010-04-24 17:59:49 +000014848 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14849 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014850 break
14851 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014852 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014853 else
14854 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014855 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014856done
Matthias Kloseb9621712010-04-24 17:59:49 +000014857rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014858
Matthias Kloseb9621712010-04-24 17:59:49 +000014859cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020014860cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014862sed -n '
14863h
14864s/^/S["/; s/!.*/"]=/
14865p
14866g
14867s/^[^!]*!//
14868:repl
14869t repl
14870s/'"$ac_delim"'$//
14871t delim
14872:nl
14873h
14874s/\(.\{148\}\)..*/\1/
14875t more1
14876s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14877p
14878n
14879b repl
14880:more1
14881s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14882p
14883g
14884s/.\{148\}//
14885t nl
14886:delim
14887h
14888s/\(.\{148\}\)..*/\1/
14889t more2
14890s/["\\]/\\&/g; s/^/"/; s/$/"/
14891p
14892b
14893:more2
14894s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14895p
14896g
14897s/.\{148\}//
14898t delim
14899' <conf$$subs.awk | sed '
14900/^[^""]/{
14901 N
14902 s/\n//
14903}
14904' >>$CONFIG_STATUS || ac_write_fail=1
14905rm -f conf$$subs.awk
14906cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14907_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020014908cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014909 for (key in S) S_is_set[key] = 1
14910 FS = ""
14911
14912}
14913{
14914 line = $ 0
14915 nfields = split(line, field, "@")
14916 substed = 0
14917 len = length(field[1])
14918 for (i = 2; i < nfields; i++) {
14919 key = field[i]
14920 keylen = length(key)
14921 if (S_is_set[key]) {
14922 value = S[key]
14923 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14924 len += length(value) + length(field[++i])
14925 substed = 1
14926 } else
14927 len += 1 + keylen
14928 }
14929
14930 print line
14931}
14932
14933_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014935cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14936if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14937 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14938else
14939 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020014940fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014941 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014942_ACEOF
14943
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014944# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14945# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014946# trailing colons and then remove the whole line if VPATH becomes empty
14947# (actually we leave an empty line to preserve line numbers).
14948if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014949 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14950h
14951s///
14952s/^/:/
14953s/[ ]*$/:/
14954s/:\$(srcdir):/:/g
14955s/:\${srcdir}:/:/g
14956s/:@srcdir@:/:/g
14957s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014958s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014959x
14960s/\(=[ ]*\).*/\1/
14961G
14962s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014963s/^[^=]*=[ ]*$//
14964}'
14965fi
14966
Matthias Kloseb9621712010-04-24 17:59:49 +000014967cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014968fi # test -n "$CONFIG_FILES"
14969
Matthias Kloseb9621712010-04-24 17:59:49 +000014970# Set up the scripts for CONFIG_HEADERS section.
14971# No need to generate them if there are no CONFIG_HEADERS.
14972# This happens for instance with `./config.status Makefile'.
14973if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020014974cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014975BEGIN {
14976_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014977
Matthias Kloseb9621712010-04-24 17:59:49 +000014978# Transform confdefs.h into an awk script `defines.awk', embedded as
14979# here-document in config.status, that substitutes the proper values into
14980# config.h.in to produce config.h.
14981
14982# Create a delimiter string that does not exist in confdefs.h, to ease
14983# handling of long lines.
14984ac_delim='%!_!# '
14985for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020014986 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14987 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014988 break
14989 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014990 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014991 else
14992 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14993 fi
14994done
14995
14996# For the awk script, D is an array of macro values keyed by name,
14997# likewise P contains macro parameters if any. Preserve backslash
14998# newline sequences.
14999
15000ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15001sed -n '
15002s/.\{148\}/&'"$ac_delim"'/g
15003t rset
15004:rset
15005s/^[ ]*#[ ]*define[ ][ ]*/ /
15006t def
15007d
15008:def
15009s/\\$//
15010t bsnl
15011s/["\\]/\\&/g
15012s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15013D["\1"]=" \3"/p
15014s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15015d
15016:bsnl
15017s/["\\]/\\&/g
15018s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15019D["\1"]=" \3\\\\\\n"\\/p
15020t cont
15021s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15022t cont
15023d
15024:cont
15025n
15026s/.\{148\}/&'"$ac_delim"'/g
15027t clear
15028:clear
15029s/\\$//
15030t bsnlc
15031s/["\\]/\\&/g; s/^/"/; s/$/"/p
15032d
15033:bsnlc
15034s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15035b cont
15036' <confdefs.h | sed '
15037s/'"$ac_delim"'/"\\\
15038"/g' >>$CONFIG_STATUS || ac_write_fail=1
15039
15040cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15041 for (key in D) D_is_set[key] = 1
15042 FS = ""
15043}
15044/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15045 line = \$ 0
15046 split(line, arg, " ")
15047 if (arg[1] == "#") {
15048 defundef = arg[2]
15049 mac1 = arg[3]
15050 } else {
15051 defundef = substr(arg[1], 2)
15052 mac1 = arg[2]
15053 }
15054 split(mac1, mac2, "(") #)
15055 macro = mac2[1]
15056 prefix = substr(line, 1, index(line, defundef) - 1)
15057 if (D_is_set[macro]) {
15058 # Preserve the white space surrounding the "#".
15059 print prefix "define", macro P[macro] D[macro]
15060 next
15061 } else {
15062 # Replace #undef with comments. This is necessary, for example,
15063 # in the case of _POSIX_SOURCE, which is predefined and required
15064 # on some systems where configure will not decide to define it.
15065 if (defundef == "undef") {
15066 print "/*", prefix defundef, macro, "*/"
15067 next
15068 }
15069 }
15070}
15071{ print }
15072_ACAWK
15073_ACEOF
15074cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015075 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015076fi # test -n "$CONFIG_HEADERS"
15077
15078
15079eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15080shift
15081for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015082do
15083 case $ac_tag in
15084 :[FHLC]) ac_mode=$ac_tag; continue;;
15085 esac
15086 case $ac_mode$ac_tag in
15087 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020015088 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015089 :[FH]-) ac_tag=-:-;;
15090 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15091 esac
15092 ac_save_IFS=$IFS
15093 IFS=:
15094 set x $ac_tag
15095 IFS=$ac_save_IFS
15096 shift
15097 ac_file=$1
15098 shift
15099
15100 case $ac_mode in
15101 :L) ac_source=$1;;
15102 :[FH])
15103 ac_file_inputs=
15104 for ac_f
15105 do
15106 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020015107 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015108 *) # Look for the file first in the build tree, then in the source tree
15109 # (if the path is not absolute). The absolute path cannot be DOS-style,
15110 # because $ac_f cannot contain `:'.
15111 test -f "$ac_f" ||
15112 case $ac_f in
15113 [\\/$]*) false;;
15114 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15115 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020015116 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015117 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000015118 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15119 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015120 done
15121
15122 # Let's still pretend it is `configure' which instantiates (i.e., don't
15123 # use $as_me), people would be surprised to read:
15124 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015125 configure_input='Generated from '`
15126 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15127 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015128 if test x"$ac_file" != x-; then
15129 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000015130 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15131$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015132 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015133 # Neutralize special characters interpreted by sed in replacement strings.
15134 case $configure_input in #(
15135 *\&* | *\|* | *\\* )
15136 ac_sed_conf_input=`$as_echo "$configure_input" |
15137 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15138 *) ac_sed_conf_input=$configure_input;;
15139 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015140
15141 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020015142 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15143 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015144 esac
15145 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015146 esac
15147
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015148 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015149$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015150 X"$ac_file" : 'X\(//\)[^/]' \| \
15151 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015152 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015153$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015154 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15155 s//\1/
15156 q
15157 }
15158 /^X\(\/\/\)[^/].*/{
15159 s//\1/
15160 q
15161 }
15162 /^X\(\/\/\)$/{
15163 s//\1/
15164 q
15165 }
15166 /^X\(\/\).*/{
15167 s//\1/
15168 q
15169 }
15170 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000015171 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015172 ac_builddir=.
15173
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015174case "$ac_dir" in
15175.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15176*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015177 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015178 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015179 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015180 case $ac_top_builddir_sub in
15181 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15182 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15183 esac ;;
15184esac
15185ac_abs_top_builddir=$ac_pwd
15186ac_abs_builddir=$ac_pwd$ac_dir_suffix
15187# for backward compatibility:
15188ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015189
15190case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015191 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015192 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015193 ac_top_srcdir=$ac_top_builddir_sub
15194 ac_abs_top_srcdir=$ac_pwd ;;
15195 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015196 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015197 ac_top_srcdir=$srcdir
15198 ac_abs_top_srcdir=$srcdir ;;
15199 *) # Relative name.
15200 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15201 ac_top_srcdir=$ac_top_build_prefix$srcdir
15202 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015203esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015204ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015205
Martin v. Löwis11437992002-04-12 09:54:03 +000015206
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015207 case $ac_mode in
15208 :F)
15209 #
15210 # CONFIG_FILE
15211 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015212
15213 case $INSTALL in
15214 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015215 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015216 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015217_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015218
Matthias Kloseb9621712010-04-24 17:59:49 +000015219cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015220# If the template does not know about datarootdir, expand it.
15221# FIXME: This hack should be removed a few years after 2.60.
15222ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015223ac_sed_dataroot='
15224/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015225 p
15226 q
15227}
15228/@datadir@/p
15229/@docdir@/p
15230/@infodir@/p
15231/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015232/@mandir@/p'
15233case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015234*datarootdir*) ac_datarootdir_seen=yes;;
15235*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015236 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15237$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015239cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015240 ac_datarootdir_hack='
15241 s&@datadir@&$datadir&g
15242 s&@docdir@&$docdir&g
15243 s&@infodir@&$infodir&g
15244 s&@localedir@&$localedir&g
15245 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015246 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015247esac
15248_ACEOF
15249
15250# Neutralize VPATH when `$srcdir' = `.'.
15251# Shell code in configure.ac might set extrasub.
15252# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015253cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15254ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015255$extrasub
15256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015257cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015258:t
15259/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015260s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015261s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015262s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015263s&@srcdir@&$ac_srcdir&;t t
15264s&@abs_srcdir@&$ac_abs_srcdir&;t t
15265s&@top_srcdir@&$ac_top_srcdir&;t t
15266s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15267s&@builddir@&$ac_builddir&;t t
15268s&@abs_builddir@&$ac_abs_builddir&;t t
15269s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15270s&@INSTALL@&$ac_INSTALL&;t t
15271$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015272"
Victor Stinnere0be4232011-10-25 13:06:09 +020015273eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15274 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015275
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015276test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015277 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15278 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15279 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015280 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015281which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015282$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015283which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015284
Victor Stinnere0be4232011-10-25 13:06:09 +020015285 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015286 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020015287 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15288 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015289 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015290 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015291 ;;
15292 :H)
15293 #
15294 # CONFIG_HEADER
15295 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015296 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015297 {
15298 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020015299 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15300 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015301 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015302 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015303 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15304$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015305 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015306 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020015307 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015308 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015309 fi
15310 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015311 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020015312 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015313 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015314 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015315 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015316
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015317
15318 esac
15319
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015320
15321 case $ac_file$ac_mode in
15322 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15323
15324 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015325done # for ac_tag
15326
Guido van Rossum627b2d71993-12-24 10:39:16 +000015327
Matthias Kloseb9621712010-04-24 17:59:49 +000015328as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015329_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015330ac_clean_files=$ac_clean_files_save
15331
Matthias Kloseb9621712010-04-24 17:59:49 +000015332test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015333 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015334
Martin v. Löwis11437992002-04-12 09:54:03 +000015335
15336# configure is writing to config.log, and then calls config.status.
15337# config.status does its own redirection, appending to config.log.
15338# Unfortunately, on DOS this fails, as config.log is still kept open
15339# by configure, so config.status won't be able to write to it; its
15340# output is simply discarded. So we exec the FD to /dev/null,
15341# effectively closing config.log, so it can be properly (re)opened and
15342# appended to by config.status. When coming back to configure, we
15343# need to make the FD available again.
15344if test "$no_create" != yes; then
15345 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015346 ac_config_status_args=
15347 test "$silent" = yes &&
15348 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015349 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015350 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015351 exec 5>>config.log
15352 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15353 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015354 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015355fi
15356if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15357 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15358$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015359fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015360
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015361
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015362echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015363if test ! -f Modules/Setup
15364then
15365 cp $srcdir/Modules/Setup.dist Modules/Setup
15366fi
15367
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015368echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015369if test ! -f Modules/Setup.local
15370then
15371 echo "# Edit this file for local setup changes" >Modules/Setup.local
15372fi
15373
15374echo "creating Makefile"
15375$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15376 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015377 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015378mv config.c Modules