blob: c96306d64790c0f8ed6f641cdc27c1569be8a38d [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02003# Generated by GNU Autoconf 2.68 for python 3.3.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Georg Brandle2e15612009-05-20 18:25:10 +00005# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10# Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +000011#
12#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000015## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000021if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000022 emulate sh
23 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000024 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000025 # is contrary to our usage. Disable this feature.
26 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000028else
Matthias Kloseb9621712010-04-24 17:59:49 +000029 case `(set -o) 2>/dev/null` in #(
30 *posix*) :
31 set -o posix ;; #(
32 *) :
33 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000034esac
Martin v. Löwis11437992002-04-12 09:54:03 +000035fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000036
37
Matthias Kloseb9621712010-04-24 17:59:49 +000038as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49 as_echo='print -r --'
50 as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52 as_echo='printf %s\n'
53 as_echo_n='printf %s'
54else
55 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57 as_echo_n='/usr/ucb/echo -n'
58 else
59 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60 as_echo_n_body='eval
61 arg=$1;
62 case $arg in #(
63 *"$as_nl"*)
64 expr "X$arg" : "X\\(.*\\)$as_nl";
65 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66 esac;
67 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68 '
69 export as_echo_n_body
70 as_echo_n='sh -c $as_echo_n_body as_echo'
71 fi
72 export as_echo_body
73 as_echo='sh -c $as_echo_body as_echo'
74fi
Martin v. Löwis11437992002-04-12 09:54:03 +000075
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000078 PATH_SEPARATOR=:
79 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81 PATH_SEPARATOR=';'
82 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083fi
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000085
86# IFS
87# We need space, tab and new line, in precisely that order. Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000091IFS=" "" $as_nl"
92
93# Find who we are. Look in the path if we contain no directory separator.
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020094as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000095case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000096 *[\\/]* ) as_myself=$0 ;;
97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000098for as_dir in $PATH
99do
100 IFS=$as_save_IFS
101 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000105
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000106 ;;
107esac
108# We did not find ourselves, most probably we were run as `sh COMMAND'
109# in which case we are not to be found in the path.
110if test "x$as_myself" = x; then
111 as_myself=$0
112fi
113if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000116fi
117
Matthias Kloseb9621712010-04-24 17:59:49 +0000118# Unset variables that we do not need and which cause bugs (e.g. in
119# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
120# suppresses any "Segmentation fault" message there. '((' could
121# trigger a bug in pdksh 5.2.14.
122for as_var in BASH_ENV ENV MAIL MAILPATH
123do eval test x\${$as_var+set} = xset \
124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000125done
126PS1='$ '
127PS2='> '
128PS4='+ '
129
130# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000131LC_ALL=C
132export LC_ALL
133LANGUAGE=C
134export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000135
Matthias Kloseb9621712010-04-24 17:59:49 +0000136# CDPATH.
137(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139if test "x$CONFIG_SHELL" = x; then
140 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
141 emulate sh
142 NULLCMD=:
143 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
144 # is contrary to our usage. Disable this feature.
145 alias -g '\${1+\"\$@\"}'='\"\$@\"'
146 setopt NO_GLOB_SUBST
147else
148 case \`(set -o) 2>/dev/null\` in #(
149 *posix*) :
150 set -o posix ;; #(
151 *) :
152 ;;
153esac
154fi
155"
156 as_required="as_fn_return () { (exit \$1); }
157as_fn_success () { as_fn_return 0; }
158as_fn_failure () { as_fn_return 1; }
159as_fn_ret_success () { return 0; }
160as_fn_ret_failure () { return 1; }
161
162exitcode=0
163as_fn_success || { exitcode=1; echo as_fn_success failed.; }
164as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
165as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
166as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
167if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
168
169else
170 exitcode=1; echo positional parameters were not saved.
171fi
172test x\$exitcode = x0 || exit 1"
173 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
174 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
175 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
176 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
177test \$(( 1 + 1 )) = 2 || exit 1"
178 if (eval "$as_required") 2>/dev/null; then :
179 as_have_required=yes
180else
181 as_have_required=no
182fi
183 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
184
185else
186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
187as_found=false
188for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
189do
190 IFS=$as_save_IFS
191 test -z "$as_dir" && as_dir=.
192 as_found=:
193 case $as_dir in #(
194 /*)
195 for as_base in sh bash ksh sh5; do
196 # Try only shells that exist, to save several forks.
197 as_shell=$as_dir/$as_base
198 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
199 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
200 CONFIG_SHELL=$as_shell as_have_required=yes
201 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
202 break 2
203fi
204fi
205 done;;
206 esac
207 as_found=false
208done
209$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
210 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
211 CONFIG_SHELL=$SHELL as_have_required=yes
212fi; }
213IFS=$as_save_IFS
214
215
216 if test "x$CONFIG_SHELL" != x; then :
217 # We cannot yet assume a decent shell, so we have to provide a
218 # neutralization value for shells without unset; and this also
219 # works around shells that cannot unset nonexistent variables.
Antoine Pitroud3b2aef2011-07-27 01:22:41 +0200220 # Preserve -v and -x to the replacement shell.
Matthias Kloseb9621712010-04-24 17:59:49 +0000221 BASH_ENV=/dev/null
222 ENV=/dev/null
223 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
224 export CONFIG_SHELL
Antoine Pitroud3b2aef2011-07-27 01:22:41 +0200225 case $- in # ((((
226 *v*x* | *x*v* ) as_opts=-vx ;;
227 *v* ) as_opts=-v ;;
228 *x* ) as_opts=-x ;;
229 * ) as_opts= ;;
230 esac
231 exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
Matthias Kloseb9621712010-04-24 17:59:49 +0000232fi
233
234 if test x$as_have_required = xno; then :
235 $as_echo "$0: This script requires a shell more modern than all"
236 $as_echo "$0: the shells that I found on your system."
237 if test x${ZSH_VERSION+set} = xset ; then
238 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
239 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
240 else
241 $as_echo "$0: Please tell bug-autoconf@gnu.org and
242$0: http://bugs.python.org/ about your system, including
243$0: any error possibly output before this message. Then
244$0: install a modern shell, or manually run the script
245$0: under such a shell if you do have one."
246 fi
247 exit 1
248fi
249fi
250fi
251SHELL=${CONFIG_SHELL-/bin/sh}
252export SHELL
253# Unset more variables known to interfere with behavior of common tools.
254CLICOLOR_FORCE= GREP_OPTIONS=
255unset CLICOLOR_FORCE GREP_OPTIONS
256
257## --------------------- ##
258## M4sh Shell Functions. ##
259## --------------------- ##
260# as_fn_unset VAR
261# ---------------
262# Portably unset VAR.
263as_fn_unset ()
264{
265 { eval $1=; unset $1;}
266}
267as_unset=as_fn_unset
268
269# as_fn_set_status STATUS
270# -----------------------
271# Set $? to STATUS, without forking.
272as_fn_set_status ()
273{
274 return $1
275} # as_fn_set_status
276
277# as_fn_exit STATUS
278# -----------------
279# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
280as_fn_exit ()
281{
282 set +e
283 as_fn_set_status $1
284 exit $1
285} # as_fn_exit
286
287# as_fn_mkdir_p
288# -------------
289# Create "$as_dir" as a directory, including parents if necessary.
290as_fn_mkdir_p ()
291{
292
293 case $as_dir in #(
294 -*) as_dir=./$as_dir;;
295 esac
296 test -d "$as_dir" || eval $as_mkdir_p || {
297 as_dirs=
298 while :; do
299 case $as_dir in #(
300 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
301 *) as_qdir=$as_dir;;
302 esac
303 as_dirs="'$as_qdir' $as_dirs"
304 as_dir=`$as_dirname -- "$as_dir" ||
305$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
306 X"$as_dir" : 'X\(//\)[^/]' \| \
307 X"$as_dir" : 'X\(//\)$' \| \
308 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
309$as_echo X"$as_dir" |
310 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
311 s//\1/
312 q
313 }
314 /^X\(\/\/\)[^/].*/{
315 s//\1/
316 q
317 }
318 /^X\(\/\/\)$/{
319 s//\1/
320 q
321 }
322 /^X\(\/\).*/{
323 s//\1/
324 q
325 }
326 s/.*/./; q'`
327 test -d "$as_dir" && break
328 done
329 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200330 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000331
332
333} # as_fn_mkdir_p
334# as_fn_append VAR VALUE
335# ----------------------
336# Append the text in VALUE to the end of the definition contained in VAR. Take
337# advantage of any shell optimizations that allow amortized linear growth over
338# repeated appends, instead of the typical quadratic growth present in naive
339# implementations.
340if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
341 eval 'as_fn_append ()
342 {
343 eval $1+=\$2
344 }'
345else
346 as_fn_append ()
347 {
348 eval $1=\$$1\$2
349 }
350fi # as_fn_append
351
352# as_fn_arith ARG...
353# ------------------
354# Perform arithmetic evaluation on the ARGs, and store the result in the
355# global $as_val. Take advantage of shells that can avoid forks. The arguments
356# must be portable across $(()) and expr.
357if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
358 eval 'as_fn_arith ()
359 {
360 as_val=$(( $* ))
361 }'
362else
363 as_fn_arith ()
364 {
365 as_val=`expr "$@" || test $? -eq 1`
366 }
367fi # as_fn_arith
368
369
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200370# as_fn_error STATUS ERROR [LINENO LOG_FD]
371# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000372# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
373# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200374# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000375as_fn_error ()
376{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200377 as_status=$1; test $as_status -eq 0 && as_status=1
378 if test "$4"; then
379 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
380 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000381 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200382 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000383 as_fn_exit $as_status
384} # as_fn_error
385
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000386if expr a : '\(a\)' >/dev/null 2>&1 &&
387 test "X`expr 00001 : '.*\(...\)'`" = X001; then
388 as_expr=expr
389else
390 as_expr=false
391fi
392
393if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
394 as_basename=basename
395else
396 as_basename=false
397fi
398
Matthias Kloseb9621712010-04-24 17:59:49 +0000399if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
400 as_dirname=dirname
401else
402 as_dirname=false
403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000404
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000405as_me=`$as_basename -- "$0" ||
406$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
407 X"$0" : 'X\(//\)$' \| \
408 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000409$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000410 sed '/^.*\/\([^/][^/]*\)\/*$/{
411 s//\1/
412 q
413 }
414 /^X\/\(\/\/\)$/{
415 s//\1/
416 q
417 }
418 /^X\/\(\/\).*/{
419 s//\1/
420 q
421 }
422 s/.*/./; q'`
423
Matthias Kloseb9621712010-04-24 17:59:49 +0000424# Avoid depending upon Character Ranges.
425as_cr_letters='abcdefghijklmnopqrstuvwxyz'
426as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
427as_cr_Letters=$as_cr_letters$as_cr_LETTERS
428as_cr_digits='0123456789'
429as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000430
431
Matthias Kloseb9621712010-04-24 17:59:49 +0000432 as_lineno_1=$LINENO as_lineno_1a=$LINENO
433 as_lineno_2=$LINENO as_lineno_2a=$LINENO
434 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
435 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
436 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000437 sed -n '
438 p
439 /[$]LINENO/=
440 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000441 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000442 s/[$]LINENO.*/&-/
443 t lineno
444 b
445 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000446 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000447 :loop
448 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000449 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000450 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000451 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000452 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000453 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000454
455 # Don't try to exec as it changes $[0], causing all sort of problems
456 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000457 # original and so on. Autoconf is especially sensitive to this).
458 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000459 # Exit status is that of the last command.
460 exit
461}
462
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000463ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000464case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000465-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000466 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000467 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 xy) ECHO_C='\c';;
469 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
470 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000471 esac;;
472*)
473 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000474esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000475
Martin v. Löwis11437992002-04-12 09:54:03 +0000476rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000477if test -d conf$$.dir; then
478 rm -f conf$$.dir/conf$$.file
479else
480 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000481 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000482fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000483if (echo >conf$$.file) 2>/dev/null; then
484 if ln -s conf$$.file conf$$ 2>/dev/null; then
485 as_ln_s='ln -s'
486 # ... but there are two gotchas:
487 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
488 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
489 # In both cases, we have to default to `cp -p'.
490 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
491 as_ln_s='cp -p'
492 elif ln conf$$.file conf$$ 2>/dev/null; then
493 as_ln_s=ln
494 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000496 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000497else
498 as_ln_s='cp -p'
499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000500rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
501rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000502
Skip Montanaro6dead952003-09-25 14:50:04 +0000503if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000504 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000505else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000506 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000507 as_mkdir_p=false
508fi
509
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000510if test -x / >/dev/null 2>&1; then
511 as_test_x='test -x'
512else
513 if ls -dL / >/dev/null 2>&1; then
514 as_ls_L_option=L
515 else
516 as_ls_L_option=
517 fi
518 as_test_x='
519 eval sh -c '\''
520 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522 else
Matthias Kloseb9621712010-04-24 17:59:49 +0000523 case $1 in #(
524 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000525 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +0000526 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000527 ???[sx]*):;;*)false;;esac;fi
528 '\'' sh
529 '
530fi
531as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000532
533# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000534as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000535
536# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000537as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000538
539
Matthias Kloseb9621712010-04-24 17:59:49 +0000540test -n "$DJDIR" || exec 7<&0 </dev/null
541exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
543# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200544# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000545# so uname gets run too.
546ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
547
Martin v. Löwis11437992002-04-12 09:54:03 +0000548#
549# Initializations.
550#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000551ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000552ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000553ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000554LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000555cross_compiling=no
556subdirs=
557MFLAGS=
558MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000559
Martin v. Löwis11437992002-04-12 09:54:03 +0000560# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000561PACKAGE_NAME='python'
562PACKAGE_TARNAME='python'
Georg Brandl3ebb6b32011-02-20 10:37:07 +0000563PACKAGE_VERSION='3.3'
564PACKAGE_STRING='python 3.3'
Georg Brandle2e15612009-05-20 18:25:10 +0000565PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000566PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000567
568ac_unique_file="Include/object.h"
569# Factoring default headers for most tests.
570ac_includes_default="\
571#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000573# include <sys/types.h>
574#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000575#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000576# include <sys/stat.h>
577#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000578#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000579# include <stdlib.h>
580# include <stddef.h>
581#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000582# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000583# include <stdlib.h>
584# endif
585#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000586#ifdef HAVE_STRING_H
587# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000588# include <memory.h>
589# endif
590# include <string.h>
591#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <strings.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef HAVE_STDINT_H
599# include <stdint.h>
600#endif
601#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <unistd.h>
603#endif"
604
Matthias Kloseb9621712010-04-24 17:59:49 +0000605ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000606SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000607THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000608SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000609LIBC
610LIBM
611HAVE_GETHOSTBYNAME
612HAVE_GETHOSTBYNAME_R
613HAVE_GETHOSTBYNAME_R_3_ARG
614HAVE_GETHOSTBYNAME_R_5_ARG
615HAVE_GETHOSTBYNAME_R_6_ARG
616LIBOBJS
617TRUE
618MACHDEP_OBJS
619DYNLOADFILE
620DLINCLDIR
621THREADOBJ
622LDLAST
623USE_THREAD_MODULE
624SIGNAL_OBJS
625USE_SIGNAL_MODULE
626LIBFFI_INCLUDEDIR
627PKG_CONFIG
628SHLIBS
629CFLAGSFORSHARED
630LINKFORSHARED
631CCSHARED
632BLDSHARED
633LDCXXSHARED
634LDSHARED
635SO
636LIBTOOL_CRUFT
637OTHER_LIBTOOL_OPT
638UNIVERSAL_ARCH_FLAGS
639BASECFLAGS
640OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000641ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000642LN
643INSTALL_DATA
644INSTALL_SCRIPT
645INSTALL_PROGRAM
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500646HAS_PYTHON
647DISABLE_ASDLGEN
Matthias Kloseb9621712010-04-24 17:59:49 +0000648ARFLAGS
649AR
650RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000651USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000652GNULD
653LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000654LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000655RUNSHARED
656INSTSONAME
657LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000658PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000659BLDLIBRARY
660DLLLIBRARY
661LDLIBRARY
662LIBRARY
663BUILDEXEEXT
664EGREP
665GREP
666CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200667NO_AS_NEEDED
Matthias Kloseb9621712010-04-24 17:59:49 +0000668MAINCC
669CXX
670OBJEXT
671EXEEXT
672ac_ct_CC
673CPPFLAGS
674LDFLAGS
675CFLAGS
676CC
677EXPORT_MACOSX_DEPLOYMENT_TARGET
678CONFIGURE_MACOSX_DEPLOYMENT_TARGET
679SGI_ABI
680MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000681FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000682FRAMEWORKUNIXTOOLSPREFIX
683FRAMEWORKALTINSTALLLAST
684FRAMEWORKALTINSTALLFIRST
685FRAMEWORKINSTALLLAST
686FRAMEWORKINSTALLFIRST
687PYTHONFRAMEWORKINSTALLDIR
688PYTHONFRAMEWORKPREFIX
689PYTHONFRAMEWORKDIR
690PYTHONFRAMEWORKIDENTIFIER
691PYTHONFRAMEWORK
692LIPO_32BIT_FLAGS
693ARCH_RUN_32BIT
694UNIVERSALSDK
695CONFIG_ARGS
696SOVERSION
697VERSION
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500698HAS_HG
699HGBRANCH
700HGTAG
701HGVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000702target_alias
703host_alias
704build_alias
705LIBS
706ECHO_T
707ECHO_N
708ECHO_C
709DEFS
710mandir
711localedir
712libdir
713psdir
714pdfdir
715dvidir
716htmldir
717infodir
718docdir
719oldincludedir
720includedir
721localstatedir
722sharedstatedir
723sysconfdir
724datadir
725datarootdir
726libexecdir
727sbindir
728bindir
729program_transform_name
730prefix
731exec_prefix
732PACKAGE_URL
733PACKAGE_BUGREPORT
734PACKAGE_STRING
735PACKAGE_VERSION
736PACKAGE_TARNAME
737PACKAGE_NAME
738PATH_SEPARATOR
739SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000740ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000741ac_user_opts='
742enable_option_checking
743enable_universalsdk
744with_universal_archs
745with_framework_name
746enable_framework
747with_gcc
748with_cxx_main
749with_suffix
750enable_shared
751enable_profiling
752with_pydebug
753with_libs
754with_system_expat
755with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000756enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000757with_dbmliborder
758with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000759with_threads
760with_thread
761enable_ipv6
762with_doc_strings
763with_tsc
764with_pymalloc
765with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000766with_fpectl
767with_libm
768with_libc
769enable_big_digits
770with_wide_unicode
771with_computed_gotos
772'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000773 ac_precious_vars='build_alias
774host_alias
775target_alias
776CC
777CFLAGS
778LDFLAGS
779LIBS
780CPPFLAGS
Ross Lagerwall7807c352011-03-17 20:20:30 +0200781CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000782
Guido van Rossum627b2d71993-12-24 10:39:16 +0000783
Guido van Rossum7f43da71994-08-01 12:15:30 +0000784# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000785ac_init_help=
786ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000787ac_unrecognized_opts=
788ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000789# The variables have the same names as the options, with
790# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000791cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000792exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000793no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000794no_recursion=
795prefix=NONE
796program_prefix=NONE
797program_suffix=NONE
798program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000800site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000803x_includes=NONE
804x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000805
806# Installation directory options.
807# These are left unexpanded so users can "make install exec_prefix=/foo"
808# and all the variables that are supposed to be based on exec_prefix
809# by default will actually change.
810# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000811# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000812bindir='${exec_prefix}/bin'
813sbindir='${exec_prefix}/sbin'
814libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000815datarootdir='${prefix}/share'
816datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000817sysconfdir='${prefix}/etc'
818sharedstatedir='${prefix}/com'
819localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820includedir='${prefix}/include'
821oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000822docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
823infodir='${datarootdir}/info'
824htmldir='${docdir}'
825dvidir='${docdir}'
826pdfdir='${docdir}'
827psdir='${docdir}'
828libdir='${exec_prefix}/lib'
829localedir='${datarootdir}/locale'
830mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000831
Guido van Rossum7f43da71994-08-01 12:15:30 +0000832ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000833ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000834for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000835do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000836 # If the previous option needs an argument, assign it.
837 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000838 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839 ac_prev=
840 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000841 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000842
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000843 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200844 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
845 *=) ac_optarg= ;;
846 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849 # Accept the important Cygnus configure options, so we can diagnose typos.
850
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851 case $ac_dashdash$ac_option in
852 --)
853 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000854
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000855 -bindir | --bindir | --bindi | --bind | --bin | --bi)
856 ac_prev=bindir ;;
857 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000858 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000859
860 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000861 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000862 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000863 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865 -cache-file | --cache-file | --cache-fil | --cache-fi \
866 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
867 ac_prev=cache_file ;;
868 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
869 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000870 cache_file=$ac_optarg ;;
871
872 --config-cache | -C)
873 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000875 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000876 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000877 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000878 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000879
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000880 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
881 | --dataroo | --dataro | --datar)
882 ac_prev=datarootdir ;;
883 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
884 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
885 datarootdir=$ac_optarg ;;
886
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000888 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000889 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000890 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200891 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000892 ac_useropt_orig=$ac_useropt
893 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
894 case $ac_user_opts in
895 *"
896"enable_$ac_useropt"
897"*) ;;
898 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
899 ac_unrecognized_sep=', ';;
900 esac
901 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902
903 -docdir | --docdir | --docdi | --doc | --do)
904 ac_prev=docdir ;;
905 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
906 docdir=$ac_optarg ;;
907
908 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
909 ac_prev=dvidir ;;
910 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
911 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912
913 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000914 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000915 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000916 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200917 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000918 ac_useropt_orig=$ac_useropt
919 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
920 case $ac_user_opts in
921 *"
922"enable_$ac_useropt"
923"*) ;;
924 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
925 ac_unrecognized_sep=', ';;
926 esac
927 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
930 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
931 | --exec | --exe | --ex)
932 ac_prev=exec_prefix ;;
933 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
934 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
935 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937
938 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000939 # Obsolete; use --with-gas.
940 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000941
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 -help | --help | --hel | --he | -h)
943 ac_init_help=long ;;
944 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
945 ac_init_help=recursive ;;
946 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
947 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000948
949 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000951 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
955 ac_prev=htmldir ;;
956 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
957 | --ht=*)
958 htmldir=$ac_optarg ;;
959
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000960 -includedir | --includedir | --includedi | --included | --include \
961 | --includ | --inclu | --incl | --inc)
962 ac_prev=includedir ;;
963 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
964 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000965 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000966
967 -infodir | --infodir | --infodi | --infod | --info | --inf)
968 ac_prev=infodir ;;
969 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000970 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000971
972 -libdir | --libdir | --libdi | --libd)
973 ac_prev=libdir ;;
974 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000975 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000976
977 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
978 | --libexe | --libex | --libe)
979 ac_prev=libexecdir ;;
980 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
981 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000982 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000983
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000984 -localedir | --localedir | --localedi | --localed | --locale)
985 ac_prev=localedir ;;
986 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
987 localedir=$ac_optarg ;;
988
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000989 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000990 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000991 ac_prev=localstatedir ;;
992 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000993 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000994 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000995
996 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
997 ac_prev=mandir ;;
998 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000999 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001000
Guido van Rossum7f43da71994-08-01 12:15:30 +00001001 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001002 # Obsolete; use --without-fp.
1003 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004
1005 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007 no_create=yes ;;
1008
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001009 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1010 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1011 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001013 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1014 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1015 | --oldin | --oldi | --old | --ol | --o)
1016 ac_prev=oldincludedir ;;
1017 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1018 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1019 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1023 ac_prev=prefix ;;
1024 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026
1027 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1028 | --program-pre | --program-pr | --program-p)
1029 ac_prev=program_prefix ;;
1030 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1031 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033
1034 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1035 | --program-suf | --program-su | --program-s)
1036 ac_prev=program_suffix ;;
1037 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1038 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040
1041 -program-transform-name | --program-transform-name \
1042 | --program-transform-nam | --program-transform-na \
1043 | --program-transform-n | --program-transform- \
1044 | --program-transform | --program-transfor \
1045 | --program-transfo | --program-transf \
1046 | --program-trans | --program-tran \
1047 | --progr-tra | --program-tr | --program-t)
1048 ac_prev=program_transform_name ;;
1049 -program-transform-name=* | --program-transform-name=* \
1050 | --program-transform-nam=* | --program-transform-na=* \
1051 | --program-transform-n=* | --program-transform-=* \
1052 | --program-transform=* | --program-transfor=* \
1053 | --program-transfo=* | --program-transf=* \
1054 | --program-trans=* | --program-tran=* \
1055 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001058 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1059 ac_prev=pdfdir ;;
1060 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1061 pdfdir=$ac_optarg ;;
1062
1063 -psdir | --psdir | --psdi | --psd | --ps)
1064 ac_prev=psdir ;;
1065 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1066 psdir=$ac_optarg ;;
1067
Guido van Rossum7f43da71994-08-01 12:15:30 +00001068 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1069 | -silent | --silent | --silen | --sile | --sil)
1070 silent=yes ;;
1071
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1073 ac_prev=sbindir ;;
1074 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1075 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001077
1078 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1079 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1080 | --sharedst | --shareds | --shared | --share | --shar \
1081 | --sha | --sh)
1082 ac_prev=sharedstatedir ;;
1083 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1084 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1085 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1086 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001088
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001089 -site | --site | --sit)
1090 ac_prev=site ;;
1091 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001093
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1095 ac_prev=srcdir ;;
1096 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001099 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1100 | --syscon | --sysco | --sysc | --sys | --sy)
1101 ac_prev=sysconfdir ;;
1102 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1103 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001105
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110
1111 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1112 verbose=yes ;;
1113
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 -version | --version | --versio | --versi | --vers | -V)
1115 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001116
1117 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001118 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001119 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001120 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001121 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001122 ac_useropt_orig=$ac_useropt
1123 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1124 case $ac_user_opts in
1125 *"
1126"with_$ac_useropt"
1127"*) ;;
1128 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1129 ac_unrecognized_sep=', ';;
1130 esac
1131 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132
1133 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001134 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001135 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001136 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001137 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001138 ac_useropt_orig=$ac_useropt
1139 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1140 case $ac_user_opts in
1141 *"
1142"with_$ac_useropt"
1143"*) ;;
1144 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1145 ac_unrecognized_sep=', ';;
1146 esac
1147 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001149 --x)
1150 # Obsolete; use --with-x.
1151 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001152
1153 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1154 | --x-incl | --x-inc | --x-in | --x-i)
1155 ac_prev=x_includes ;;
1156 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1157 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001158 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001159
1160 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1161 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1162 ac_prev=x_libraries ;;
1163 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1164 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001166
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001167 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1168Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001169 ;;
1170
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 *=*)
1172 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1173 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001174 case $ac_envvar in #(
1175 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001176 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001177 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001178 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 export $ac_envvar ;;
1180
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001181 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001183 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001185 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001186 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187 ;;
1188
1189 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001190done
1191
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001194 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195fi
1196
Matthias Kloseb9621712010-04-24 17:59:49 +00001197if test -n "$ac_unrecognized_opts"; then
1198 case $enable_option_checking in
1199 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001200 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001201 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1202 esac
1203fi
1204
1205# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001206for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1207 datadir sysconfdir sharedstatedir localstatedir includedir \
1208 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1209 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001210do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001211 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001212 # Remove trailing slashes.
1213 case $ac_val in
1214 */ )
1215 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1216 eval $ac_var=\$ac_val;;
1217 esac
1218 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001219 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001220 [\\/$]* | ?:[\\/]* ) continue;;
1221 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001222 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001223 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001224done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001225
Martin v. Löwis11437992002-04-12 09:54:03 +00001226# There might be people who depend on the old broken behavior: `$host'
1227# used to hold the argument of --host etc.
1228# FIXME: To remove some day.
1229build=$build_alias
1230host=$host_alias
1231target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001232
Martin v. Löwis11437992002-04-12 09:54:03 +00001233# FIXME: To remove some day.
1234if test "x$host_alias" != x; then
1235 if test "x$build_alias" = x; then
1236 cross_compiling=maybe
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001237 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1238 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 elif test "x$build_alias" != "x$host_alias"; then
1240 cross_compiling=yes
1241 fi
1242fi
1243
1244ac_tool_prefix=
1245test -n "$host_alias" && ac_tool_prefix=$host_alias-
1246
1247test "$silent" = yes && exec 6>/dev/null
1248
Guido van Rossum627b2d71993-12-24 10:39:16 +00001249
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001250ac_pwd=`pwd` && test -n "$ac_pwd" &&
1251ac_ls_di=`ls -di .` &&
1252ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001253 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001254test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001255 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001256
1257
Guido van Rossum627b2d71993-12-24 10:39:16 +00001258# Find the source files, if location was not specified.
1259if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001260 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001261 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 ac_confdir=`$as_dirname -- "$as_myself" ||
1263$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1264 X"$as_myself" : 'X\(//\)[^/]' \| \
1265 X"$as_myself" : 'X\(//\)$' \| \
1266 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1267$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001268 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1269 s//\1/
1270 q
1271 }
1272 /^X\(\/\/\)[^/].*/{
1273 s//\1/
1274 q
1275 }
1276 /^X\(\/\/\)$/{
1277 s//\1/
1278 q
1279 }
1280 /^X\(\/\).*/{
1281 s//\1/
1282 q
1283 }
1284 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001285 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001286 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001287 srcdir=..
1288 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001289else
1290 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001292if test ! -r "$srcdir/$ac_unique_file"; then
1293 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001294 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001296ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1297ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001298 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299 pwd)`
1300# When building in place, set srcdir=.
1301if test "$ac_abs_confdir" = "$ac_pwd"; then
1302 srcdir=.
1303fi
1304# Remove unnecessary trailing slashes from srcdir.
1305# Double slashes in file names in object file debugging info
1306# mess up M-x gdb in Emacs.
1307case $srcdir in
1308*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1309esac
1310for ac_var in $ac_precious_vars; do
1311 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1312 eval ac_env_${ac_var}_value=\$${ac_var}
1313 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1314 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1315done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001316
Martin v. Löwis11437992002-04-12 09:54:03 +00001317#
1318# Report the --help message.
1319#
1320if test "$ac_init_help" = "long"; then
1321 # Omit some internal or obsolete options to make the list less imposing.
1322 # This message is too long to be a string in the A/UX 3.1 sh.
1323 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001324\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001325
1326Usage: $0 [OPTION]... [VAR=VALUE]...
1327
1328To assign environment variables (e.g., CC, CFLAGS...), specify them as
1329VAR=VALUE. See below for descriptions of some of the useful variables.
1330
1331Defaults for the options are specified in brackets.
1332
1333Configuration:
1334 -h, --help display this help and exit
1335 --help=short display options specific to this package
1336 --help=recursive display the short help of all the included packages
1337 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001338 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001339 --cache-file=FILE cache test results in FILE [disabled]
1340 -C, --config-cache alias for \`--cache-file=config.cache'
1341 -n, --no-create do not create output files
1342 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1343
Martin v. Löwis11437992002-04-12 09:54:03 +00001344Installation directories:
1345 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001346 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001347 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001348 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001349
1350By default, \`make install' will install all the files in
1351\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1352an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1353for instance \`--prefix=\$HOME'.
1354
1355For better control, use the options below.
1356
1357Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001358 --bindir=DIR user executables [EPREFIX/bin]
1359 --sbindir=DIR system admin executables [EPREFIX/sbin]
1360 --libexecdir=DIR program executables [EPREFIX/libexec]
1361 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1362 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1363 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1364 --libdir=DIR object code libraries [EPREFIX/lib]
1365 --includedir=DIR C header files [PREFIX/include]
1366 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1367 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1368 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1369 --infodir=DIR info documentation [DATAROOTDIR/info]
1370 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1371 --mandir=DIR man documentation [DATAROOTDIR/man]
1372 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1373 --htmldir=DIR html documentation [DOCDIR]
1374 --dvidir=DIR dvi documentation [DOCDIR]
1375 --pdfdir=DIR pdf documentation [DOCDIR]
1376 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001377_ACEOF
1378
1379 cat <<\_ACEOF
1380_ACEOF
1381fi
1382
1383if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001384 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001385 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001386 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001387 cat <<\_ACEOF
1388
1389Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001390 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001391 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1392 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001393 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001394 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001395 --enable-framework[=INSTALLDIR]
1396 Build (MacOSX|Darwin) framework
1397 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001398 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001399 --enable-loadable-sqlite-extensions
1400 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001401 --enable-ipv6 Enable ipv6 (with ipv4) support
1402 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001403 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001404 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001405
1406Optional Packages:
1407 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1408 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001409 --with-universal-archs=ARCH
1410 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001411 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001412 --with-framework-name=FRAMEWORK
1413 specify an alternate name of the framework built
1414 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001415 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001416 --with-cxx-main=<compiler>
1417 compile main() and link python executable with C++
1418 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001419 --with-suffix=.exe set executable suffix
1420 --with-pydebug build with Py_DEBUG defined
1421 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001422 --with-system-expat build pyexpat module using an installed expat
1423 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001424 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001425 --with-dbmliborder=db1:db2:...
1426 order to check db backends for dbm. Valid value is a
1427 colon separated string with the backend names
1428 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001429 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001430 --with(out)-threads[=DIRECTORY]
1431 disable/enable thread support
1432 --with(out)-thread[=DIRECTORY]
1433 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001434 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001435 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001436 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001437 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001438 --with-fpectl enable SIGFPE catching
1439 --with-libm=STRING math library
1440 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001441 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001442 --with(out)-computed-gotos
1443 Use computed gotos in evaluation loop (enabled by
1444 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001445
1446Some influential environment variables:
1447 CC C compiler command
1448 CFLAGS C compiler flags
1449 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1450 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001451 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001452 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001453 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001454 CPP C preprocessor
1455
1456Use these variables to override the choices made by `configure' or to help
1457it to find libraries and programs with nonstandard names/locations.
1458
Georg Brandle2e15612009-05-20 18:25:10 +00001459Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001460_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001461ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001462fi
1463
1464if test "$ac_init_help" = "recursive"; then
1465 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001466 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001467 test -d "$ac_dir" ||
1468 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1469 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001470 ac_builddir=.
1471
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001472case "$ac_dir" in
1473.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1474*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001475 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001476 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001477 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001478 case $ac_top_builddir_sub in
1479 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1480 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1481 esac ;;
1482esac
1483ac_abs_top_builddir=$ac_pwd
1484ac_abs_builddir=$ac_pwd$ac_dir_suffix
1485# for backward compatibility:
1486ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001487
1488case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001489 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001490 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001491 ac_top_srcdir=$ac_top_builddir_sub
1492 ac_abs_top_srcdir=$ac_pwd ;;
1493 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001494 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001495 ac_top_srcdir=$srcdir
1496 ac_abs_top_srcdir=$srcdir ;;
1497 *) # Relative name.
1498 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1499 ac_top_srcdir=$ac_top_build_prefix$srcdir
1500 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001501esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001502ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001503
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001504 cd "$ac_dir" || { ac_status=$?; continue; }
1505 # Check for guested configure.
1506 if test -f "$ac_srcdir/configure.gnu"; then
1507 echo &&
1508 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1509 elif test -f "$ac_srcdir/configure"; then
1510 echo &&
1511 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001512 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001513 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001514 fi || ac_status=$?
1515 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001516 done
1517fi
1518
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001519test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001520if $ac_init_version; then
1521 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001522python configure 3.3
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001523generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001524
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001525Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001526This configure script is free software; the Free Software Foundation
1527gives unlimited permission to copy, distribute and modify it.
1528_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001529 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001530fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001531
1532## ------------------------ ##
1533## Autoconf initialization. ##
1534## ------------------------ ##
1535
1536# ac_fn_c_try_compile LINENO
1537# --------------------------
1538# Try to compile conftest.$ac_ext, and return whether this succeeded.
1539ac_fn_c_try_compile ()
1540{
1541 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1542 rm -f conftest.$ac_objext
1543 if { { ac_try="$ac_compile"
1544case "(($ac_try" in
1545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1546 *) ac_try_echo=$ac_try;;
1547esac
1548eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1549$as_echo "$ac_try_echo"; } >&5
1550 (eval "$ac_compile") 2>conftest.err
1551 ac_status=$?
1552 if test -s conftest.err; then
1553 grep -v '^ *+' conftest.err >conftest.er1
1554 cat conftest.er1 >&5
1555 mv -f conftest.er1 conftest.err
1556 fi
1557 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1558 test $ac_status = 0; } && {
1559 test -z "$ac_c_werror_flag" ||
1560 test ! -s conftest.err
1561 } && test -s conftest.$ac_objext; then :
1562 ac_retval=0
1563else
1564 $as_echo "$as_me: failed program was:" >&5
1565sed 's/^/| /' conftest.$ac_ext >&5
1566
1567 ac_retval=1
1568fi
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001569 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001570 as_fn_set_status $ac_retval
1571
1572} # ac_fn_c_try_compile
1573
Matthias Kloseb9621712010-04-24 17:59:49 +00001574# ac_fn_c_try_link LINENO
1575# -----------------------
1576# Try to link conftest.$ac_ext, and return whether this succeeded.
1577ac_fn_c_try_link ()
1578{
1579 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1580 rm -f conftest.$ac_objext conftest$ac_exeext
1581 if { { ac_try="$ac_link"
1582case "(($ac_try" in
1583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1584 *) ac_try_echo=$ac_try;;
1585esac
1586eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1587$as_echo "$ac_try_echo"; } >&5
1588 (eval "$ac_link") 2>conftest.err
1589 ac_status=$?
1590 if test -s conftest.err; then
1591 grep -v '^ *+' conftest.err >conftest.er1
1592 cat conftest.er1 >&5
1593 mv -f conftest.er1 conftest.err
1594 fi
1595 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1596 test $ac_status = 0; } && {
1597 test -z "$ac_c_werror_flag" ||
1598 test ! -s conftest.err
1599 } && test -s conftest$ac_exeext && {
1600 test "$cross_compiling" = yes ||
1601 $as_test_x conftest$ac_exeext
1602 }; then :
1603 ac_retval=0
1604else
1605 $as_echo "$as_me: failed program was:" >&5
1606sed 's/^/| /' conftest.$ac_ext >&5
1607
1608 ac_retval=1
1609fi
1610 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1611 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1612 # interfere with the next link command; also delete a directory that is
1613 # left behind by Apple's compiler. We do this before executing the actions.
1614 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001615 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001616 as_fn_set_status $ac_retval
1617
1618} # ac_fn_c_try_link
1619
Matthias Kloseb9621712010-04-24 17:59:49 +00001620# ac_fn_c_try_cpp LINENO
1621# ----------------------
1622# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1623ac_fn_c_try_cpp ()
1624{
1625 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1626 if { { ac_try="$ac_cpp conftest.$ac_ext"
1627case "(($ac_try" in
1628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1629 *) ac_try_echo=$ac_try;;
1630esac
1631eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1632$as_echo "$ac_try_echo"; } >&5
1633 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1634 ac_status=$?
1635 if test -s conftest.err; then
1636 grep -v '^ *+' conftest.err >conftest.er1
1637 cat conftest.er1 >&5
1638 mv -f conftest.er1 conftest.err
1639 fi
1640 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001641 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001642 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1643 test ! -s conftest.err
1644 }; then :
1645 ac_retval=0
1646else
1647 $as_echo "$as_me: failed program was:" >&5
1648sed 's/^/| /' conftest.$ac_ext >&5
1649
1650 ac_retval=1
1651fi
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001652 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001653 as_fn_set_status $ac_retval
1654
1655} # ac_fn_c_try_cpp
1656
1657# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1658# -------------------------------------------------------
1659# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1660# the include files in INCLUDES and setting the cache variable VAR
1661# accordingly.
1662ac_fn_c_check_header_mongrel ()
1663{
1664 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001665 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1667$as_echo_n "checking for $2... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001668if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001669 $as_echo_n "(cached) " >&6
1670fi
1671eval ac_res=\$$3
1672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1673$as_echo "$ac_res" >&6; }
1674else
1675 # Is the header compilable?
1676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1677$as_echo_n "checking $2 usability... " >&6; }
1678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1679/* end confdefs.h. */
1680$4
1681#include <$2>
1682_ACEOF
1683if ac_fn_c_try_compile "$LINENO"; then :
1684 ac_header_compiler=yes
1685else
1686 ac_header_compiler=no
1687fi
1688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1690$as_echo "$ac_header_compiler" >&6; }
1691
1692# Is the header present?
1693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1694$as_echo_n "checking $2 presence... " >&6; }
1695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1696/* end confdefs.h. */
1697#include <$2>
1698_ACEOF
1699if ac_fn_c_try_cpp "$LINENO"; then :
1700 ac_header_preproc=yes
1701else
1702 ac_header_preproc=no
1703fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001704rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1706$as_echo "$ac_header_preproc" >&6; }
1707
1708# So? What about this header?
1709case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1710 yes:no: )
1711 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1712$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1713 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1714$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1715 ;;
1716 no:yes:* )
1717 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1718$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1719 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1720$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1721 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1722$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1723 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1724$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1725 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1726$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001727( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001728## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001729## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001730 ) | sed "s/^/$as_me: WARNING: /" >&2
1731 ;;
1732esac
1733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1734$as_echo_n "checking for $2... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001735if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001736 $as_echo_n "(cached) " >&6
1737else
1738 eval "$3=\$ac_header_compiler"
1739fi
1740eval ac_res=\$$3
1741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1742$as_echo "$ac_res" >&6; }
1743fi
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001744 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001745
1746} # ac_fn_c_check_header_mongrel
1747
1748# ac_fn_c_try_run LINENO
1749# ----------------------
1750# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1751# that executables *can* be run.
1752ac_fn_c_try_run ()
1753{
1754 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1755 if { { ac_try="$ac_link"
1756case "(($ac_try" in
1757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1758 *) ac_try_echo=$ac_try;;
1759esac
1760eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1761$as_echo "$ac_try_echo"; } >&5
1762 (eval "$ac_link") 2>&5
1763 ac_status=$?
1764 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1765 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1766 { { case "(($ac_try" in
1767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1768 *) ac_try_echo=$ac_try;;
1769esac
1770eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1771$as_echo "$ac_try_echo"; } >&5
1772 (eval "$ac_try") 2>&5
1773 ac_status=$?
1774 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1775 test $ac_status = 0; }; }; then :
1776 ac_retval=0
1777else
1778 $as_echo "$as_me: program exited with status $ac_status" >&5
1779 $as_echo "$as_me: failed program was:" >&5
1780sed 's/^/| /' conftest.$ac_ext >&5
1781
1782 ac_retval=$ac_status
1783fi
1784 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001785 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001786 as_fn_set_status $ac_retval
1787
1788} # ac_fn_c_try_run
1789
1790# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1791# -------------------------------------------------------
1792# Tests whether HEADER exists and can be compiled using the include files in
1793# INCLUDES, setting the cache variable VAR accordingly.
1794ac_fn_c_check_header_compile ()
1795{
1796 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1798$as_echo_n "checking for $2... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001799if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001800 $as_echo_n "(cached) " >&6
1801else
1802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1803/* end confdefs.h. */
1804$4
1805#include <$2>
1806_ACEOF
1807if ac_fn_c_try_compile "$LINENO"; then :
1808 eval "$3=yes"
1809else
1810 eval "$3=no"
1811fi
1812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1813fi
1814eval ac_res=\$$3
1815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1816$as_echo "$ac_res" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001817 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001818
1819} # ac_fn_c_check_header_compile
1820
Matthias Kloseb9621712010-04-24 17:59:49 +00001821# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1822# -------------------------------------------
1823# Tests whether TYPE exists after having included INCLUDES, setting cache
1824# variable VAR accordingly.
1825ac_fn_c_check_type ()
1826{
1827 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1829$as_echo_n "checking for $2... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001830if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001831 $as_echo_n "(cached) " >&6
1832else
1833 eval "$3=no"
1834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1835/* end confdefs.h. */
1836$4
1837int
1838main ()
1839{
1840if (sizeof ($2))
1841 return 0;
1842 ;
1843 return 0;
1844}
1845_ACEOF
1846if ac_fn_c_try_compile "$LINENO"; then :
1847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1848/* end confdefs.h. */
1849$4
1850int
1851main ()
1852{
1853if (sizeof (($2)))
1854 return 0;
1855 ;
1856 return 0;
1857}
1858_ACEOF
1859if ac_fn_c_try_compile "$LINENO"; then :
1860
1861else
1862 eval "$3=yes"
1863fi
1864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1865fi
1866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1867fi
1868eval ac_res=\$$3
1869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1870$as_echo "$ac_res" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001871 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001872
1873} # ac_fn_c_check_type
1874
1875# ac_fn_c_find_uintX_t LINENO BITS VAR
1876# ------------------------------------
1877# Finds an unsigned integer type with width BITS, setting cache variable VAR
1878# accordingly.
1879ac_fn_c_find_uintX_t ()
1880{
1881 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1883$as_echo_n "checking for uint$2_t... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001884if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001885 $as_echo_n "(cached) " >&6
1886else
1887 eval "$3=no"
1888 # Order is important - never check a type that is potentially smaller
1889 # than half of the expected target width.
1890 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1891 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1893/* end confdefs.h. */
1894$ac_includes_default
1895int
1896main ()
1897{
1898static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1899test_array [0] = 0
1900
1901 ;
1902 return 0;
1903}
1904_ACEOF
1905if ac_fn_c_try_compile "$LINENO"; then :
1906 case $ac_type in #(
1907 uint$2_t) :
1908 eval "$3=yes" ;; #(
1909 *) :
1910 eval "$3=\$ac_type" ;;
1911esac
1912fi
1913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001914 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001915
1916else
1917 break
1918fi
1919 done
1920fi
1921eval ac_res=\$$3
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1923$as_echo "$ac_res" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001924 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001925
1926} # ac_fn_c_find_uintX_t
1927
1928# ac_fn_c_find_intX_t LINENO BITS VAR
1929# -----------------------------------
1930# Finds a signed integer type with width BITS, setting cache variable VAR
1931# accordingly.
1932ac_fn_c_find_intX_t ()
1933{
1934 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1936$as_echo_n "checking for int$2_t... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001937if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001938 $as_echo_n "(cached) " >&6
1939else
1940 eval "$3=no"
1941 # Order is important - never check a type that is potentially smaller
1942 # than half of the expected target width.
1943 for ac_type in int$2_t 'int' 'long int' \
1944 'long long int' 'short int' 'signed char'; do
1945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1946/* end confdefs.h. */
1947$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001948 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001949int
1950main ()
1951{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001952static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001953test_array [0] = 0
1954
1955 ;
1956 return 0;
1957}
1958_ACEOF
1959if ac_fn_c_try_compile "$LINENO"; then :
1960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1961/* end confdefs.h. */
1962$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001963 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001964int
1965main ()
1966{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001967static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001968 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1969test_array [0] = 0
1970
1971 ;
1972 return 0;
1973}
1974_ACEOF
1975if ac_fn_c_try_compile "$LINENO"; then :
1976
1977else
1978 case $ac_type in #(
1979 int$2_t) :
1980 eval "$3=yes" ;; #(
1981 *) :
1982 eval "$3=\$ac_type" ;;
1983esac
1984fi
1985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1986fi
1987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001988 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001989
1990else
1991 break
1992fi
1993 done
1994fi
1995eval ac_res=\$$3
1996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1997$as_echo "$ac_res" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001998 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001999
2000} # ac_fn_c_find_intX_t
2001
2002# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2003# --------------------------------------------
2004# Tries to find the compile-time value of EXPR in a program that includes
2005# INCLUDES, setting VAR accordingly. Returns whether the value could be
2006# computed
2007ac_fn_c_compute_int ()
2008{
2009 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2010 if test "$cross_compiling" = yes; then
2011 # Depending upon the size, compute the lo and hi bounds.
2012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2013/* end confdefs.h. */
2014$4
2015int
2016main ()
2017{
2018static int test_array [1 - 2 * !(($2) >= 0)];
2019test_array [0] = 0
2020
2021 ;
2022 return 0;
2023}
2024_ACEOF
2025if ac_fn_c_try_compile "$LINENO"; then :
2026 ac_lo=0 ac_mid=0
2027 while :; do
2028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2029/* end confdefs.h. */
2030$4
2031int
2032main ()
2033{
2034static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2035test_array [0] = 0
2036
2037 ;
2038 return 0;
2039}
2040_ACEOF
2041if ac_fn_c_try_compile "$LINENO"; then :
2042 ac_hi=$ac_mid; break
2043else
2044 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2045 if test $ac_lo -le $ac_mid; then
2046 ac_lo= ac_hi=
2047 break
2048 fi
2049 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2050fi
2051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2052 done
2053else
2054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2055/* end confdefs.h. */
2056$4
2057int
2058main ()
2059{
2060static int test_array [1 - 2 * !(($2) < 0)];
2061test_array [0] = 0
2062
2063 ;
2064 return 0;
2065}
2066_ACEOF
2067if ac_fn_c_try_compile "$LINENO"; then :
2068 ac_hi=-1 ac_mid=-1
2069 while :; do
2070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2071/* end confdefs.h. */
2072$4
2073int
2074main ()
2075{
2076static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2077test_array [0] = 0
2078
2079 ;
2080 return 0;
2081}
2082_ACEOF
2083if ac_fn_c_try_compile "$LINENO"; then :
2084 ac_lo=$ac_mid; break
2085else
2086 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2087 if test $ac_mid -le $ac_hi; then
2088 ac_lo= ac_hi=
2089 break
2090 fi
2091 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2092fi
2093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2094 done
2095else
2096 ac_lo= ac_hi=
2097fi
2098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2099fi
2100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2101# Binary search between lo and hi bounds.
2102while test "x$ac_lo" != "x$ac_hi"; do
2103 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2105/* end confdefs.h. */
2106$4
2107int
2108main ()
2109{
2110static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2111test_array [0] = 0
2112
2113 ;
2114 return 0;
2115}
2116_ACEOF
2117if ac_fn_c_try_compile "$LINENO"; then :
2118 ac_hi=$ac_mid
2119else
2120 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2121fi
2122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2123done
2124case $ac_lo in #((
2125?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2126'') ac_retval=1 ;;
2127esac
2128 else
2129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2130/* end confdefs.h. */
2131$4
2132static long int longval () { return $2; }
2133static unsigned long int ulongval () { return $2; }
2134#include <stdio.h>
2135#include <stdlib.h>
2136int
2137main ()
2138{
2139
2140 FILE *f = fopen ("conftest.val", "w");
2141 if (! f)
2142 return 1;
2143 if (($2) < 0)
2144 {
2145 long int i = longval ();
2146 if (i != ($2))
2147 return 1;
2148 fprintf (f, "%ld", i);
2149 }
2150 else
2151 {
2152 unsigned long int i = ulongval ();
2153 if (i != ($2))
2154 return 1;
2155 fprintf (f, "%lu", i);
2156 }
2157 /* Do not output a trailing newline, as this causes \r\n confusion
2158 on some platforms. */
2159 return ferror (f) || fclose (f) != 0;
2160
2161 ;
2162 return 0;
2163}
2164_ACEOF
2165if ac_fn_c_try_run "$LINENO"; then :
2166 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2167else
2168 ac_retval=1
2169fi
2170rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2171 conftest.$ac_objext conftest.beam conftest.$ac_ext
2172rm -f conftest.val
2173
2174 fi
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002175 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002176 as_fn_set_status $ac_retval
2177
2178} # ac_fn_c_compute_int
2179
2180# ac_fn_c_check_func LINENO FUNC VAR
2181# ----------------------------------
2182# Tests whether FUNC exists, setting the cache variable VAR accordingly
2183ac_fn_c_check_func ()
2184{
2185 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2187$as_echo_n "checking for $2... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002188if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002189 $as_echo_n "(cached) " >&6
2190else
2191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2192/* end confdefs.h. */
2193/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2194 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2195#define $2 innocuous_$2
2196
2197/* System header to define __stub macros and hopefully few prototypes,
2198 which can conflict with char $2 (); below.
2199 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2200 <limits.h> exists even on freestanding compilers. */
2201
2202#ifdef __STDC__
2203# include <limits.h>
2204#else
2205# include <assert.h>
2206#endif
2207
2208#undef $2
2209
2210/* Override any GCC internal prototype to avoid an error.
2211 Use char because int might match the return type of a GCC
2212 builtin and then its argument prototype would still apply. */
2213#ifdef __cplusplus
2214extern "C"
2215#endif
2216char $2 ();
2217/* The GNU C library defines this for functions which it implements
2218 to always fail with ENOSYS. Some functions are actually named
2219 something starting with __ and the normal name is an alias. */
2220#if defined __stub_$2 || defined __stub___$2
2221choke me
2222#endif
2223
2224int
2225main ()
2226{
2227return $2 ();
2228 ;
2229 return 0;
2230}
2231_ACEOF
2232if ac_fn_c_try_link "$LINENO"; then :
2233 eval "$3=yes"
2234else
2235 eval "$3=no"
2236fi
2237rm -f core conftest.err conftest.$ac_objext \
2238 conftest$ac_exeext conftest.$ac_ext
2239fi
2240eval ac_res=\$$3
2241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2242$as_echo "$ac_res" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002243 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002244
2245} # ac_fn_c_check_func
2246
2247# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2248# ----------------------------------------------------
2249# Tries to find if the field MEMBER exists in type AGGR, after including
2250# INCLUDES, setting cache variable VAR accordingly.
2251ac_fn_c_check_member ()
2252{
2253 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2255$as_echo_n "checking for $2.$3... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002256if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002257 $as_echo_n "(cached) " >&6
2258else
2259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2260/* end confdefs.h. */
2261$5
2262int
2263main ()
2264{
2265static $2 ac_aggr;
2266if (ac_aggr.$3)
2267return 0;
2268 ;
2269 return 0;
2270}
2271_ACEOF
2272if ac_fn_c_try_compile "$LINENO"; then :
2273 eval "$4=yes"
2274else
2275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2276/* end confdefs.h. */
2277$5
2278int
2279main ()
2280{
2281static $2 ac_aggr;
2282if (sizeof ac_aggr.$3)
2283return 0;
2284 ;
2285 return 0;
2286}
2287_ACEOF
2288if ac_fn_c_try_compile "$LINENO"; then :
2289 eval "$4=yes"
2290else
2291 eval "$4=no"
2292fi
2293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2294fi
2295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2296fi
2297eval ac_res=\$$4
2298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2299$as_echo "$ac_res" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002300 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002301
2302} # ac_fn_c_check_member
2303
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002304# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2305# ---------------------------------------------
2306# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2307# accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002308ac_fn_c_check_decl ()
2309{
2310 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002311 as_decl_name=`echo $2|sed 's/ *(.*//'`
2312 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2314$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002315if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002316 $as_echo_n "(cached) " >&6
2317else
2318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2319/* end confdefs.h. */
2320$4
2321int
2322main ()
2323{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002324#ifndef $as_decl_name
2325#ifdef __cplusplus
2326 (void) $as_decl_use;
2327#else
2328 (void) $as_decl_name;
2329#endif
Matthias Kloseb9621712010-04-24 17:59:49 +00002330#endif
2331
2332 ;
2333 return 0;
2334}
2335_ACEOF
2336if ac_fn_c_try_compile "$LINENO"; then :
2337 eval "$3=yes"
2338else
2339 eval "$3=no"
2340fi
2341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2342fi
2343eval ac_res=\$$3
2344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2345$as_echo "$ac_res" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002346 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002347
2348} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002349cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002350This file contains any messages produced by compilers while
2351running configure, to aid debugging if configure makes a mistake.
2352
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002353It was created by python $as_me 3.3, which was
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002354generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002355
2356 $ $0 $@
2357
2358_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002359exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002360{
2361cat <<_ASUNAME
2362## --------- ##
2363## Platform. ##
2364## --------- ##
2365
2366hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2367uname -m = `(uname -m) 2>/dev/null || echo unknown`
2368uname -r = `(uname -r) 2>/dev/null || echo unknown`
2369uname -s = `(uname -s) 2>/dev/null || echo unknown`
2370uname -v = `(uname -v) 2>/dev/null || echo unknown`
2371
2372/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2373/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2374
2375/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2376/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2377/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002378/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002379/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2380/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2381/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2382
2383_ASUNAME
2384
2385as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2386for as_dir in $PATH
2387do
2388 IFS=$as_save_IFS
2389 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002390 $as_echo "PATH: $as_dir"
2391 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002392IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002393
2394} >&5
2395
2396cat >&5 <<_ACEOF
2397
2398
2399## ----------- ##
2400## Core tests. ##
2401## ----------- ##
2402
2403_ACEOF
2404
2405
2406# Keep a trace of the command line.
2407# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002408# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002409# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002410# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002411ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002412ac_configure_args0=
2413ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002414ac_must_keep_next=false
2415for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002416do
Skip Montanaro6dead952003-09-25 14:50:04 +00002417 for ac_arg
2418 do
2419 case $ac_arg in
2420 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2421 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2422 | -silent | --silent | --silen | --sile | --sil)
2423 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002424 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002425 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002426 esac
2427 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002428 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002429 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002430 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002431 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002432 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002433 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002434 case $ac_arg in
2435 *=* | --config-cache | -C | -disable-* | --disable-* \
2436 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2437 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2438 | -with-* | --with-* | -without-* | --without-* | --x)
2439 case "$ac_configure_args0 " in
2440 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2441 esac
2442 ;;
2443 -* ) ac_must_keep_next=true ;;
2444 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002445 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002446 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002447 ;;
2448 esac
2449 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002450done
Matthias Kloseb9621712010-04-24 17:59:49 +00002451{ ac_configure_args0=; unset ac_configure_args0;}
2452{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002453
2454# When interrupted or exit'd, cleanup temporary files, and complete
2455# config.log. We remove comments because anyway the quotes in there
2456# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002457# WARNING: Use '\'' to represent an apostrophe within the trap.
2458# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002459trap 'exit_status=$?
2460 # Save into config.log some information that might help in debugging.
2461 {
2462 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002463
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002464 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002465## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002466## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002467 echo
2468 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469(
2470 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2471 eval ac_val=\$$ac_var
2472 case $ac_val in #(
2473 *${as_nl}*)
2474 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002475 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2476$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477 esac
2478 case $ac_var in #(
2479 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002480 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2481 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002482 esac ;;
2483 esac
2484 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002485 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2487 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002488 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489 "s/'\''/'\''\\\\'\'''\''/g;
2490 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2491 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002492 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002493 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002494 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495 esac |
2496 sort
2497)
Martin v. Löwis11437992002-04-12 09:54:03 +00002498 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002499
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002500 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002501## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002502## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 echo
2504 for ac_var in $ac_subst_vars
2505 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506 eval ac_val=\$$ac_var
2507 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 done | sort
2512 echo
2513
2514 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002515 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002517## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002518 echo
2519 for ac_var in $ac_subst_files
2520 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521 eval ac_val=\$$ac_var
2522 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002523 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002525 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002526 done | sort
2527 echo
2528 fi
2529
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002531 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002532## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002533## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 echo
2537 fi
2538 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002539 $as_echo "$as_me: caught signal $ac_signal"
2540 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002541 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542 rm -f core *.core core.conftest.* &&
2543 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002544 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002545' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002546for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002547 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002548done
2549ac_signal=0
2550
2551# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002552rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002553
Matthias Kloseb9621712010-04-24 17:59:49 +00002554$as_echo "/* confdefs.h */" > confdefs.h
2555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556# Predefined preprocessor variables.
2557
2558cat >>confdefs.h <<_ACEOF
2559#define PACKAGE_NAME "$PACKAGE_NAME"
2560_ACEOF
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562cat >>confdefs.h <<_ACEOF
2563#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2564_ACEOF
2565
Martin v. Löwis11437992002-04-12 09:54:03 +00002566cat >>confdefs.h <<_ACEOF
2567#define PACKAGE_VERSION "$PACKAGE_VERSION"
2568_ACEOF
2569
Martin v. Löwis11437992002-04-12 09:54:03 +00002570cat >>confdefs.h <<_ACEOF
2571#define PACKAGE_STRING "$PACKAGE_STRING"
2572_ACEOF
2573
Martin v. Löwis11437992002-04-12 09:54:03 +00002574cat >>confdefs.h <<_ACEOF
2575#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2576_ACEOF
2577
Matthias Kloseb9621712010-04-24 17:59:49 +00002578cat >>confdefs.h <<_ACEOF
2579#define PACKAGE_URL "$PACKAGE_URL"
2580_ACEOF
2581
Martin v. Löwis11437992002-04-12 09:54:03 +00002582
2583# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002584# Prefer an explicitly selected file to automatically selected ones.
2585ac_site_file1=NONE
2586ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002588 # We do not want a PATH search for config.site.
2589 case $CONFIG_SITE in #((
2590 -*) ac_site_file1=./$CONFIG_SITE;;
2591 */*) ac_site_file1=$CONFIG_SITE;;
2592 *) ac_site_file1=./$CONFIG_SITE;;
2593 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002595 ac_site_file1=$prefix/share/config.site
2596 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002597else
Matthias Kloseb9621712010-04-24 17:59:49 +00002598 ac_site_file1=$ac_default_prefix/share/config.site
2599 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002600fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002601for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002602do
Matthias Kloseb9621712010-04-24 17:59:49 +00002603 test "x$ac_site_file" = xNONE && continue
2604 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2605 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2606$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002608 . "$ac_site_file" \
2609 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2610$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2611as_fn_error $? "failed to load site script $ac_site_file
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002612See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002613 fi
2614done
2615
2616if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002617 # Some versions of bash will fail to source /dev/null (special files
2618 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2619 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2620 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2621$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002623 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2624 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 esac
2626 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002627else
Matthias Kloseb9621712010-04-24 17:59:49 +00002628 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2629$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 >$cache_file
2631fi
2632
2633# Check that the precious variables saved in the cache have kept the same
2634# value.
2635ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002636for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2638 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002639 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2640 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 case $ac_old_set,$ac_new_set in
2642 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002643 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2644$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002645 ac_cache_corrupted=: ;;
2646 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002647 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2648$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 ac_cache_corrupted=: ;;
2650 ,);;
2651 *)
2652 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002653 # differences in whitespace do not lead to failure.
2654 ac_old_val_w=`echo x $ac_old_val`
2655 ac_new_val_w=`echo x $ac_new_val`
2656 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2658$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2659 ac_cache_corrupted=:
2660 else
2661 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2662$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2663 eval $ac_var=\$ac_old_val
2664 fi
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2666$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2667 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2668$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 fi;;
2670 esac
2671 # Pass precious variables to config.status.
2672 if test "$ac_new_set" = set; then
2673 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002674 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002675 *) ac_arg=$ac_var=$ac_new_val ;;
2676 esac
2677 case " $ac_configure_args " in
2678 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002679 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002680 esac
2681 fi
2682done
2683if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002684 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2685$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2686 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2687$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002688 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002689fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002690## -------------------- ##
2691## Main body of script. ##
2692## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002693
Guido van Rossum7f43da71994-08-01 12:15:30 +00002694ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002695ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002696ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2697ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2698ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002699
Guido van Rossum627b2d71993-12-24 10:39:16 +00002700
Michael W. Hudson54241132001-12-07 15:38:26 +00002701
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002702
2703
2704
2705
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002706if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002707then
2708# Extract the first word of "hg", so it can be a program name with args.
2709set dummy hg; ac_word=$2
2710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2711$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002712if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002713 $as_echo_n "(cached) " >&6
2714else
2715 if test -n "$HAS_HG"; then
2716 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2717else
2718as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2719for as_dir in $PATH
2720do
2721 IFS=$as_save_IFS
2722 test -z "$as_dir" && as_dir=.
2723 for ac_exec_ext in '' $ac_executable_extensions; do
2724 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2725 ac_cv_prog_HAS_HG="found"
2726 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2727 break 2
2728 fi
2729done
2730 done
2731IFS=$as_save_IFS
2732
2733 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2734fi
2735fi
2736HAS_HG=$ac_cv_prog_HAS_HG
2737if test -n "$HAS_HG"; then
2738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2739$as_echo "$HAS_HG" >&6; }
2740else
2741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2742$as_echo "no" >&6; }
2743fi
2744
2745
2746else
2747HAS_HG=no-repository
2748fi
2749if test $HAS_HG = found
2750then
2751 HGVERSION="hg id -i \$(srcdir)"
2752 HGTAG="hg id -t \$(srcdir)"
2753 HGBRANCH="hg id -b \$(srcdir)"
2754else
2755 HGVERSION=""
2756 HGTAG=""
2757 HGBRANCH=""
2758fi
2759
2760
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002761ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002762
2763
Martin v. Löwis11437992002-04-12 09:54:03 +00002764
Benjamin Petersond23f8222009-04-05 19:13:16 +00002765if test "$prefix" != "/"; then
2766 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2767fi
2768
2769
Martin v. Löwis11437992002-04-12 09:54:03 +00002770
2771
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002772# We don't use PACKAGE_ variables, and they cause conflicts
2773# with other autoconf-based packages that include Python.h
2774grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2775rm confdefs.h
2776mv confdefs.h.new confdefs.h
2777
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002778
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002779VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002780
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002781# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002782
2783SOVERSION=1.0
2784
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002785# The later defininition of _XOPEN_SOURCE disables certain features
2786# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2787
Matthias Kloseb9621712010-04-24 17:59:49 +00002788$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002789
2790
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002791# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2792# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2793# them.
2794
Matthias Kloseb9621712010-04-24 17:59:49 +00002795$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002796
2797
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002798# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2799# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2800# them.
2801
Matthias Kloseb9621712010-04-24 17:59:49 +00002802$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002803
2804
Martin v. Löwisd6320502004-08-12 13:45:08 +00002805# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2806# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2807
Matthias Kloseb9621712010-04-24 17:59:49 +00002808$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002809
2810
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002811# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2812# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2813# them.
2814
Matthias Kloseb9621712010-04-24 17:59:49 +00002815$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002816
2817
2818
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002819define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002820
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002821# Arguments passed to configure.
2822
2823CONFIG_ARGS="$ac_configure_args"
2824
Matthias Kloseb9621712010-04-24 17:59:49 +00002825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2826$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002827# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002828if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002829 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002830 case $enableval in
2831 yes)
2832 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002833 if test ! -d "${enableval}"
2834 then
2835 enableval=/
2836 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002837 ;;
2838 esac
2839 case $enableval in
2840 no)
2841 UNIVERSALSDK=
2842 enable_universalsdk=
2843 ;;
2844 *)
2845 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002846 if test ! -d "${UNIVERSALSDK}"
2847 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002848 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002849 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002850 ;;
2851 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002852
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002853
Thomas Wouters477c8d52006-05-27 19:21:47 +00002854else
2855
2856 UNIVERSALSDK=
2857 enable_universalsdk=
2858
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002859fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002860
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002861if test -n "${UNIVERSALSDK}"
2862then
Matthias Kloseb9621712010-04-24 17:59:49 +00002863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2864$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002865else
Matthias Kloseb9621712010-04-24 17:59:49 +00002866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2867$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002868fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002869
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002870
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002871
2872
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002873UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002874
Matthias Kloseb9621712010-04-24 17:59:49 +00002875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2876$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002877
2878# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002879if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002880 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2882$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002883 UNIVERSAL_ARCHS="$withval"
2884
2885else
2886
Matthias Kloseb9621712010-04-24 17:59:49 +00002887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2888$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002889
2890fi
2891
2892
2893
2894
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002895
2896# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002897if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002898 withval=$with_framework_name;
2899 PYTHONFRAMEWORK=${withval}
2900 PYTHONFRAMEWORKDIR=${withval}.framework
2901 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2902
2903else
2904
2905 PYTHONFRAMEWORK=Python
2906 PYTHONFRAMEWORKDIR=Python.framework
2907 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2908
2909fi
2910
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002911# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002912if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002913 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002914 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002915 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002916 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002917 esac
2918 case $enableval in
2919 no)
2920 PYTHONFRAMEWORK=
2921 PYTHONFRAMEWORKDIR=no-framework
2922 PYTHONFRAMEWORKPREFIX=
2923 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002924 FRAMEWORKINSTALLFIRST=
2925 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002926 FRAMEWORKALTINSTALLFIRST=
2927 FRAMEWORKALTINSTALLLAST=
2928 if test "x${prefix}" = "xNONE"; then
2929 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2930 else
2931 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2932 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002933 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002934 ;;
2935 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002936 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002937 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002938 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002939 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002940 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2941 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002942 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002943
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002944 if test "x${prefix}" = "xNONE" ; then
2945 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002946
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002947 else
2948 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2949 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002950
2951 case "${enableval}" in
2952 /System*)
2953 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2954 if test "${prefix}" = "NONE" ; then
2955 # See below
2956 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2957 fi
2958 ;;
2959
2960 /Library*)
2961 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2962 ;;
2963
2964 */Library/Frameworks)
2965 MDIR="`dirname "${enableval}"`"
2966 MDIR="`dirname "${MDIR}"`"
2967 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2968
2969 if test "${prefix}" = "NONE"; then
2970 # User hasn't specified the
2971 # --prefix option, but wants to install
2972 # the framework in a non-default location,
2973 # ensure that the compatibility links get
2974 # installed relative to that prefix as well
2975 # instead of in /usr/local.
2976 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2977 fi
2978 ;;
2979
2980 *)
2981 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2982 ;;
2983 esac
2984
Jack Jansen127e56e2001-09-11 14:41:54 +00002985 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002986
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002987 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002988 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002989 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002990
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002991 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002992
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002993 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2994
2995 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2996
Jack Jansene578a632001-08-15 01:27:14 +00002997 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002998
Guido van Rossum563e7081996-09-10 18:20:48 +00002999else
Martin v. Löwis11437992002-04-12 09:54:03 +00003000
Jack Jansene578a632001-08-15 01:27:14 +00003001 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003002 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003003 PYTHONFRAMEWORKPREFIX=
3004 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003005 FRAMEWORKINSTALLFIRST=
3006 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003007 FRAMEWORKALTINSTALLFIRST=
3008 FRAMEWORKALTINSTALLLAST=
3009 if test "x${prefix}" = "xNONE" ; then
3010 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3011 else
3012 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3013 fi
Jack Jansene578a632001-08-15 01:27:14 +00003014 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003015
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003016
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003017fi
3018
Thomas Wouters477c8d52006-05-27 19:21:47 +00003019
3020
Michael W. Hudson54241132001-12-07 15:38:26 +00003021
3022
3023
3024
Jack Jansene578a632001-08-15 01:27:14 +00003025
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003026
3027
3028
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003029
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003030
Jack Jansene578a632001-08-15 01:27:14 +00003031##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003032## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003033## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003034##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003035# Set name for machine-dependent library files
3036
Matthias Kloseb9621712010-04-24 17:59:49 +00003037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3038$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003039if test -z "$MACHDEP"
3040then
Guido van Rossum563e7081996-09-10 18:20:48 +00003041 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003042 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003043 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003044 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003045 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003046 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003047 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00003048 ac_md_system=`echo $ac_sys_system |
3049 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3050 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00003051 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00003052 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003053
Guido van Rossum07397971997-04-29 21:49:50 +00003054 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003055 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003056 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003057 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003058 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003059 esac
3060fi
Guido van Rossum91922671997-10-09 20:24:13 +00003061
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003062# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3063# disable features if it is defined, without any means to access these
3064# features as extensions. For these systems, we skip the definition of
3065# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3066# some feature, make sure there is no alternative way to access this
3067# feature. Also, when using wildcards, make sure you have verified the
3068# need for not defining _XOPEN_SOURCE on all systems matching the
3069# wildcard, and that the wildcard does not include future systems
3070# (which may remove their limitations).
3071case $ac_sys_system/$ac_sys_release in
3072 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3073 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003074 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003075 # In addition, Stefan Krah confirms that issue #1244610 exists through
3076 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003077 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003078 define_xopen_source=no
3079 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3080 # also defined. This can be overridden by defining _BSD_SOURCE
3081 # As this has a different meaning on Linux, only define it on OpenBSD
3082
Matthias Kloseb9621712010-04-24 17:59:49 +00003083$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003084
3085 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003086 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003087 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3088 # also defined. This can be overridden by defining _BSD_SOURCE
3089 # As this has a different meaning on Linux, only define it on OpenBSD
3090
Matthias Kloseb9621712010-04-24 17:59:49 +00003091$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003092
3093 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003094 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3095 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3096 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003097 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003098 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003099 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3100 # request to enable features supported by the standard as a request
3101 # to disable features not supported by the standard. The best way
3102 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3103 # entirely and define __EXTENSIONS__ instead.
3104 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003105 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003106 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3107 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003108 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003109 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003110 define_xopen_source=no;;
3111 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003112 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003113 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003114 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003115 # On FreeBSD 4, the math functions C89 does not cover are never defined
3116 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3117 FreeBSD/4.*)
3118 define_xopen_source=no;;
3119 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3120 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3121 # identifies itself as Darwin/7.*
3122 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3123 # disables platform specific features beyond repair.
3124 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3125 # has no effect, don't bother defining them
3126 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003127 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003128 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003129 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003130 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3131 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3132 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003133 AIX/4)
3134 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003135 AIX/5)
3136 if test `uname -r` -eq 1; then
3137 define_xopen_source=no
3138 fi
3139 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003140 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3141 # defining NI_NUMERICHOST.
3142 QNX/6.3.2)
3143 define_xopen_source=no
3144 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003145
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003146esac
3147
3148if test $define_xopen_source = yes
3149then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003150
Matthias Kloseb9621712010-04-24 17:59:49 +00003151$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003152
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003153
3154 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3155 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3156 # several APIs are not declared. Since this is also needed in some
3157 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003158
Matthias Kloseb9621712010-04-24 17:59:49 +00003159$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003160
3161
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003162
Matthias Kloseb9621712010-04-24 17:59:49 +00003163$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003164
3165
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003166fi
3167
Guido van Rossum91922671997-10-09 20:24:13 +00003168#
3169# SGI compilers allow the specification of the both the ABI and the
3170# ISA on the command line. Depending on the values of these switches,
3171# different and often incompatable code will be generated.
3172#
3173# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3174# thus supply support for various ABI/ISA combinations. The MACHDEP
3175# variable is also adjusted.
3176#
3177
3178if test ! -z "$SGI_ABI"
3179then
3180 CC="cc $SGI_ABI"
3181 LDFLAGS="$SGI_ABI $LDFLAGS"
3182 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3183fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3185$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003186
Jack Jansen6b08a402004-06-03 12:41:45 +00003187# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3188# it may influence the way we can build extensions, so distutils
3189# needs to check it
3190
Thomas Wouters477c8d52006-05-27 19:21:47 +00003191
Jack Jansen6b08a402004-06-03 12:41:45 +00003192CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003193EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003194
Matthias Kloseb9621712010-04-24 17:59:49 +00003195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3196$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003197ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3199$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003200
Guido van Rossum627b2d71993-12-24 10:39:16 +00003201# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003202
3203# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3204# for debug/optimization stuff. BASECFLAGS is for flags that are required
3205# just to get things to compile and link. Users are free to override OPT
3206# when running configure or make. The build should not break if they do.
3207# BASECFLAGS should generally not be messed with, however.
3208
3209# XXX shouldn't some/most/all of this code be merged with the stuff later
3210# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3212$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003213
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003214# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003215if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003216 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003217 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003218 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003219 without_gcc=yes;;
3220 yes) CC=gcc
3221 without_gcc=no;;
3222 *) CC=$withval
3223 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003224 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003225else
Martin v. Löwis11437992002-04-12 09:54:03 +00003226
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003227 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003228 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003229 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003230 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003231 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003232fi
3233
Matthias Kloseb9621712010-04-24 17:59:49 +00003234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3235$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003236
Guido van Rossum8b131c51995-03-09 14:10:13 +00003237# If the user switches compilers, we can't believe the cache
3238if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3239then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003240 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003241(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003242fi
3243
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003244# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3245# when the compiler supports them, but we don't always want -O2, and
3246# we set -g later.
3247if test -z "$CFLAGS"; then
3248 CFLAGS=
3249fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003250ac_ext=c
3251ac_cpp='$CPP $CPPFLAGS'
3252ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3253ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3254ac_compiler_gnu=$ac_cv_c_compiler_gnu
3255if test -n "$ac_tool_prefix"; then
3256 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3257set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3259$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02003260if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003261 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003262else
3263 if test -n "$CC"; then
3264 ac_cv_prog_CC="$CC" # Let the user override the test.
3265else
Martin v. Löwis11437992002-04-12 09:54:03 +00003266as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3267for as_dir in $PATH
3268do
3269 IFS=$as_save_IFS
3270 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003271 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003272 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003273 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003274 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003275 break 2
3276 fi
3277done
Matthias Kloseb9621712010-04-24 17:59:49 +00003278 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003279IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003280
Jack Jansendd19cf82001-12-06 22:36:17 +00003281fi
3282fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003283CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003284if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3286$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003287else
Matthias Kloseb9621712010-04-24 17:59:49 +00003288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3289$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003290fi
3291
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003292
Martin v. Löwis11437992002-04-12 09:54:03 +00003293fi
3294if test -z "$ac_cv_prog_CC"; then
3295 ac_ct_CC=$CC
3296 # Extract the first word of "gcc", so it can be a program name with args.
3297set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3299$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02003300if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003301 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003302else
3303 if test -n "$ac_ct_CC"; then
3304 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3305else
3306as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3307for as_dir in $PATH
3308do
3309 IFS=$as_save_IFS
3310 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003311 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003312 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003313 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003314 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003315 break 2
3316 fi
3317done
Matthias Kloseb9621712010-04-24 17:59:49 +00003318 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003319IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003320
3321fi
3322fi
3323ac_ct_CC=$ac_cv_prog_ac_ct_CC
3324if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3326$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003327else
Matthias Kloseb9621712010-04-24 17:59:49 +00003328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3329$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003330fi
3331
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003332 if test "x$ac_ct_CC" = x; then
3333 CC=""
3334 else
3335 case $cross_compiling:$ac_tool_warned in
3336yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003337{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3338$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003339ac_tool_warned=yes ;;
3340esac
3341 CC=$ac_ct_CC
3342 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003343else
3344 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003345fi
3346
Jack Jansendd19cf82001-12-06 22:36:17 +00003347if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003348 if test -n "$ac_tool_prefix"; then
3349 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003350set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3352$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02003353if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003354 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003355else
3356 if test -n "$CC"; then
3357 ac_cv_prog_CC="$CC" # Let the user override the test.
3358else
Martin v. Löwis11437992002-04-12 09:54:03 +00003359as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3360for as_dir in $PATH
3361do
3362 IFS=$as_save_IFS
3363 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003364 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003365 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003366 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003367 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003368 break 2
3369 fi
3370done
Matthias Kloseb9621712010-04-24 17:59:49 +00003371 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003372IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003373
3374fi
3375fi
3376CC=$ac_cv_prog_CC
3377if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3379$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003380else
Matthias Kloseb9621712010-04-24 17:59:49 +00003381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3382$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003383fi
3384
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003385
Martin v. Löwis11437992002-04-12 09:54:03 +00003386 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003387fi
3388if test -z "$CC"; then
3389 # Extract the first word of "cc", so it can be a program name with args.
3390set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3392$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02003393if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003394 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003395else
3396 if test -n "$CC"; then
3397 ac_cv_prog_CC="$CC" # Let the user override the test.
3398else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003399 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003400as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3401for as_dir in $PATH
3402do
3403 IFS=$as_save_IFS
3404 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003405 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003406 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003407 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3408 ac_prog_rejected=yes
3409 continue
3410 fi
3411 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003412 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003413 break 2
3414 fi
3415done
Matthias Kloseb9621712010-04-24 17:59:49 +00003416 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003417IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003418
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003419if test $ac_prog_rejected = yes; then
3420 # We found a bogon in the path, so make sure we never use it.
3421 set dummy $ac_cv_prog_CC
3422 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003423 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003424 # We chose a different compiler from the bogus one.
3425 # However, it has the same basename, so the bogon will be chosen
3426 # first if we set CC to just the basename; use the full file name.
3427 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003428 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003429 fi
3430fi
3431fi
3432fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003433CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003434if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3436$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003437else
Matthias Kloseb9621712010-04-24 17:59:49 +00003438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3439$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003440fi
3441
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003442
Martin v. Löwis11437992002-04-12 09:54:03 +00003443fi
3444if test -z "$CC"; then
3445 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003446 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003447 do
3448 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3449set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3451$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02003452if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003453 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003454else
3455 if test -n "$CC"; then
3456 ac_cv_prog_CC="$CC" # Let the user override the test.
3457else
Martin v. Löwis11437992002-04-12 09:54:03 +00003458as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3459for as_dir in $PATH
3460do
3461 IFS=$as_save_IFS
3462 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003463 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003464 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003465 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003466 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003467 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003468 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003469done
Matthias Kloseb9621712010-04-24 17:59:49 +00003470 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003471IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003472
3473fi
3474fi
3475CC=$ac_cv_prog_CC
3476if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3478$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003479else
Matthias Kloseb9621712010-04-24 17:59:49 +00003480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3481$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003482fi
3483
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003484
Martin v. Löwis11437992002-04-12 09:54:03 +00003485 test -n "$CC" && break
3486 done
3487fi
3488if test -z "$CC"; then
3489 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003490 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003491do
3492 # Extract the first word of "$ac_prog", so it can be a program name with args.
3493set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3495$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02003496if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003497 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003498else
3499 if test -n "$ac_ct_CC"; then
3500 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3501else
3502as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3503for as_dir in $PATH
3504do
3505 IFS=$as_save_IFS
3506 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003507 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003508 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003509 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003510 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003511 break 2
3512 fi
3513done
Matthias Kloseb9621712010-04-24 17:59:49 +00003514 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003515IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003516
Martin v. Löwis11437992002-04-12 09:54:03 +00003517fi
3518fi
3519ac_ct_CC=$ac_cv_prog_ac_ct_CC
3520if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3522$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003523else
Matthias Kloseb9621712010-04-24 17:59:49 +00003524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3525$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003526fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003527
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003528
Martin v. Löwis11437992002-04-12 09:54:03 +00003529 test -n "$ac_ct_CC" && break
3530done
Michael W. Hudson54241132001-12-07 15:38:26 +00003531
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003532 if test "x$ac_ct_CC" = x; then
3533 CC=""
3534 else
3535 case $cross_compiling:$ac_tool_warned in
3536yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003537{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3538$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003539ac_tool_warned=yes ;;
3540esac
3541 CC=$ac_ct_CC
3542 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003543fi
3544
3545fi
3546
3547
Matthias Kloseb9621712010-04-24 17:59:49 +00003548test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3549$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003550as_fn_error $? "no acceptable C compiler found in \$PATH
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02003551See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003552
3553# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003554$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3555set X $ac_compile
3556ac_compiler=$2
3557for ac_option in --version -v -V -qversion; do
3558 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003559case "(($ac_try" in
3560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3561 *) ac_try_echo=$ac_try;;
3562esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003563eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3564$as_echo "$ac_try_echo"; } >&5
3565 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003566 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003567 if test -s conftest.err; then
3568 sed '10a\
3569... rest of stderr output deleted ...
3570 10q' conftest.err >conftest.er1
3571 cat conftest.er1 >&5
3572 fi
3573 rm -f conftest.er1 conftest.err
3574 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3575 test $ac_status = 0; }
3576done
Martin v. Löwis11437992002-04-12 09:54:03 +00003577
Matthias Kloseb9621712010-04-24 17:59:49 +00003578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003579/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003580
Martin v. Löwis11437992002-04-12 09:54:03 +00003581int
3582main ()
3583{
3584
3585 ;
3586 return 0;
3587}
3588_ACEOF
3589ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003590ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003591# Try to create an executable without -o first, disregard a.out.
3592# It will help us diagnose broken compilers, and finding out an intuition
3593# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3595$as_echo_n "checking whether the C compiler works... " >&6; }
3596ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3597
3598# The possible output files:
3599ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3600
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003601ac_rmfiles=
3602for ac_file in $ac_files
3603do
3604 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003605 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003606 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3607 esac
3608done
3609rm -f $ac_rmfiles
3610
Matthias Kloseb9621712010-04-24 17:59:49 +00003611if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003612case "(($ac_try" in
3613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3614 *) ac_try_echo=$ac_try;;
3615esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003616eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3617$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003618 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003619 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003620 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3621 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003622 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3623# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3624# in a Makefile. We should not override ac_cv_exeext if it was cached,
3625# so that the user can short-circuit this test for compilers unknown to
3626# Autoconf.
3627for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003628do
3629 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003630 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003632 ;;
3633 [ab].out )
3634 # We found the default executable, but exeext='' is most
3635 # certainly right.
3636 break;;
3637 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003639 then :; else
3640 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3641 fi
3642 # We set ac_cv_exeext here because the later test for it is not
3643 # safe: cross compilers may not add the suffix if given an `-o'
3644 # argument, so we may need to know it at that point already.
3645 # Even if this section looks crufty: it has the advantage of
3646 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003647 break;;
3648 * )
3649 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003650 esac
3651done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003652test "$ac_cv_exeext" = no && ac_cv_exeext=
3653
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003654else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003655 ac_file=''
3656fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003657if test -z "$ac_file"; then :
3658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3659$as_echo "no" >&6; }
3660$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003661sed 's/^/| /' conftest.$ac_ext >&5
3662
Matthias Kloseb9621712010-04-24 17:59:49 +00003663{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3664$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003665as_fn_error 77 "C compiler cannot create executables
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02003666See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003667else
3668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3669$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003670fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3672$as_echo_n "checking for C compiler default output file name... " >&6; }
3673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3674$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003675ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003676
Matthias Kloseb9621712010-04-24 17:59:49 +00003677rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003678ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3680$as_echo_n "checking for suffix of executables... " >&6; }
3681if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003682case "(($ac_try" in
3683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3684 *) ac_try_echo=$ac_try;;
3685esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003686eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3687$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003688 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003689 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003690 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3691 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003692 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3693# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3694# work properly (i.e., refer to `conftest.exe'), while it won't with
3695# `rm'.
3696for ac_file in conftest.exe conftest conftest.*; do
3697 test -f "$ac_file" || continue
3698 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003699 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003700 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3701 break;;
3702 * ) break;;
3703 esac
3704done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003705else
Matthias Kloseb9621712010-04-24 17:59:49 +00003706 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3707$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003708as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02003709See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003711rm -f conftest conftest$ac_cv_exeext
3712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3713$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003714
3715rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003716EXEEXT=$ac_cv_exeext
3717ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3719/* end confdefs.h. */
3720#include <stdio.h>
3721int
3722main ()
3723{
3724FILE *f = fopen ("conftest.out", "w");
3725 return ferror (f) || fclose (f) != 0;
3726
3727 ;
3728 return 0;
3729}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003731ac_clean_files="$ac_clean_files conftest.out"
3732# Check that the compiler produces executables we can run. If not, either
3733# the compiler is broken, or we cross compile.
3734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3735$as_echo_n "checking whether we are cross compiling... " >&6; }
3736if test "$cross_compiling" != yes; then
3737 { { ac_try="$ac_link"
3738case "(($ac_try" in
3739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3740 *) ac_try_echo=$ac_try;;
3741esac
3742eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3743$as_echo "$ac_try_echo"; } >&5
3744 (eval "$ac_link") 2>&5
3745 ac_status=$?
3746 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3747 test $ac_status = 0; }
3748 if { ac_try='./conftest$ac_cv_exeext'
3749 { { case "(($ac_try" in
3750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3751 *) ac_try_echo=$ac_try;;
3752esac
3753eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3754$as_echo "$ac_try_echo"; } >&5
3755 (eval "$ac_try") 2>&5
3756 ac_status=$?
3757 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3758 test $ac_status = 0; }; }; then
3759 cross_compiling=no
3760 else
3761 if test "$cross_compiling" = maybe; then
3762 cross_compiling=yes
3763 else
3764 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3765$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003766as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003767If you meant to cross compile, use \`--host'.
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02003768See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 fi
3770 fi
3771fi
3772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3773$as_echo "$cross_compiling" >&6; }
3774
3775rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3776ac_clean_files=$ac_clean_files_save
3777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3778$as_echo_n "checking for suffix of object files... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02003779if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003780 $as_echo_n "(cached) " >&6
3781else
3782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003783/* end confdefs.h. */
3784
3785int
3786main ()
3787{
3788
3789 ;
3790 return 0;
3791}
3792_ACEOF
3793rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003794if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003795case "(($ac_try" in
3796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3797 *) ac_try_echo=$ac_try;;
3798esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003799eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3800$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003801 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003802 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3804 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003805 for ac_file in conftest.o conftest.obj conftest.*; do
3806 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003807 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003808 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003809 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3810 break;;
3811 esac
3812done
3813else
Matthias Kloseb9621712010-04-24 17:59:49 +00003814 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003815sed 's/^/| /' conftest.$ac_ext >&5
3816
Matthias Kloseb9621712010-04-24 17:59:49 +00003817{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3818$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003819as_fn_error $? "cannot compute suffix of object files: cannot compile
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02003820See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003821fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003822rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3825$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003826OBJEXT=$ac_cv_objext
3827ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3829$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02003830if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003831 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003832else
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003834/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003835
Martin v. Löwis11437992002-04-12 09:54:03 +00003836int
3837main ()
3838{
3839#ifndef __GNUC__
3840 choke me
3841#endif
3842
3843 ;
3844 return 0;
3845}
3846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003847if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003848 ac_compiler_gnu=yes
3849else
Matthias Kloseb9621712010-04-24 17:59:49 +00003850 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003853ac_cv_c_compiler_gnu=$ac_compiler_gnu
3854
3855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3857$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3858if test $ac_compiler_gnu = yes; then
3859 GCC=yes
3860else
3861 GCC=
3862fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003863ac_test_CFLAGS=${CFLAGS+set}
3864ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3866$as_echo_n "checking whether $CC accepts -g... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02003867if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003868 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003869else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003870 ac_save_c_werror_flag=$ac_c_werror_flag
3871 ac_c_werror_flag=yes
3872 ac_cv_prog_cc_g=no
3873 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003875/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003876
Martin v. Löwis11437992002-04-12 09:54:03 +00003877int
3878main ()
3879{
3880
3881 ;
3882 return 0;
3883}
3884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003885if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003886 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003887else
Matthias Kloseb9621712010-04-24 17:59:49 +00003888 CFLAGS=""
3889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003890/* end confdefs.h. */
3891
3892int
3893main ()
3894{
3895
3896 ;
3897 return 0;
3898}
3899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003900if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003901
Matthias Kloseb9621712010-04-24 17:59:49 +00003902else
3903 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003904 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003906/* end confdefs.h. */
3907
3908int
3909main ()
3910{
3911
3912 ;
3913 return 0;
3914}
3915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003916if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003917 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003920fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3922fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3924 ac_c_werror_flag=$ac_save_c_werror_flag
3925fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3927$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003928if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003929 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003930elif test $ac_cv_prog_cc_g = yes; then
3931 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003932 CFLAGS="-g -O2"
3933 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003934 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003935 fi
3936else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003937 if test "$GCC" = yes; then
3938 CFLAGS="-O2"
3939 else
3940 CFLAGS=
3941 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003942fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3944$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02003945if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003946 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003947else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003949ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003951/* end confdefs.h. */
3952#include <stdarg.h>
3953#include <stdio.h>
3954#include <sys/types.h>
3955#include <sys/stat.h>
3956/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3957struct buf { int x; };
3958FILE * (*rcsopen) (struct buf *, struct stat *, int);
3959static char *e (p, i)
3960 char **p;
3961 int i;
3962{
3963 return p[i];
3964}
3965static char *f (char * (*g) (char **, int), char **p, ...)
3966{
3967 char *s;
3968 va_list v;
3969 va_start (v,p);
3970 s = g (p, va_arg (v,int));
3971 va_end (v);
3972 return s;
3973}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003974
3975/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3976 function prototypes and stuff, but not '\xHH' hex character constants.
3977 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003978 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003979 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3980 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003981 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003982int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3983
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003984/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3985 inside strings and character constants. */
3986#define FOO(x) 'x'
3987int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3988
Skip Montanaro6dead952003-09-25 14:50:04 +00003989int test (int i, double x);
3990struct s1 {int (*f) (int a);};
3991struct s2 {int (*f) (double a);};
3992int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3993int argc;
3994char **argv;
3995int
3996main ()
3997{
3998return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3999 ;
4000 return 0;
4001}
4002_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004003for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4004 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004005do
4006 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004007 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004008 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004010rm -f core conftest.err conftest.$ac_objext
4011 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004012done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004013rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004014CC=$ac_save_CC
4015
4016fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004017# AC_CACHE_VAL
4018case "x$ac_cv_prog_cc_c89" in
4019 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4021$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004022 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4024$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004025 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004026 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4028$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004029esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004030if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004031
Matthias Kloseb9621712010-04-24 17:59:49 +00004032fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004033
Martin v. Löwis11437992002-04-12 09:54:03 +00004034ac_ext=c
4035ac_cpp='$CPP $CPPFLAGS'
4036ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4037ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4038ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004039
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004040
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004041
4042
Matthias Kloseb9621712010-04-24 17:59:49 +00004043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4044$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004045
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004046# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004047if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004048 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004049
4050 case $withval in
4051 no) with_cxx_main=no
4052 MAINCC='$(CC)';;
4053 yes) with_cxx_main=yes
4054 MAINCC='$(CXX)';;
4055 *) with_cxx_main=yes
4056 MAINCC=$withval
4057 if test -z "$CXX"
4058 then
4059 CXX=$withval
4060 fi;;
4061 esac
4062else
4063
4064 with_cxx_main=no
4065 MAINCC='$(CC)'
4066
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004067fi
4068
Matthias Kloseb9621712010-04-24 17:59:49 +00004069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4070$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004071
4072preset_cxx="$CXX"
4073if test -z "$CXX"
4074then
4075 case "$CC" in
4076 gcc) # Extract the first word of "g++", so it can be a program name with args.
4077set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4079$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02004080if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004081 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004082else
4083 case $CXX in
4084 [\\/]* | ?:[\\/]*)
4085 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4086 ;;
4087 *)
4088 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4089for as_dir in notfound
4090do
4091 IFS=$as_save_IFS
4092 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004093 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004094 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004095 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004096 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004097 break 2
4098 fi
4099done
Matthias Kloseb9621712010-04-24 17:59:49 +00004100 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004101IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004102
4103 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4104 ;;
4105esac
4106fi
4107CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004108if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4110$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004111else
Matthias Kloseb9621712010-04-24 17:59:49 +00004112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4113$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004114fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004115
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004116 ;;
4117 cc) # Extract the first word of "c++", so it can be a program name with args.
4118set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4120$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02004121if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004123else
4124 case $CXX in
4125 [\\/]* | ?:[\\/]*)
4126 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4127 ;;
4128 *)
4129 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4130for as_dir in notfound
4131do
4132 IFS=$as_save_IFS
4133 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004134 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004135 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004136 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004137 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004138 break 2
4139 fi
4140done
Matthias Kloseb9621712010-04-24 17:59:49 +00004141 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004142IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004143
4144 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4145 ;;
4146esac
4147fi
4148CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004149if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4151$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004152else
Matthias Kloseb9621712010-04-24 17:59:49 +00004153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4154$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004156
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004157 ;;
4158 esac
4159 if test "$CXX" = "notfound"
4160 then
4161 CXX=""
4162 fi
4163fi
4164if test -z "$CXX"
4165then
4166 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4167do
4168 # Extract the first word of "$ac_prog", so it can be a program name with args.
4169set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4171$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02004172if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004173 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004174else
4175 if test -n "$CXX"; then
4176 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4177else
4178as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4179for as_dir in $PATH
4180do
4181 IFS=$as_save_IFS
4182 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004183 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004184 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004185 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004186 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004187 break 2
4188 fi
4189done
Matthias Kloseb9621712010-04-24 17:59:49 +00004190 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004191IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004192
4193fi
4194fi
4195CXX=$ac_cv_prog_CXX
4196if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4198$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004199else
Matthias Kloseb9621712010-04-24 17:59:49 +00004200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4201$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004202fi
4203
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004204
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004205 test -n "$CXX" && break
4206done
4207test -n "$CXX" || CXX="notfound"
4208
4209 if test "$CXX" = "notfound"
4210 then
4211 CXX=""
4212 fi
4213fi
4214if test "$preset_cxx" != "$CXX"
4215then
Matthias Kloseb9621712010-04-24 17:59:49 +00004216 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004217
4218 By default, distutils will build C++ extension modules with \"$CXX\".
4219 If this is not intended, then set CXX on the configure command line.
4220 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004221$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004222
4223 By default, distutils will build C++ extension modules with \"$CXX\".
4224 If this is not intended, then set CXX on the configure command line.
4225 " >&2;}
4226fi
4227
4228
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4230$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4231save_LDFLAGS="$LDFLAGS"
4232LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004233
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4235/* end confdefs.h. */
4236
4237int
4238main ()
4239{
4240
4241 ;
4242 return 0;
4243}
4244_ACEOF
4245if ac_fn_c_try_link "$LINENO"; then :
4246 NO_AS_NEEDED="-Wl,--no-as-needed"
4247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4248$as_echo "yes" >&6; }
4249else
4250 NO_AS_NEEDED=""
4251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4252$as_echo "no" >&6; }
4253fi
4254rm -f core conftest.err conftest.$ac_objext \
4255 conftest$ac_exeext conftest.$ac_ext
4256LDFLAGS="$save_LDFLAGS"
4257
4258
4259
4260# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004261ac_ext=c
4262ac_cpp='$CPP $CPPFLAGS'
4263ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4264ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4265ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4267$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004268# On Suns, sometimes $CPP names a directory.
4269if test -n "$CPP" && test -d "$CPP"; then
4270 CPP=
4271fi
4272if test -z "$CPP"; then
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02004273 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004274 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004275else
Martin v. Löwis11437992002-04-12 09:54:03 +00004276 # Double quotes because CPP needs to be expanded
4277 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4278 do
4279 ac_preproc_ok=false
4280for ac_c_preproc_warn_flag in '' yes
4281do
4282 # Use a header file that comes with gcc, so configuring glibc
4283 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004284 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4285 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004286 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004287 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004289/* end confdefs.h. */
4290#ifdef __STDC__
4291# include <limits.h>
4292#else
4293# include <assert.h>
4294#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004295 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004297if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004298
Matthias Kloseb9621712010-04-24 17:59:49 +00004299else
Martin v. Löwis11437992002-04-12 09:54:03 +00004300 # Broken: fails on valid input.
4301continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004302fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004303rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004304
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004305 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004306 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004308/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004309#include <ac_nonexistent.h>
4310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004311if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004312 # Broken: success on invalid input.
4313continue
4314else
Martin v. Löwis11437992002-04-12 09:54:03 +00004315 # Passes both tests.
4316ac_preproc_ok=:
4317break
4318fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004319rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004320
4321done
4322# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004323rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004324if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004325 break
4326fi
4327
4328 done
4329 ac_cv_prog_CPP=$CPP
4330
4331fi
4332 CPP=$ac_cv_prog_CPP
4333else
4334 ac_cv_prog_CPP=$CPP
4335fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4337$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004338ac_preproc_ok=false
4339for ac_c_preproc_warn_flag in '' yes
4340do
4341 # Use a header file that comes with gcc, so configuring glibc
4342 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004343 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4344 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004345 # On the NeXT, cc -E runs the code through the compiler's parser,
4346 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004348/* end confdefs.h. */
4349#ifdef __STDC__
4350# include <limits.h>
4351#else
4352# include <assert.h>
4353#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004354 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004356if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004357
Matthias Kloseb9621712010-04-24 17:59:49 +00004358else
Martin v. Löwis11437992002-04-12 09:54:03 +00004359 # Broken: fails on valid input.
4360continue
4361fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004362rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004363
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004364 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004365 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004367/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004368#include <ac_nonexistent.h>
4369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004370if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004371 # Broken: success on invalid input.
4372continue
4373else
Martin v. Löwis11437992002-04-12 09:54:03 +00004374 # Passes both tests.
4375ac_preproc_ok=:
4376break
4377fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004378rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004379
4380done
4381# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004382rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004383if $ac_preproc_ok; then :
4384
Martin v. Löwis11437992002-04-12 09:54:03 +00004385else
Matthias Kloseb9621712010-04-24 17:59:49 +00004386 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4387$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004388as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02004389See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004390fi
4391
4392ac_ext=c
4393ac_cpp='$CPP $CPPFLAGS'
4394ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4395ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4396ac_compiler_gnu=$ac_cv_c_compiler_gnu
4397
4398
Matthias Kloseb9621712010-04-24 17:59:49 +00004399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4400$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02004401if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004402 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004403else
Matthias Kloseb9621712010-04-24 17:59:49 +00004404 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004405 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004406 # Loop through the user's path and test for each of PROGNAME-LIST
4407 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004408for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4409do
4410 IFS=$as_save_IFS
4411 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004412 for ac_prog in grep ggrep; do
4413 for ac_exec_ext in '' $ac_executable_extensions; do
4414 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4415 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4416# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004417 # Check for GNU $ac_path_GREP
4418case `"$ac_path_GREP" --version 2>&1` in
4419*GNU*)
4420 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4421*)
4422 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004423 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004424 while :
4425 do
4426 cat "conftest.in" "conftest.in" >"conftest.tmp"
4427 mv "conftest.tmp" "conftest.in"
4428 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004429 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004430 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4431 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004432 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004433 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4434 # Best one so far, save it but keep looking for a better one
4435 ac_cv_path_GREP="$ac_path_GREP"
4436 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004437 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004438 # 10*(2^10) chars as input seems more than enough
4439 test $ac_count -gt 10 && break
4440 done
4441 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4442esac
4443
Matthias Kloseb9621712010-04-24 17:59:49 +00004444 $ac_path_GREP_found && break 3
4445 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004446 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004447 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004448IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004449 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004450 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004451 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004452else
4453 ac_cv_path_GREP=$GREP
4454fi
4455
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004456fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4458$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004459 GREP="$ac_cv_path_GREP"
4460
4461
Matthias Kloseb9621712010-04-24 17:59:49 +00004462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4463$as_echo_n "checking for egrep... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02004464if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004465 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004466else
4467 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4468 then ac_cv_path_EGREP="$GREP -E"
4469 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004470 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004471 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004472 # Loop through the user's path and test for each of PROGNAME-LIST
4473 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004474for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4475do
4476 IFS=$as_save_IFS
4477 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004478 for ac_prog in egrep; do
4479 for ac_exec_ext in '' $ac_executable_extensions; do
4480 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4481 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4482# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004483 # Check for GNU $ac_path_EGREP
4484case `"$ac_path_EGREP" --version 2>&1` in
4485*GNU*)
4486 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4487*)
4488 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004489 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004490 while :
4491 do
4492 cat "conftest.in" "conftest.in" >"conftest.tmp"
4493 mv "conftest.tmp" "conftest.in"
4494 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004495 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004496 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4497 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004498 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004499 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4500 # Best one so far, save it but keep looking for a better one
4501 ac_cv_path_EGREP="$ac_path_EGREP"
4502 ac_path_EGREP_max=$ac_count
4503 fi
4504 # 10*(2^10) chars as input seems more than enough
4505 test $ac_count -gt 10 && break
4506 done
4507 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4508esac
4509
Matthias Kloseb9621712010-04-24 17:59:49 +00004510 $ac_path_EGREP_found && break 3
4511 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004512 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004513 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004514IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004515 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004516 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004517 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004518else
4519 ac_cv_path_EGREP=$EGREP
4520fi
4521
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004522 fi
4523fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4525$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004526 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004527
4528
Matthias Kloseb9621712010-04-24 17:59:49 +00004529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4530$as_echo_n "checking for ANSI C header files... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02004531if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004532 $as_echo_n "(cached) " >&6
4533else
4534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004535/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004536#include <stdlib.h>
4537#include <stdarg.h>
4538#include <string.h>
4539#include <float.h>
4540
4541int
4542main ()
4543{
4544
4545 ;
4546 return 0;
4547}
4548_ACEOF
4549if ac_fn_c_try_compile "$LINENO"; then :
4550 ac_cv_header_stdc=yes
4551else
4552 ac_cv_header_stdc=no
4553fi
4554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4555
4556if test $ac_cv_header_stdc = yes; then
4557 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4559/* end confdefs.h. */
4560#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004561
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004562_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004563if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004564 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004565
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004566else
Matthias Kloseb9621712010-04-24 17:59:49 +00004567 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004568fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004569rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004570
Matthias Kloseb9621712010-04-24 17:59:49 +00004571fi
4572
4573if test $ac_cv_header_stdc = yes; then
4574 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4576/* end confdefs.h. */
4577#include <stdlib.h>
4578
4579_ACEOF
4580if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4581 $EGREP "free" >/dev/null 2>&1; then :
4582
4583else
4584 ac_cv_header_stdc=no
4585fi
4586rm -f conftest*
4587
4588fi
4589
4590if test $ac_cv_header_stdc = yes; then
4591 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4592 if test "$cross_compiling" = yes; then :
4593 :
4594else
4595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4596/* end confdefs.h. */
4597#include <ctype.h>
4598#include <stdlib.h>
4599#if ((' ' & 0x0FF) == 0x020)
4600# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4601# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4602#else
4603# define ISLOWER(c) \
4604 (('a' <= (c) && (c) <= 'i') \
4605 || ('j' <= (c) && (c) <= 'r') \
4606 || ('s' <= (c) && (c) <= 'z'))
4607# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4608#endif
4609
4610#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4611int
4612main ()
4613{
4614 int i;
4615 for (i = 0; i < 256; i++)
4616 if (XOR (islower (i), ISLOWER (i))
4617 || toupper (i) != TOUPPER (i))
4618 return 2;
4619 return 0;
4620}
4621_ACEOF
4622if ac_fn_c_try_run "$LINENO"; then :
4623
4624else
4625 ac_cv_header_stdc=no
4626fi
4627rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4628 conftest.$ac_objext conftest.beam conftest.$ac_ext
4629fi
4630
4631fi
4632fi
4633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4634$as_echo "$ac_cv_header_stdc" >&6; }
4635if test $ac_cv_header_stdc = yes; then
4636
4637$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4638
4639fi
4640
4641# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4642for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4643 inttypes.h stdint.h unistd.h
4644do :
4645 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4646ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4647"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004648if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004649 cat >>confdefs.h <<_ACEOF
4650#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4651_ACEOF
4652
4653fi
4654
4655done
4656
4657
4658
4659 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02004660if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004661 MINIX=yes
4662else
4663 MINIX=
4664fi
4665
4666
4667 if test "$MINIX" = yes; then
4668
4669$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4670
4671
4672$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4673
4674
4675$as_echo "#define _MINIX 1" >>confdefs.h
4676
4677 fi
4678
4679
4680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4681$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02004682if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004683 $as_echo_n "(cached) " >&6
4684else
4685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4686/* end confdefs.h. */
4687
4688# define __EXTENSIONS__ 1
4689 $ac_includes_default
4690int
4691main ()
4692{
4693
4694 ;
4695 return 0;
4696}
4697_ACEOF
4698if ac_fn_c_try_compile "$LINENO"; then :
4699 ac_cv_safe_to_define___extensions__=yes
4700else
4701 ac_cv_safe_to_define___extensions__=no
4702fi
4703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4704fi
4705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4706$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4707 test $ac_cv_safe_to_define___extensions__ = yes &&
4708 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4709
4710 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4711
4712 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4713
4714 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4715
4716 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4717
4718
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004719
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004720# Check for unsupported systems
4721case $ac_sys_system/$ac_sys_release in
4722atheos*|Linux*/1*)
4723 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4724 echo See README for details.
4725 exit 1;;
4726esac
4727
4728
Matthias Kloseb9621712010-04-24 17:59:49 +00004729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4730$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004731
4732# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004733if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004734 withval=$with_suffix;
4735 case $withval in
4736 no) EXEEXT=;;
4737 yes) EXEEXT=.exe;;
4738 *) EXEEXT=$withval;;
4739 esac
4740fi
4741
Matthias Kloseb9621712010-04-24 17:59:49 +00004742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4743$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004744
4745# Test whether we're running on a non-case-sensitive system, in which
4746# case we give a warning if no ext is given
4747
Matthias Kloseb9621712010-04-24 17:59:49 +00004748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4749$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004750if test ! -d CaseSensitiveTestDir; then
4751mkdir CaseSensitiveTestDir
4752fi
4753
4754if test -d casesensitivetestdir
4755then
Matthias Kloseb9621712010-04-24 17:59:49 +00004756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4757$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004758 BUILDEXEEXT=.exe
4759else
Matthias Kloseb9621712010-04-24 17:59:49 +00004760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4761$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004762 BUILDEXEEXT=$EXEEXT
4763fi
4764rmdir CaseSensitiveTestDir
4765
4766case $MACHDEP in
4767bsdos*)
4768 case $CC in
4769 gcc) CC="$CC -D_HAVE_BSDI";;
4770 esac;;
4771esac
4772
4773case $ac_sys_system in
4774hp*|HP*)
4775 case $CC in
4776 cc|*/cc) CC="$CC -Ae";;
4777 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004778esac
4779
4780
4781
Matthias Kloseb9621712010-04-24 17:59:49 +00004782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4783$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004784if test -z "$LIBRARY"
4785then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004786 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4789$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004790
4791# LDLIBRARY is the name of the library to link against (as opposed to the
4792# name of the library into which to insert object files). BLDLIBRARY is also
4793# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4794# is blank as the main program is not linked directly against LDLIBRARY.
4795# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4796# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4797# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4798# DLLLIBRARY is the shared (i.e., DLL) library.
4799#
4800# RUNSHARED is used to run shared python without installed libraries
4801#
4802# INSTSONAME is the name of the shared library that will be use to install
4803# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004804#
4805# LDVERSION is the shared library version number, normally the Python version
4806# with the ABI build flags appended.
4807
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004808
4809
4810
4811
4812
4813
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004814
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004815LDLIBRARY="$LIBRARY"
4816BLDLIBRARY='$(LDLIBRARY)'
4817INSTSONAME='$(LDLIBRARY)'
4818DLLLIBRARY=''
4819LDLIBRARYDIR=''
4820RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004821LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004822
4823# LINKCC is the command that links the python executable -- default is $(CC).
4824# If CXX is set, and if it is needed to link a main function that was
4825# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4826# python might then depend on the C++ runtime
4827# This is altered for AIX in order to build the export list before
4828# linking.
4829
Matthias Kloseb9621712010-04-24 17:59:49 +00004830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4831$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004832if test -z "$LINKCC"
4833then
4834 LINKCC='$(PURIFY) $(MAINCC)'
4835 case $ac_sys_system in
4836 AIX*)
4837 exp_extra="\"\""
4838 if test $ac_sys_release -ge 5 -o \
4839 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4840 exp_extra="."
4841 fi
4842 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004843 QNX*)
4844 # qcc must be used because the other compilers do not
4845 # support -N.
4846 LINKCC=qcc;;
4847 esac
4848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4850$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004851
4852# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4853# make sure we default having it set to "no": this is used by
4854# distutils.unixccompiler to know if it should add --enable-new-dtags
4855# to linker command lines, and failing to detect GNU ld simply results
4856# in the same bahaviour as before.
4857
Matthias Kloseb9621712010-04-24 17:59:49 +00004858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4859$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004860ac_prog=ld
4861if test "$GCC" = yes; then
4862 ac_prog=`$CC -print-prog-name=ld`
4863fi
4864case `"$ac_prog" -V 2>&1 < /dev/null` in
4865 *GNU*)
4866 GNULD=yes;;
4867 *)
4868 GNULD=no;;
4869esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4871$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004872
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4874$as_echo_n "checking for inline... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02004875if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004876 $as_echo_n "(cached) " >&6
4877else
4878 ac_cv_c_inline=no
4879for ac_kw in inline __inline__ __inline; do
4880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4881/* end confdefs.h. */
4882#ifndef __cplusplus
4883typedef int foo_t;
4884static $ac_kw foo_t static_foo () {return 0; }
4885$ac_kw foo_t foo () {return 0; }
4886#endif
4887
4888_ACEOF
4889if ac_fn_c_try_compile "$LINENO"; then :
4890 ac_cv_c_inline=$ac_kw
4891fi
4892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4893 test "$ac_cv_c_inline" != no && break
4894done
4895
4896fi
4897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4898$as_echo "$ac_cv_c_inline" >&6; }
4899
4900case $ac_cv_c_inline in
4901 inline | yes) ;;
4902 *)
4903 case $ac_cv_c_inline in
4904 no) ac_val=;;
4905 *) ac_val=$ac_cv_c_inline;;
4906 esac
4907 cat >>confdefs.h <<_ACEOF
4908#ifndef __cplusplus
4909#define inline $ac_val
4910#endif
4911_ACEOF
4912 ;;
4913esac
4914
4915if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004916
4917$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004918
4919
4920fi
4921
4922
Matthias Kloseb9621712010-04-24 17:59:49 +00004923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4924$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004925# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004926if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004927 enableval=$enable_shared;
4928fi
4929
4930
4931if test -z "$enable_shared"
4932then
4933 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004934 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004935 enable_shared="yes";;
4936 *)
4937 enable_shared="no";;
4938 esac
4939fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4941$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004942
Matthias Kloseb9621712010-04-24 17:59:49 +00004943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4944$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004945# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004946if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004947 enableval=$enable_profiling; ac_save_cc="$CC"
4948 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004949 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004950 ac_enable_profiling="no"
4951else
Matthias Kloseb9621712010-04-24 17:59:49 +00004952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004953/* end confdefs.h. */
4954int main() { return 0; }
4955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004956if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004957 ac_enable_profiling="yes"
4958else
Matthias Kloseb9621712010-04-24 17:59:49 +00004959 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4962 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004963fi
4964
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004965 CC="$ac_save_cc"
4966fi
4967
Matthias Kloseb9621712010-04-24 17:59:49 +00004968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4969$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004970
4971case "$ac_enable_profiling" in
4972 "yes")
4973 BASECFLAGS="-pg $BASECFLAGS"
4974 LDFLAGS="-pg $LDFLAGS"
4975 ;;
4976esac
4977
Matthias Kloseb9621712010-04-24 17:59:49 +00004978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4979$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004980
4981# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4982# library that we build, but we do not want to link against it (we
4983# will find it with a -framework option). For this reason there is an
4984# extra variable BLDLIBRARY against which Python and the extension
4985# modules are linked, BLDLIBRARY. This is normally the same as
4986# LDLIBRARY, but empty for MacOSX framework builds.
4987if test "$enable_framework"
4988then
4989 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4990 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4991 BLDLIBRARY=''
4992else
4993 BLDLIBRARY='$(LDLIBRARY)'
4994fi
4995
4996# Other platforms follow
4997if test $enable_shared = "yes"; then
4998
Matthias Kloseb9621712010-04-24 17:59:49 +00004999$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005000
5001 case $ac_sys_system in
5002 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005003 LDLIBRARY='libpython$(LDVERSION).dll.a'
5004 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005005 ;;
5006 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005007 LDLIBRARY='libpython$(LDVERSION).so'
5008 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005009 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5010 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005011 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005012 then
5013 PY3LIBRARY=libpython3.so
5014 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005015 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005016 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005017 LDLIBRARY='libpython$(LDVERSION).so'
5018 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005019 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5020 case $ac_sys_system in
5021 FreeBSD*)
5022 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5023 ;;
5024 esac
5025 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005026 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005027 then
5028 PY3LIBRARY=libpython3.so
5029 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005030 ;;
5031 hp*|HP*)
5032 case `uname -m` in
5033 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005034 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005035 ;;
5036 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005037 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005038 ;;
5039 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005040 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005041 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5042 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005043 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005044 LDLIBRARY='libpython$(LDVERSION).dylib'
5045 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005046 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5047 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005048 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005049 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005050 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5051 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005052
5053 esac
5054else # shared is disabled
5055 case $ac_sys_system in
5056 CYGWIN*)
5057 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005058 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005059 ;;
5060 esac
5061fi
5062
Matthias Kloseb9621712010-04-24 17:59:49 +00005063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5064$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005065
5066if test -n "$ac_tool_prefix"; then
5067 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5068set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5070$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02005071if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005072 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005073else
5074 if test -n "$RANLIB"; then
5075 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5076else
5077as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5078for as_dir in $PATH
5079do
5080 IFS=$as_save_IFS
5081 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005082 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005083 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5084 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005085 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005086 break 2
5087 fi
5088done
Matthias Kloseb9621712010-04-24 17:59:49 +00005089 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005090IFS=$as_save_IFS
5091
5092fi
5093fi
5094RANLIB=$ac_cv_prog_RANLIB
5095if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5097$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005098else
Matthias Kloseb9621712010-04-24 17:59:49 +00005099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5100$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005101fi
5102
5103
5104fi
5105if test -z "$ac_cv_prog_RANLIB"; then
5106 ac_ct_RANLIB=$RANLIB
5107 # Extract the first word of "ranlib", so it can be a program name with args.
5108set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5110$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02005111if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005112 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005113else
5114 if test -n "$ac_ct_RANLIB"; then
5115 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5116else
5117as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5118for as_dir in $PATH
5119do
5120 IFS=$as_save_IFS
5121 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005122 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005123 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5124 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005125 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005126 break 2
5127 fi
5128done
Matthias Kloseb9621712010-04-24 17:59:49 +00005129 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005130IFS=$as_save_IFS
5131
5132fi
5133fi
5134ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5135if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5137$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005138else
Matthias Kloseb9621712010-04-24 17:59:49 +00005139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5140$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005141fi
5142
5143 if test "x$ac_ct_RANLIB" = x; then
5144 RANLIB=":"
5145 else
5146 case $cross_compiling:$ac_tool_warned in
5147yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005148{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5149$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005150ac_tool_warned=yes ;;
5151esac
5152 RANLIB=$ac_ct_RANLIB
5153 fi
5154else
5155 RANLIB="$ac_cv_prog_RANLIB"
5156fi
5157
5158
5159for ac_prog in ar aal
5160do
5161 # Extract the first word of "$ac_prog", so it can be a program name with args.
5162set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5164$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02005165if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005166 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005167else
5168 if test -n "$AR"; then
5169 ac_cv_prog_AR="$AR" # Let the user override the test.
5170else
5171as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5172for as_dir in $PATH
5173do
5174 IFS=$as_save_IFS
5175 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005176 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005177 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5178 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005179 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005180 break 2
5181 fi
5182done
Matthias Kloseb9621712010-04-24 17:59:49 +00005183 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005184IFS=$as_save_IFS
5185
5186fi
5187fi
5188AR=$ac_cv_prog_AR
5189if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5191$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005192else
Matthias Kloseb9621712010-04-24 17:59:49 +00005193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5194$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005195fi
5196
5197
5198 test -n "$AR" && break
5199done
5200test -n "$AR" || AR="ar"
5201
5202
5203# tweak ARFLAGS only if the user didn't set it on the command line
5204
5205if test -z "$ARFLAGS"
5206then
5207 ARFLAGS="rc"
5208fi
5209
5210
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005211DISABLE_ASDLGEN=""
5212# Extract the first word of "python", so it can be a program name with args.
5213set dummy python; ac_word=$2
5214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5215$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02005216if ${ac_cv_prog_HAS_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005217 $as_echo_n "(cached) " >&6
5218else
5219 if test -n "$HAS_PYTHON"; then
5220 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5221else
5222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5223for as_dir in $PATH
5224do
5225 IFS=$as_save_IFS
5226 test -z "$as_dir" && as_dir=.
5227 for ac_exec_ext in '' $ac_executable_extensions; do
5228 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5229 ac_cv_prog_HAS_PYTHON="found"
5230 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5231 break 2
5232 fi
5233done
5234 done
5235IFS=$as_save_IFS
5236
5237 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5238fi
5239fi
5240HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5241if test -n "$HAS_PYTHON"; then
5242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5243$as_echo "$HAS_PYTHON" >&6; }
5244else
5245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5246$as_echo "no" >&6; }
5247fi
5248
5249
5250if test $HAS_HG != found -o $HAS_PYTHON != found
5251then
5252 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5253fi
5254
5255
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005256case $MACHDEP in
5257bsdos*|hp*|HP*)
5258 # install -d does not work on BSDI or HP-UX
5259 if test -z "$INSTALL"
5260 then
5261 INSTALL="${srcdir}/install-sh -c"
5262 fi
5263esac
5264ac_aux_dir=
5265for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005266 if test -f "$ac_dir/install-sh"; then
5267 ac_aux_dir=$ac_dir
5268 ac_install_sh="$ac_aux_dir/install-sh -c"
5269 break
5270 elif test -f "$ac_dir/install.sh"; then
5271 ac_aux_dir=$ac_dir
5272 ac_install_sh="$ac_aux_dir/install.sh -c"
5273 break
5274 elif test -f "$ac_dir/shtool"; then
5275 ac_aux_dir=$ac_dir
5276 ac_install_sh="$ac_aux_dir/shtool install -c"
5277 break
5278 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005279done
5280if test -z "$ac_aux_dir"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005281 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005282fi
5283
5284# These three variables are undocumented and unsupported,
5285# and are intended to be withdrawn in a future Autoconf release.
5286# They can cause serious problems if a builder's source tree is in a directory
5287# whose full name contains unusual characters.
5288ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5289ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5290ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5291
5292
5293# Find a good install program. We prefer a C program (faster),
5294# so one script is as good as another. But avoid the broken or
5295# incompatible versions:
5296# SysV /etc/install, /usr/sbin/install
5297# SunOS /usr/etc/install
5298# IRIX /sbin/install
5299# AIX /bin/install
5300# AmigaOS /C/install, which installs bootblocks on floppy discs
5301# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5302# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5303# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5304# OS/2's system install, which has a completely different semantic
5305# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005306# Reject install programs that cannot install multiple files.
5307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5308$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005309if test -z "$INSTALL"; then
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02005310if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005311 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005312else
5313 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5314for as_dir in $PATH
5315do
5316 IFS=$as_save_IFS
5317 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005318 # Account for people who put trailing slashes in PATH elements.
5319case $as_dir/ in #((
5320 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005321 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005322 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005323 /usr/ucb/* ) ;;
5324 *)
5325 # OSF1 and SCO ODT 3.0 have their own names for install.
5326 # Don't use installbsd from OSF since it installs stuff as root
5327 # by default.
5328 for ac_prog in ginstall scoinst install; do
5329 for ac_exec_ext in '' $ac_executable_extensions; do
5330 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5331 if test $ac_prog = install &&
5332 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5333 # AIX install. It has an incompatible calling convention.
5334 :
5335 elif test $ac_prog = install &&
5336 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5337 # program-specific install script used by HP pwplus--don't use.
5338 :
5339 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005340 rm -rf conftest.one conftest.two conftest.dir
5341 echo one > conftest.one
5342 echo two > conftest.two
5343 mkdir conftest.dir
5344 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5345 test -s conftest.one && test -s conftest.two &&
5346 test -s conftest.dir/conftest.one &&
5347 test -s conftest.dir/conftest.two
5348 then
5349 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5350 break 3
5351 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005352 fi
5353 fi
5354 done
5355 done
5356 ;;
5357esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005358
5359 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005360IFS=$as_save_IFS
5361
Matthias Kloseb9621712010-04-24 17:59:49 +00005362rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005363
5364fi
5365 if test "${ac_cv_path_install+set}" = set; then
5366 INSTALL=$ac_cv_path_install
5367 else
5368 # As a last resort, use the slow shell script. Don't cache a
5369 # value for INSTALL within a source directory, because that will
5370 # break other packages using the cache if that directory is
5371 # removed, or if the value is a relative name.
5372 INSTALL=$ac_install_sh
5373 fi
5374fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5376$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005377
5378# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5379# It thinks the first close brace ends the variable substitution.
5380test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5381
5382test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5383
5384test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5385
5386
5387# Not every filesystem supports hard links
5388
5389if test -z "$LN" ; then
5390 case $ac_sys_system in
5391 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005392 *) LN=ln;;
5393 esac
5394fi
5395
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005396# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005397
5398ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005399
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005400# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5402$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005403
5404# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005405if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005406 withval=$with_pydebug;
5407if test "$withval" != no
5408then
5409
Matthias Kloseb9621712010-04-24 17:59:49 +00005410$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005411
Matthias Kloseb9621712010-04-24 17:59:49 +00005412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5413$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005414 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005415 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005416else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5417$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005418fi
5419else
Matthias Kloseb9621712010-04-24 17:59:49 +00005420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5421$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005422fi
5423
5424
5425# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5426# merged with this chunk of code?
5427
5428# Optimizer/debugger flags
5429# ------------------------
5430# (The following bit of code is complicated enough - please keep things
5431# indented properly. Just pretend you're editing Python code. ;-)
5432
5433# There are two parallel sets of case statements below, one that checks to
5434# see if OPT was set and one that does BASECFLAGS setting based upon
5435# compiler and platform. BASECFLAGS tweaks need to be made even if the
5436# user set OPT.
5437
5438# tweak OPT based on compiler and platform, only if the user didn't set
5439# it on the command line
5440
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005441if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005442then
5443 case $GCC in
5444 yes)
5445 if test "$CC" != 'g++' ; then
5446 STRICT_PROTO="-Wstrict-prototypes"
5447 fi
5448 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5449 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5450 WRAP="-fwrapv"
5451 fi
5452 case $ac_cv_prog_cc_g in
5453 yes)
5454 if test "$Py_DEBUG" = 'true' ; then
5455 # Optimization messes up debuggers, so turn it off for
5456 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005457 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005458 else
5459 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5460 fi
5461 ;;
5462 *)
5463 OPT="-O3 -Wall $STRICT_PROTO"
5464 ;;
5465 esac
5466 case $ac_sys_system in
5467 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5468 ;;
5469 esac
5470 ;;
5471
5472 *)
5473 OPT="-O"
5474 ;;
5475 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005476fi
5477
5478
5479
5480# The -arch flags for universal builds on OSX
5481UNIVERSAL_ARCH_FLAGS=
5482
5483
5484# tweak BASECFLAGS based on compiler and platform
5485case $GCC in
5486yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005487 # Python doesn't violate C99 aliasing rules, but older versions of
5488 # GCC produce warnings for legal Python code. Enable
5489 # -fno-strict-aliasing on versions of GCC that support but produce
5490 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5492$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005493 ac_save_cc="$CC"
5494 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005495 save_CFLAGS="$CFLAGS"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02005496 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005497 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005498else
Matthias Kloseb9621712010-04-24 17:59:49 +00005499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005500/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005501
Matthias Kloseb159a552010-04-25 21:00:44 +00005502
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005503int
5504main ()
5505{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005506
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005507 ;
5508 return 0;
5509}
Matthias Kloseb159a552010-04-25 21:00:44 +00005510
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005512if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005513
5514 CC="$ac_save_cc -fstrict-aliasing"
5515 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005517/* end confdefs.h. */
5518
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005519 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005520int
5521main ()
5522{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005523double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005524 ;
5525 return 0;
5526}
Matthias Kloseb159a552010-04-25 21:00:44 +00005527
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005529if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005530
5531 ac_cv_no_strict_aliasing=no
5532
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005533else
Matthias Kloseb159a552010-04-25 21:00:44 +00005534
5535 ac_cv_no_strict_aliasing=yes
5536
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005537fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005539
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005540else
Matthias Kloseb159a552010-04-25 21:00:44 +00005541
5542 ac_cv_no_strict_aliasing=no
5543
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005544fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005546fi
5547
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005548 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005549 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5551$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005552 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005553 then
5554 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5555 fi
5556
5557 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5558 # support. Without this, treatment of subnormals doesn't follow
5559 # the standard.
5560 case $ac_sys_machine in
5561 alpha*)
5562 BASECFLAGS="$BASECFLAGS -mieee"
5563 ;;
5564 esac
5565
5566 case $ac_sys_system in
5567 SCO_SV*)
5568 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5569 ;;
5570 # is there any other compiler on Darwin besides gcc?
5571 Darwin*)
5572 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5573 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005574 if test "${CC}" = gcc
5575 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5577$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005578 case "${UNIVERSALSDK}" in
5579 */MacOSX10.4u.sdk)
5580 # Build using 10.4 SDK, force usage of gcc when the
5581 # compiler is gcc, otherwise the user will get very
5582 # confusing error messages when building on OSX 10.6
5583 CC=gcc-4.0
5584 CPP=cpp-4.0
5585 ;;
5586 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5588$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005589 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005590
5591
5592 if test "${enable_universalsdk}"; then
5593 UNIVERSAL_ARCH_FLAGS=""
5594 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5595 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5596 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005597 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005598 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5599 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005600 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005601 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005602
5603 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5604 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005605 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005606 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005607
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005608 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5609 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005610 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005611 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005612
5613 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5614 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005615 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005616 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005617
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005618 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005619 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005620
5621 fi
5622
5623
Ronald Oussoren666028b2010-04-18 19:07:43 +00005624 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5625 if test "${UNIVERSALSDK}" != "/"
5626 then
5627 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5628 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005629 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005630 fi
5631 fi
5632
5633 # Calculate the right deployment target for this build.
5634 #
5635 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5636 if test ${cur_target} '>' 10.2; then
5637 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005638 if test ${enable_universalsdk}; then
5639 if test "${UNIVERSAL_ARCHS}" = "all"; then
5640 # Ensure that the default platform for a
5641 # 4-way universal build is OSX 10.5,
5642 # that's the first OS release where
5643 # 4-way builds make sense.
5644 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005645
5646 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5647 cur_target='10.5'
5648
5649 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5650 cur_target='10.5'
5651
5652 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5653 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005654 fi
5655 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005656 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005657 # On Intel macs default to a deployment
5658 # target of 10.4, that's the first OSX
5659 # release with Intel support.
5660 cur_target="10.4"
5661 fi
5662 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005663 fi
5664 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5665
5666 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5667 # environment with a value that is the same as what we'll use
5668 # in the Makefile to ensure that we'll get the same compiler
5669 # environment during configure and build time.
5670 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5671 export MACOSX_DEPLOYMENT_TARGET
5672 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5673
5674 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675 esac
5676 ;;
5677
5678*)
5679 case $ac_sys_system in
5680 OpenUNIX*|UnixWare*)
5681 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5682 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683 SCO_SV*)
5684 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5685 ;;
5686 esac
5687 ;;
5688esac
5689
5690if test "$Py_DEBUG" = 'true'; then
5691 :
5692else
5693 OPT="-DNDEBUG $OPT"
5694fi
5695
5696if test "$ac_arch_flags"
5697then
5698 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5699fi
5700
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701# Check whether GCC supports PyArg_ParseTuple format
5702if test "$GCC" = "yes"
5703then
Matthias Kloseb9621712010-04-24 17:59:49 +00005704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5705$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706 save_CFLAGS=$CFLAGS
5707 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005709/* end confdefs.h. */
5710
5711 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712int
5713main ()
5714{
5715
5716 ;
5717 return 0;
5718}
Matthias Kloseb159a552010-04-25 21:00:44 +00005719
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005721if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005722
Matthias Kloseb159a552010-04-25 21:00:44 +00005723
Matthias Kloseb9621712010-04-24 17:59:49 +00005724$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725
Matthias Kloseb159a552010-04-25 21:00:44 +00005726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005727$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005728
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729else
Matthias Kloseb159a552010-04-25 21:00:44 +00005730
5731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005732$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733
5734fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5736 CFLAGS=$save_CFLAGS
5737fi
5738
5739# On some compilers, pthreads are available without further options
5740# (e.g. MacOS X). On some of these systems, the compiler will not
5741# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5742# So we have to see first whether pthreads are available without
5743# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5745$as_echo_n "checking whether pthreads are available without options... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02005746if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005747 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005748else
Matthias Kloseb9621712010-04-24 17:59:49 +00005749 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005750 ac_cv_pthread_is_default=no
5751else
Matthias Kloseb9621712010-04-24 17:59:49 +00005752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005753/* end confdefs.h. */
5754
5755#include <pthread.h>
5756
5757void* routine(void* p){return NULL;}
5758
5759int main(){
5760 pthread_t p;
5761 if(pthread_create(&p,NULL,routine,NULL)!=0)
5762 return 1;
5763 (void)pthread_detach(p);
5764 return 0;
5765}
5766
5767_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005768if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769
5770 ac_cv_pthread_is_default=yes
5771 ac_cv_kthread=no
5772 ac_cv_pthread=no
5773
5774else
Matthias Kloseb9621712010-04-24 17:59:49 +00005775 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5778 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005779fi
5780
5781
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782fi
5783
Matthias Kloseb9621712010-04-24 17:59:49 +00005784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5785$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005786
5787
5788if test $ac_cv_pthread_is_default = yes
5789then
5790 ac_cv_kpthread=no
5791else
5792# -Kpthread, if available, provides the right #defines
5793# and linker options to make pthread_create available
5794# Some compilers won't report that they do not support -Kpthread,
5795# so we need to run a program to see whether it really made the
5796# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5798$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02005799if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005800 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801else
5802 ac_save_cc="$CC"
5803CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005804if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005805 ac_cv_kpthread=no
5806else
Matthias Kloseb9621712010-04-24 17:59:49 +00005807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005808/* end confdefs.h. */
5809
5810#include <pthread.h>
5811
5812void* routine(void* p){return NULL;}
5813
5814int main(){
5815 pthread_t p;
5816 if(pthread_create(&p,NULL,routine,NULL)!=0)
5817 return 1;
5818 (void)pthread_detach(p);
5819 return 0;
5820}
5821
5822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005823if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005824 ac_cv_kpthread=yes
5825else
Matthias Kloseb9621712010-04-24 17:59:49 +00005826 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005828rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5829 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005830fi
5831
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005832CC="$ac_save_cc"
5833fi
5834
Matthias Kloseb9621712010-04-24 17:59:49 +00005835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5836$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837fi
5838
5839if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5840then
5841# -Kthread, if available, provides the right #defines
5842# and linker options to make pthread_create available
5843# Some compilers won't report that they do not support -Kthread,
5844# so we need to run a program to see whether it really made the
5845# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5847$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02005848if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005849 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850else
5851 ac_save_cc="$CC"
5852CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005853if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854 ac_cv_kthread=no
5855else
Matthias Kloseb9621712010-04-24 17:59:49 +00005856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005857/* end confdefs.h. */
5858
5859#include <pthread.h>
5860
5861void* routine(void* p){return NULL;}
5862
5863int main(){
5864 pthread_t p;
5865 if(pthread_create(&p,NULL,routine,NULL)!=0)
5866 return 1;
5867 (void)pthread_detach(p);
5868 return 0;
5869}
5870
5871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005872if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873 ac_cv_kthread=yes
5874else
Matthias Kloseb9621712010-04-24 17:59:49 +00005875 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005877rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5878 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879fi
5880
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881CC="$ac_save_cc"
5882fi
5883
Matthias Kloseb9621712010-04-24 17:59:49 +00005884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5885$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886fi
5887
5888if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5889then
5890# -pthread, if available, provides the right #defines
5891# and linker options to make pthread_create available
5892# Some compilers won't report that they do not support -pthread,
5893# so we need to run a program to see whether it really made the
5894# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5896$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02005897if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005898 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899else
5900 ac_save_cc="$CC"
5901CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005902if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903 ac_cv_pthread=no
5904else
Matthias Kloseb9621712010-04-24 17:59:49 +00005905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906/* end confdefs.h. */
5907
5908#include <pthread.h>
5909
5910void* routine(void* p){return NULL;}
5911
5912int main(){
5913 pthread_t p;
5914 if(pthread_create(&p,NULL,routine,NULL)!=0)
5915 return 1;
5916 (void)pthread_detach(p);
5917 return 0;
5918}
5919
5920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005921if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922 ac_cv_pthread=yes
5923else
Matthias Kloseb9621712010-04-24 17:59:49 +00005924 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005926rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5927 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928fi
5929
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005930CC="$ac_save_cc"
5931fi
5932
Matthias Kloseb9621712010-04-24 17:59:49 +00005933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5934$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935fi
5936
5937# If we have set a CC compiler flag for thread support then
5938# check if it works for CXX, too.
5939ac_cv_cxx_thread=no
5940if test ! -z "$CXX"
5941then
Matthias Kloseb9621712010-04-24 17:59:49 +00005942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5943$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944ac_save_cxx="$CXX"
5945
5946if test "$ac_cv_kpthread" = "yes"
5947then
5948 CXX="$CXX -Kpthread"
5949 ac_cv_cxx_thread=yes
5950elif test "$ac_cv_kthread" = "yes"
5951then
5952 CXX="$CXX -Kthread"
5953 ac_cv_cxx_thread=yes
5954elif test "$ac_cv_pthread" = "yes"
5955then
5956 CXX="$CXX -pthread"
5957 ac_cv_cxx_thread=yes
5958fi
5959
5960if test $ac_cv_cxx_thread = yes
5961then
5962 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5963 $CXX -c conftest.$ac_ext 2>&5
5964 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5965 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5966 then
5967 ac_cv_cxx_thread=yes
5968 else
5969 ac_cv_cxx_thread=no
5970 fi
5971 rm -fr conftest*
5972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5974$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975fi
5976CXX="$ac_save_cxx"
5977
5978
5979# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5981$as_echo_n "checking for ANSI C header files... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02005982if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005983 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984else
Matthias Kloseb9621712010-04-24 17:59:49 +00005985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005986/* end confdefs.h. */
5987#include <stdlib.h>
5988#include <stdarg.h>
5989#include <string.h>
5990#include <float.h>
5991
5992int
5993main ()
5994{
5995
5996 ;
5997 return 0;
5998}
5999_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006000if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006001 ac_cv_header_stdc=yes
6002else
Matthias Kloseb9621712010-04-24 17:59:49 +00006003 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006004fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6006
6007if test $ac_cv_header_stdc = yes; then
6008 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006010/* end confdefs.h. */
6011#include <string.h>
6012
6013_ACEOF
6014if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006015 $EGREP "memchr" >/dev/null 2>&1; then :
6016
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006017else
6018 ac_cv_header_stdc=no
6019fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006020rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006021
6022fi
6023
6024if test $ac_cv_header_stdc = yes; then
6025 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006027/* end confdefs.h. */
6028#include <stdlib.h>
6029
6030_ACEOF
6031if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006032 $EGREP "free" >/dev/null 2>&1; then :
6033
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006034else
6035 ac_cv_header_stdc=no
6036fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006037rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006038
6039fi
6040
6041if test $ac_cv_header_stdc = yes; then
6042 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006043 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006044 :
6045else
Matthias Kloseb9621712010-04-24 17:59:49 +00006046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006047/* end confdefs.h. */
6048#include <ctype.h>
6049#include <stdlib.h>
6050#if ((' ' & 0x0FF) == 0x020)
6051# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6052# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6053#else
6054# define ISLOWER(c) \
6055 (('a' <= (c) && (c) <= 'i') \
6056 || ('j' <= (c) && (c) <= 'r') \
6057 || ('s' <= (c) && (c) <= 'z'))
6058# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6059#endif
6060
6061#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6062int
6063main ()
6064{
6065 int i;
6066 for (i = 0; i < 256; i++)
6067 if (XOR (islower (i), ISLOWER (i))
6068 || toupper (i) != TOUPPER (i))
6069 return 2;
6070 return 0;
6071}
6072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006073if ac_fn_c_try_run "$LINENO"; then :
6074
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006075else
Matthias Kloseb9621712010-04-24 17:59:49 +00006076 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006077fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006078rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6079 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006080fi
6081
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006082fi
6083fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6085$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006086if test $ac_cv_header_stdc = yes; then
6087
Matthias Kloseb9621712010-04-24 17:59:49 +00006088$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006089
6090fi
6091
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006092for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6093fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006094ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006095sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006096unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006097sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6098sys/lock.h sys/mkdev.h sys/modem.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006099sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
6100sys/stat.h sys/termio.h sys/time.h \
6101sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006102libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006103bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006104do :
6105 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6106ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006107if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006108 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006109#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006110_ACEOF
6111
6112fi
6113
Guido van Rossum627b2d71993-12-24 10:39:16 +00006114done
6115
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006116ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006117for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006118 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6120$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006121if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006122 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006123else
Matthias Kloseb9621712010-04-24 17:59:49 +00006124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006125/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006126#include <sys/types.h>
6127#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006128
Martin v. Löwis11437992002-04-12 09:54:03 +00006129int
6130main ()
6131{
6132if ((DIR *) 0)
6133return 0;
6134 ;
6135 return 0;
6136}
6137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006138if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006139 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006140else
Matthias Kloseb9621712010-04-24 17:59:49 +00006141 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006142fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006145eval ac_res=\$$as_ac_Header
6146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6147$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006148if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006149 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006150#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006151_ACEOF
6152
6153ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006154fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006155
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006156done
6157# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6158if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6160$as_echo_n "checking for library containing opendir... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006161if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006162 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006163else
Martin v. Löwis11437992002-04-12 09:54:03 +00006164 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006166/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006167
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006168/* Override any GCC internal prototype to avoid an error.
6169 Use char because int might match the return type of a GCC
6170 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006171#ifdef __cplusplus
6172extern "C"
6173#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006174char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006175int
6176main ()
6177{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006178return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006179 ;
6180 return 0;
6181}
6182_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006183for ac_lib in '' dir; do
6184 if test -z "$ac_lib"; then
6185 ac_res="none required"
6186 else
6187 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006188 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006189 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006190 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006191 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006192fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006193rm -f core conftest.err conftest.$ac_objext \
6194 conftest$ac_exeext
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006195 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006196 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006197fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006198done
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006199if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006200
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006201else
6202 ac_cv_search_opendir=no
6203fi
6204rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006205LIBS=$ac_func_search_save_LIBS
6206fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6208$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006209ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006210if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006211 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006212
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006213fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006214
Michael W. Hudson54241132001-12-07 15:38:26 +00006215else
Matthias Kloseb9621712010-04-24 17:59:49 +00006216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6217$as_echo_n "checking for library containing opendir... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006218if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006219 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006220else
6221 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006223/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006224
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006225/* Override any GCC internal prototype to avoid an error.
6226 Use char because int might match the return type of a GCC
6227 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006228#ifdef __cplusplus
6229extern "C"
6230#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006231char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006232int
6233main ()
6234{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006235return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006236 ;
6237 return 0;
6238}
6239_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006240for ac_lib in '' x; do
6241 if test -z "$ac_lib"; then
6242 ac_res="none required"
6243 else
6244 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006245 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006246 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006247 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006248 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006249fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006250rm -f core conftest.err conftest.$ac_objext \
6251 conftest$ac_exeext
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006252 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006253 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006254fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006255done
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006256if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006257
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006258else
6259 ac_cv_search_opendir=no
6260fi
6261rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006262LIBS=$ac_func_search_save_LIBS
6263fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6265$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006266ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006267if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006268 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006269
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006270fi
6271
6272fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006273
Matthias Kloseb9621712010-04-24 17:59:49 +00006274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6275$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006276if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006277 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006278else
Matthias Kloseb9621712010-04-24 17:59:49 +00006279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006280/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006281#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006282int
6283main ()
6284{
6285return makedev(0, 0);
6286 ;
6287 return 0;
6288}
6289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006290if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006291 ac_cv_header_sys_types_h_makedev=yes
6292else
Matthias Kloseb9621712010-04-24 17:59:49 +00006293 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006294fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006295rm -f core conftest.err conftest.$ac_objext \
6296 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006297
6298fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6300$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006301
6302if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006303ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006304if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006305
Matthias Kloseb9621712010-04-24 17:59:49 +00006306$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006307
6308fi
6309
6310
6311
6312 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006313 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006314if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006315
Matthias Kloseb9621712010-04-24 17:59:49 +00006316$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006317
6318fi
6319
6320
6321 fi
6322fi
6323
Michael W. Hudson54241132001-12-07 15:38:26 +00006324
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006325# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
6326for ac_header in net/if.h
6327do :
6328 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
6329#ifdef STDC_HEADERS
6330# include <stdlib.h>
6331# include <stddef.h>
6332#else
6333# ifdef HAVE_STDLIB_H
6334# include <stdlib.h>
6335# endif
6336#endif
6337#ifdef HAVE_SYS_SOCKET_H
6338# include <sys/socket.h>
6339#endif
6340
6341"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006342if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006343 cat >>confdefs.h <<_ACEOF
6344#define HAVE_NET_IF_H 1
6345_ACEOF
6346
6347fi
6348
6349done
6350
6351
6352
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006353# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006354for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006355do :
6356 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006357#ifdef HAVE_CURSES_H
6358#include <curses.h>
6359#endif
6360
Matthias Kloseb9621712010-04-24 17:59:49 +00006361"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006362if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006363 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006364#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006365_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006366
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006367fi
6368
6369done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006370
6371
Martin v. Löwis11017b12006-01-14 18:12:57 +00006372# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006373for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006374do :
6375 ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" "
Martin v. Löwis11017b12006-01-14 18:12:57 +00006376#ifdef HAVE_ASM_TYPES_H
6377#include <asm/types.h>
6378#endif
6379#ifdef HAVE_SYS_SOCKET_H
6380#include <sys/socket.h>
6381#endif
6382
Matthias Kloseb9621712010-04-24 17:59:49 +00006383"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006384if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006385 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006386#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006387_ACEOF
6388
6389fi
6390
6391done
6392
6393
Guido van Rossum627b2d71993-12-24 10:39:16 +00006394# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006395was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6397$as_echo_n "checking for clock_t in time.h... " >&6; }
6398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006399/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006400#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006401
6402_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006403if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006404 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006405 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006406else
Martin v. Löwis11437992002-04-12 09:54:03 +00006407
6408
Matthias Kloseb9621712010-04-24 17:59:49 +00006409$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006410
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006411
Guido van Rossum627b2d71993-12-24 10:39:16 +00006412fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006413rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006414
Matthias Kloseb9621712010-04-24 17:59:49 +00006415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6416$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006417
Matthias Kloseb9621712010-04-24 17:59:49 +00006418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6419$as_echo_n "checking for makedev... " >&6; }
6420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006421/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006422
Jesus Cea740f53a2010-04-28 11:35:30 +00006423#if defined(MAJOR_IN_MKDEV)
6424#include <sys/mkdev.h>
6425#elif defined(MAJOR_IN_SYSMACROS)
6426#include <sys/sysmacros.h>
6427#else
6428#include <sys/types.h>
6429#endif
6430
Neal Norwitz11690112002-07-30 01:08:28 +00006431int
6432main ()
6433{
Jesus Cea740f53a2010-04-28 11:35:30 +00006434
6435 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006436 ;
6437 return 0;
6438}
Matthias Kloseb159a552010-04-25 21:00:44 +00006439
Neal Norwitz11690112002-07-30 01:08:28 +00006440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006441if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006442 ac_cv_has_makedev=yes
6443else
Matthias Kloseb9621712010-04-24 17:59:49 +00006444 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006445fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006446rm -f core conftest.err conftest.$ac_objext \
6447 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6449$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006450if test "$ac_cv_has_makedev" = "yes"; then
6451
Matthias Kloseb9621712010-04-24 17:59:49 +00006452$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006453
6454fi
6455
Martin v. Löwis399a6892002-10-04 10:22:02 +00006456# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6457# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6458# defined, but the compiler does not support pragma redefine_extname,
6459# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6460# structures (such as rlimit64) without declaring them. As a
6461# work-around, disable LFS on such configurations
6462
6463use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6465$as_echo_n "checking Solaris LFS bug... " >&6; }
6466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006467/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006468
6469#define _LARGEFILE_SOURCE 1
6470#define _FILE_OFFSET_BITS 64
6471#include <sys/resource.h>
6472
Martin v. Löwis399a6892002-10-04 10:22:02 +00006473int
6474main ()
6475{
6476struct rlimit foo;
6477 ;
6478 return 0;
6479}
6480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006481if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006482 sol_lfs_bug=no
6483else
Matthias Kloseb9621712010-04-24 17:59:49 +00006484 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006485fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6488$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006489if test "$sol_lfs_bug" = "yes"; then
6490 use_lfs=no
6491fi
6492
6493if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006494# Two defines needed to enable largefile support on various platforms
6495# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006496case $ac_sys_system/$ac_sys_release in
6497AIX*)
6498
6499$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6500
6501 ;;
6502esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006503
Matthias Kloseb9621712010-04-24 17:59:49 +00006504$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006505
6506
Matthias Kloseb9621712010-04-24 17:59:49 +00006507$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006508
Martin v. Löwis399a6892002-10-04 10:22:02 +00006509fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006510
Guido van Rossum84e7b241996-08-19 21:59:00 +00006511# Add some code to confdefs.h so that the test for off_t works on SCO
6512cat >> confdefs.h <<\EOF
6513#if defined(SCO_DS)
6514#undef _OFF_T
6515#endif
6516EOF
6517
Guido van Rossumef2255b2000-03-10 22:30:29 +00006518# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006519ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006520if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006521
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006522else
Martin v. Löwis11437992002-04-12 09:54:03 +00006523
6524cat >>confdefs.h <<_ACEOF
6525#define mode_t int
6526_ACEOF
6527
6528fi
6529
Matthias Kloseb9621712010-04-24 17:59:49 +00006530ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006531if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006532
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006533else
Martin v. Löwis11437992002-04-12 09:54:03 +00006534
6535cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006536#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006537_ACEOF
6538
6539fi
6540
Matthias Kloseb9621712010-04-24 17:59:49 +00006541ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006542if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006543
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006544else
Martin v. Löwis11437992002-04-12 09:54:03 +00006545
6546cat >>confdefs.h <<_ACEOF
6547#define pid_t int
6548_ACEOF
6549
6550fi
6551
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006552
Martin v. Löwis11437992002-04-12 09:54:03 +00006553cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006554#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006555_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006556
Matthias Kloseb9621712010-04-24 17:59:49 +00006557ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006558if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006559
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006560else
Martin v. Löwis11437992002-04-12 09:54:03 +00006561
6562cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006563#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006564_ACEOF
6565
6566fi
6567
Matthias Kloseb9621712010-04-24 17:59:49 +00006568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6569$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006570if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006571 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006572else
Matthias Kloseb9621712010-04-24 17:59:49 +00006573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006574/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006575#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006576
6577_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006578if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006579 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006580 ac_cv_type_uid_t=yes
6581else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006582 ac_cv_type_uid_t=no
6583fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006584rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006585
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006586fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6588$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006589if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006590
Matthias Kloseb9621712010-04-24 17:59:49 +00006591$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006592
6593
Matthias Kloseb9621712010-04-24 17:59:49 +00006594$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006595
6596fi
6597
Matthias Kloseb9621712010-04-24 17:59:49 +00006598ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6599case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006600 no|yes) ;; #(
6601 *)
6602
Matthias Kloseb9621712010-04-24 17:59:49 +00006603$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006604
6605
6606cat >>confdefs.h <<_ACEOF
6607#define uint32_t $ac_cv_c_uint32_t
6608_ACEOF
6609;;
6610 esac
6611
Matthias Kloseb9621712010-04-24 17:59:49 +00006612ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6613case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006614 no|yes) ;; #(
6615 *)
6616
Matthias Kloseb9621712010-04-24 17:59:49 +00006617$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006618
6619
6620cat >>confdefs.h <<_ACEOF
6621#define uint64_t $ac_cv_c_uint64_t
6622_ACEOF
6623;;
6624 esac
6625
Matthias Kloseb9621712010-04-24 17:59:49 +00006626ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6627case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006628 no|yes) ;; #(
6629 *)
6630
6631cat >>confdefs.h <<_ACEOF
6632#define int32_t $ac_cv_c_int32_t
6633_ACEOF
6634;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006635esac
6636
Matthias Kloseb9621712010-04-24 17:59:49 +00006637ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6638case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006639 no|yes) ;; #(
6640 *)
6641
6642cat >>confdefs.h <<_ACEOF
6643#define int64_t $ac_cv_c_int64_t
6644_ACEOF
6645;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006646esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006647
Matthias Kloseb9621712010-04-24 17:59:49 +00006648ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006649if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006650
Matthias Kloseb9621712010-04-24 17:59:49 +00006651$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006652
6653fi
6654
Jack Jansendd19cf82001-12-06 22:36:17 +00006655
Michael W. Hudson54241132001-12-07 15:38:26 +00006656# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006657# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006658# The cast to long int works around a bug in the HP C Compiler
6659# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6660# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6661# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6663$as_echo_n "checking size of int... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006664if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006665 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006666else
Matthias Kloseb9621712010-04-24 17:59:49 +00006667 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006668
Martin v. Löwis11437992002-04-12 09:54:03 +00006669else
Matthias Kloseb9621712010-04-24 17:59:49 +00006670 if test "$ac_cv_type_int" = yes; then
6671 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6672$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006673as_fn_error 77 "cannot compute sizeof (int)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006674See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006675 else
6676 ac_cv_sizeof_int=0
6677 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006679
Martin v. Löwis11437992002-04-12 09:54:03 +00006680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6682$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006683
6684
6685
Martin v. Löwis11437992002-04-12 09:54:03 +00006686cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006687#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006688_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006689
6690
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006691# The cast to long int works around a bug in the HP C Compiler
6692# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6693# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6694# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6696$as_echo_n "checking size of long... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006697if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006698 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006699else
Matthias Kloseb9621712010-04-24 17:59:49 +00006700 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006701
Martin v. Löwis11437992002-04-12 09:54:03 +00006702else
Matthias Kloseb9621712010-04-24 17:59:49 +00006703 if test "$ac_cv_type_long" = yes; then
6704 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6705$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006706as_fn_error 77 "cannot compute sizeof (long)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006707See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006708 else
6709 ac_cv_sizeof_long=0
6710 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006711fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006712
Martin v. Löwis11437992002-04-12 09:54:03 +00006713fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6715$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006716
6717
6718
Martin v. Löwis11437992002-04-12 09:54:03 +00006719cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006720#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006721_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006722
6723
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006724# The cast to long int works around a bug in the HP C Compiler
6725# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6726# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6727# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6729$as_echo_n "checking size of void *... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006730if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006731 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006732else
Matthias Kloseb9621712010-04-24 17:59:49 +00006733 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006734
Martin v. Löwis11437992002-04-12 09:54:03 +00006735else
Matthias Kloseb9621712010-04-24 17:59:49 +00006736 if test "$ac_cv_type_void_p" = yes; then
6737 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6738$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006739as_fn_error 77 "cannot compute sizeof (void *)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006740See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006741 else
6742 ac_cv_sizeof_void_p=0
6743 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006744fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006745
Martin v. Löwis11437992002-04-12 09:54:03 +00006746fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6748$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006749
6750
6751
Martin v. Löwis11437992002-04-12 09:54:03 +00006752cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006753#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006754_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006755
6756
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006757# The cast to long int works around a bug in the HP C Compiler
6758# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6759# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6760# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6762$as_echo_n "checking size of short... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006763if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006764 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006765else
Matthias Kloseb9621712010-04-24 17:59:49 +00006766 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006767
Martin v. Löwis11437992002-04-12 09:54:03 +00006768else
Matthias Kloseb9621712010-04-24 17:59:49 +00006769 if test "$ac_cv_type_short" = yes; then
6770 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6771$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006772as_fn_error 77 "cannot compute sizeof (short)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006773See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006774 else
6775 ac_cv_sizeof_short=0
6776 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006777fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006778
Martin v. Löwis11437992002-04-12 09:54:03 +00006779fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6781$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006782
6783
6784
Martin v. Löwis11437992002-04-12 09:54:03 +00006785cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006786#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006787_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006788
6789
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006790# The cast to long int works around a bug in the HP C Compiler
6791# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6792# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6793# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6795$as_echo_n "checking size of float... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006796if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006797 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006798else
Matthias Kloseb9621712010-04-24 17:59:49 +00006799 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006800
Martin v. Löwis11437992002-04-12 09:54:03 +00006801else
Matthias Kloseb9621712010-04-24 17:59:49 +00006802 if test "$ac_cv_type_float" = yes; then
6803 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6804$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006805as_fn_error 77 "cannot compute sizeof (float)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006806See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006807 else
6808 ac_cv_sizeof_float=0
6809 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006811
Martin v. Löwis11437992002-04-12 09:54:03 +00006812fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6814$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006815
6816
6817
Martin v. Löwis11437992002-04-12 09:54:03 +00006818cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006819#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006820_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006821
6822
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006823# The cast to long int works around a bug in the HP C Compiler
6824# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6825# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6826# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6828$as_echo_n "checking size of double... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006829if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006830 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006831else
Matthias Kloseb9621712010-04-24 17:59:49 +00006832 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006833
Martin v. Löwis11437992002-04-12 09:54:03 +00006834else
Matthias Kloseb9621712010-04-24 17:59:49 +00006835 if test "$ac_cv_type_double" = yes; then
6836 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6837$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006838as_fn_error 77 "cannot compute sizeof (double)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006839See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006840 else
6841 ac_cv_sizeof_double=0
6842 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006843fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006844
Martin v. Löwis11437992002-04-12 09:54:03 +00006845fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6847$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006848
6849
6850
Martin v. Löwis11437992002-04-12 09:54:03 +00006851cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006852#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006853_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006854
6855
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006856# The cast to long int works around a bug in the HP C Compiler
6857# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6858# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6859# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6861$as_echo_n "checking size of fpos_t... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006862if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006863 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006864else
Matthias Kloseb9621712010-04-24 17:59:49 +00006865 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006866
Martin v. Löwis11437992002-04-12 09:54:03 +00006867else
Matthias Kloseb9621712010-04-24 17:59:49 +00006868 if test "$ac_cv_type_fpos_t" = yes; then
6869 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6870$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006871as_fn_error 77 "cannot compute sizeof (fpos_t)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006872See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006873 else
6874 ac_cv_sizeof_fpos_t=0
6875 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006877
Martin v. Löwis11437992002-04-12 09:54:03 +00006878fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6880$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006881
6882
6883
Martin v. Löwis11437992002-04-12 09:54:03 +00006884cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006885#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006886_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006887
Michael W. Hudson54241132001-12-07 15:38:26 +00006888
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006889# The cast to long int works around a bug in the HP C Compiler
6890# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6891# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6892# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6894$as_echo_n "checking size of size_t... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006895if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006896 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006897else
Matthias Kloseb9621712010-04-24 17:59:49 +00006898 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
Martin v. Löwis18e16552006-02-15 17:27:45 +00006899
Martin v. Löwis18e16552006-02-15 17:27:45 +00006900else
Matthias Kloseb9621712010-04-24 17:59:49 +00006901 if test "$ac_cv_type_size_t" = yes; then
6902 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6903$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006904as_fn_error 77 "cannot compute sizeof (size_t)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006905See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006906 else
6907 ac_cv_sizeof_size_t=0
6908 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006909fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006910
Martin v. Löwis18e16552006-02-15 17:27:45 +00006911fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6913$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006914
6915
6916
Martin v. Löwis18e16552006-02-15 17:27:45 +00006917cat >>confdefs.h <<_ACEOF
6918#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6919_ACEOF
6920
6921
Christian Heimes400adb02008-02-01 08:12:03 +00006922# The cast to long int works around a bug in the HP C Compiler
6923# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6924# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6925# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6927$as_echo_n "checking size of pid_t... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006928if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006929 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006930else
Matthias Kloseb9621712010-04-24 17:59:49 +00006931 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes400adb02008-02-01 08:12:03 +00006932
Christian Heimes400adb02008-02-01 08:12:03 +00006933else
Matthias Kloseb9621712010-04-24 17:59:49 +00006934 if test "$ac_cv_type_pid_t" = yes; then
6935 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6936$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006937as_fn_error 77 "cannot compute sizeof (pid_t)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006938See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00006939 else
6940 ac_cv_sizeof_pid_t=0
6941 fi
6942fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006943
Christian Heimes400adb02008-02-01 08:12:03 +00006944fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6946$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006947
6948
6949
6950cat >>confdefs.h <<_ACEOF
6951#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6952_ACEOF
6953
6954
Michael W. Hudson54241132001-12-07 15:38:26 +00006955
Matthias Kloseb9621712010-04-24 17:59:49 +00006956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6957$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006958have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006960/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006961
Martin v. Löwis11437992002-04-12 09:54:03 +00006962int
6963main ()
6964{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006965long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006966 ;
6967 return 0;
6968}
6969_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006970if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006971
6972
Matthias Kloseb9621712010-04-24 17:59:49 +00006973$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006974
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006975 have_long_long=yes
6976
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006977fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6980$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006981if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006982# The cast to long int works around a bug in the HP C Compiler
6983# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6984# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6985# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6987$as_echo_n "checking size of long long... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006988if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006989 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006990else
Matthias Kloseb9621712010-04-24 17:59:49 +00006991 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006992
Martin v. Löwis11437992002-04-12 09:54:03 +00006993else
Matthias Kloseb9621712010-04-24 17:59:49 +00006994 if test "$ac_cv_type_long_long" = yes; then
6995 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6996$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006997as_fn_error 77 "cannot compute sizeof (long long)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006998See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006999 else
7000 ac_cv_sizeof_long_long=0
7001 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007002fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007003
Martin v. Löwis11437992002-04-12 09:54:03 +00007004fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7006$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007007
7008
7009
Martin v. Löwis11437992002-04-12 09:54:03 +00007010cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007011#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007012_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007013
Michael W. Hudson54241132001-12-07 15:38:26 +00007014
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007015fi
7016
Matthias Kloseb9621712010-04-24 17:59:49 +00007017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7018$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007019have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007021/* end confdefs.h. */
7022
7023int
7024main ()
7025{
7026long double x; x = (long double)0;
7027 ;
7028 return 0;
7029}
7030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007031if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007032
7033
Matthias Kloseb9621712010-04-24 17:59:49 +00007034$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007035
7036 have_long_double=yes
7037
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007038fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7041$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007042if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007043# The cast to long int works around a bug in the HP C Compiler
7044# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7045# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7046# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7048$as_echo_n "checking size of long double... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007049if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007050 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007051else
Matthias Kloseb9621712010-04-24 17:59:49 +00007052 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007053
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007054else
Matthias Kloseb9621712010-04-24 17:59:49 +00007055 if test "$ac_cv_type_long_double" = yes; then
7056 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7057$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007058as_fn_error 77 "cannot compute sizeof (long double)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007059See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007060 else
7061 ac_cv_sizeof_long_double=0
7062 fi
7063fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007064
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007065fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7067$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007068
7069
7070
7071cat >>confdefs.h <<_ACEOF
7072#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7073_ACEOF
7074
7075
7076fi
7077
7078
Matthias Kloseb9621712010-04-24 17:59:49 +00007079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7080$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007081have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007083/* end confdefs.h. */
7084
7085int
7086main ()
7087{
7088_Bool x; x = (_Bool)0;
7089 ;
7090 return 0;
7091}
7092_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007093if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007094
7095
Matthias Kloseb9621712010-04-24 17:59:49 +00007096$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007097
7098 have_c99_bool=yes
7099
Thomas Woutersb2137042007-02-01 18:02:27 +00007100fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7103$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007104if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007105# The cast to long int works around a bug in the HP C Compiler
7106# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7107# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7108# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7110$as_echo_n "checking size of _Bool... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007111if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007112 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007113else
Matthias Kloseb9621712010-04-24 17:59:49 +00007114 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007115
Thomas Woutersb2137042007-02-01 18:02:27 +00007116else
Matthias Kloseb9621712010-04-24 17:59:49 +00007117 if test "$ac_cv_type__Bool" = yes; then
7118 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7119$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007120as_fn_error 77 "cannot compute sizeof (_Bool)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007121See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007122 else
7123 ac_cv_sizeof__Bool=0
7124 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007125fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007126
Thomas Woutersb2137042007-02-01 18:02:27 +00007127fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7129$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007130
7131
7132
Thomas Woutersb2137042007-02-01 18:02:27 +00007133cat >>confdefs.h <<_ACEOF
7134#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7135_ACEOF
7136
7137
7138fi
7139
Matthias Kloseb9621712010-04-24 17:59:49 +00007140ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007141 #include <stdint.h>
7142 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007143 #ifdef HAVE_INTTYPES_H
7144 #include <inttypes.h>
7145 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007146"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007147if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007148
7149cat >>confdefs.h <<_ACEOF
7150#define HAVE_UINTPTR_T 1
7151_ACEOF
7152
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007153# The cast to long int works around a bug in the HP C Compiler
7154# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7155# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7156# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7158$as_echo_n "checking size of uintptr_t... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007159if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007160 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007161else
Matthias Kloseb9621712010-04-24 17:59:49 +00007162 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007163
Martin v. Löwis11437992002-04-12 09:54:03 +00007164else
Matthias Kloseb9621712010-04-24 17:59:49 +00007165 if test "$ac_cv_type_uintptr_t" = yes; then
7166 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7167$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007168as_fn_error 77 "cannot compute sizeof (uintptr_t)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007169See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007170 else
7171 ac_cv_sizeof_uintptr_t=0
7172 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007173fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007174
Martin v. Löwis11437992002-04-12 09:54:03 +00007175fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7177$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007178
7179
7180
Martin v. Löwis11437992002-04-12 09:54:03 +00007181cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007182#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007183_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007184
Michael W. Hudson54241132001-12-07 15:38:26 +00007185
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007186fi
7187
Thomas Wouters89f507f2006-12-13 04:49:30 +00007188
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007189# The cast to long int works around a bug in the HP C Compiler
7190# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7191# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7192# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7194$as_echo_n "checking size of off_t... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007195if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007196 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007197else
Matthias Kloseb9621712010-04-24 17:59:49 +00007198 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007199#ifdef HAVE_SYS_TYPES_H
7200#include <sys/types.h>
7201#endif
7202
Matthias Kloseb9621712010-04-24 17:59:49 +00007203"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007204
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007205else
Matthias Kloseb9621712010-04-24 17:59:49 +00007206 if test "$ac_cv_type_off_t" = yes; then
7207 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7208$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007209as_fn_error 77 "cannot compute sizeof (off_t)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007210See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007211 else
7212 ac_cv_sizeof_off_t=0
7213 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007214fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007215
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007216fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7218$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007219
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007220
7221
Martin v. Löwis11437992002-04-12 09:54:03 +00007222cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007223#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007224_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007225
Michael W. Hudson54241132001-12-07 15:38:26 +00007226
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007227
Matthias Kloseb9621712010-04-24 17:59:49 +00007228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7229$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007230if test "$have_long_long" = yes
7231then
7232if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007233 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007234
Matthias Kloseb9621712010-04-24 17:59:49 +00007235$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007236
Matthias Kloseb9621712010-04-24 17:59:49 +00007237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7238$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007239else
Matthias Kloseb9621712010-04-24 17:59:49 +00007240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7241$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007242fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007243else
Matthias Kloseb9621712010-04-24 17:59:49 +00007244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7245$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007246fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007247
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007248# The cast to long int works around a bug in the HP C Compiler
7249# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7250# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7251# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7253$as_echo_n "checking size of time_t... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007254if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007255 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007256else
Matthias Kloseb9621712010-04-24 17:59:49 +00007257 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007258#ifdef HAVE_SYS_TYPES_H
7259#include <sys/types.h>
7260#endif
7261#ifdef HAVE_TIME_H
7262#include <time.h>
7263#endif
7264
Matthias Kloseb9621712010-04-24 17:59:49 +00007265"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007266
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007267else
Matthias Kloseb9621712010-04-24 17:59:49 +00007268 if test "$ac_cv_type_time_t" = yes; then
7269 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7270$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007271as_fn_error 77 "cannot compute sizeof (time_t)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007272See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007273 else
7274 ac_cv_sizeof_time_t=0
7275 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007276fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007277
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7280$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007281
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007282
7283
Martin v. Löwis11437992002-04-12 09:54:03 +00007284cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007285#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007286_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007287
Michael W. Hudson54241132001-12-07 15:38:26 +00007288
7289
Trent Mick635f6fb2000-08-23 21:33:05 +00007290# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007291ac_save_cc="$CC"
7292if test "$ac_cv_kpthread" = "yes"
7293then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007294elif test "$ac_cv_kthread" = "yes"
7295then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007296elif test "$ac_cv_pthread" = "yes"
7297then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007298fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007299
Matthias Kloseb9621712010-04-24 17:59:49 +00007300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7301$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007302have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007304/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007305
7306 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007307int
7308main ()
7309{
Guido van Rossum12580492000-09-24 16:47:19 +00007310pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007311 ;
7312 return 0;
7313}
Matthias Kloseb159a552010-04-25 21:00:44 +00007314
Martin v. Löwis11437992002-04-12 09:54:03 +00007315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007316if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007317 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7321$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007322if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007323 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007324# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7325# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7326# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7328$as_echo_n "checking size of pthread_t... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007329if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007330 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007331else
Matthias Kloseb9621712010-04-24 17:59:49 +00007332 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007333#ifdef HAVE_PTHREAD_H
7334#include <pthread.h>
7335#endif
7336
Matthias Kloseb9621712010-04-24 17:59:49 +00007337"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007338
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007339else
Matthias Kloseb9621712010-04-24 17:59:49 +00007340 if test "$ac_cv_type_pthread_t" = yes; then
7341 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7342$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007343as_fn_error 77 "cannot compute sizeof (pthread_t)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007344See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007345 else
7346 ac_cv_sizeof_pthread_t=0
7347 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007348fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007349
Trent Mick635f6fb2000-08-23 21:33:05 +00007350fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7352$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007353
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007354
7355
Martin v. Löwis11437992002-04-12 09:54:03 +00007356cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007357#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007358_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007359
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007360
Trent Mick635f6fb2000-08-23 21:33:05 +00007361fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007362CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007363
Michael W. Hudson54241132001-12-07 15:38:26 +00007364
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007365case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007366 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007367 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7368 ;;
7369 Darwin/*)
7370 OTHER_LIBTOOL_OPT=""
7371 ;;
7372esac
7373
7374
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007375ARCH_RUN_32BIT=""
7376
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007377case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007378 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007379 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7380 if test "${enable_universalsdk}"; then
7381 :
7382 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007383 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007384 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007385 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007386 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007387 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007388 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007389 if test ${gcc_version} '<' 4.0
7390 then
7391 LIBTOOL_CRUFT="-lcc_dynamic"
7392 else
7393 LIBTOOL_CRUFT=""
7394 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007395 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007396 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007397else
Matthias Kloseb9621712010-04-24 17:59:49 +00007398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007399/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007400
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007401 #include <unistd.h>
7402 int main(int argc, char*argv[])
7403 {
7404 if (sizeof(long) == 4) {
7405 return 0;
7406 } else {
7407 return 1;
7408 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007409 }
7410
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007412if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007413 ac_osx_32bit=yes
7414else
Matthias Kloseb9621712010-04-24 17:59:49 +00007415 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007416fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007417rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7418 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007419fi
7420
7421
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007422 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007423 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007424 i386)
7425 MACOSX_DEFAULT_ARCH="i386"
7426 ;;
7427 ppc)
7428 MACOSX_DEFAULT_ARCH="ppc"
7429 ;;
7430 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007431 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007432 ;;
7433 esac
7434 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007435 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007436 i386)
7437 MACOSX_DEFAULT_ARCH="x86_64"
7438 ;;
7439 ppc)
7440 MACOSX_DEFAULT_ARCH="ppc64"
7441 ;;
7442 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007443 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007444 ;;
7445 esac
7446
7447 #ARCH_RUN_32BIT="true"
7448 fi
7449
7450 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007451 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007452 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007453esac
7454
Matthias Kloseb9621712010-04-24 17:59:49 +00007455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7456$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007457if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007458then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007459 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007460 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007461 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007462
Matthias Kloseb9621712010-04-24 17:59:49 +00007463$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007464
Matthias Kloseb9621712010-04-24 17:59:49 +00007465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7466$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007467 if test $enable_shared = "yes"
7468 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007469 as_fn_error $? "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" "$LINENO" 5
Ronald Oussoren99aab652009-06-08 21:22:57 +00007470 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007471else
Matthias Kloseb9621712010-04-24 17:59:49 +00007472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7473$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007474fi
7475
Matthias Kloseb9621712010-04-24 17:59:49 +00007476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7477$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007478case $ac_sys_system/$ac_sys_release in
7479 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007480
Matthias Kloseb9621712010-04-24 17:59:49 +00007481$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007482
Matthias Kloseb9621712010-04-24 17:59:49 +00007483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7484$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007485 ;;
7486 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7488$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007489 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007490esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007491
Guido van Rossum0a516c91994-09-12 10:58:40 +00007492# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007493
Michael W. Hudson54241132001-12-07 15:38:26 +00007494
7495
7496
7497
Benjamin Peterson99f03762010-04-11 22:15:28 +00007498
Thomas Wouters477c8d52006-05-27 19:21:47 +00007499
Georg Brandlb1441c72009-01-03 22:33:39 +00007500
Thomas Wouters477c8d52006-05-27 19:21:47 +00007501cat >>confdefs.h <<_ACEOF
7502#define SHLIB_EXT "$SO"
7503_ACEOF
7504
Guido van Rossum0a516c91994-09-12 10:58:40 +00007505# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007506# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007507# (Shared libraries in this instance are shared modules to be loaded into
7508# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7510$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007511if test -z "$LDSHARED"
7512then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007513 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007514 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007515 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007516 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007517 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007518 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007519 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007520 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007521 if test "$GCC" = "yes" ; then
7522 LDSHARED='$(CC) -shared'
7523 LDCXXSHARED='$(CXX) -shared'
7524 else
7525 LDSHARED='$(CC) -G'
7526 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007527 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007528 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007529 if test "$GCC" = "yes" ; then
7530 LDSHARED='$(CC) -shared'
7531 LDCXXSHARED='$(CXX) -shared'
7532 else
7533 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007534 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00007535 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007536 LDSHARED='$(CC) -bundle'
7537 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007538 if test "$enable_framework" ; then
7539 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007540 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7541 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007542 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007543 else
7544 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007545 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007546 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007547 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007548 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007549 LDSHARED='$(CC) -bundle'
7550 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007551 if test "$enable_framework" ; then
7552 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007553 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7554 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007555 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007556 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007557 # No framework, use the Python app as bundle-loader
7558 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007559 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007560 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007561 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007562 Darwin/*)
7563 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7564 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007565
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007566 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007567 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007568 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007569 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007570 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007571 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7572 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007573 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007574 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007575 LDSHARED='$(CC) -bundle'
7576 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007577 if test "$enable_framework" ; then
7578 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007579 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7580 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007581 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007582 else
7583 # No framework, use the Python app as bundle-loader
7584 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7585 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007586 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007587 fi
7588 fi
7589 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007590 Linux*|GNU*|QNX*)
7591 LDSHARED='$(CC) -shared'
7592 LDCXXSHARED='$(CXX) -shared';;
7593 BSD/OS*/4*)
7594 LDSHARED="gcc -shared"
7595 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007596 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007597 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007598 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007599 LDSHARED='$(CC) -shared'
7600 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007601 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007602 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007603 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007604 OpenBSD*)
7605 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7606 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007607 LDSHARED='$(CC) -shared $(CCSHARED)'
7608 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007609 else
7610 case `uname -r` in
7611 [01].* | 2.[0-7] | 2.[0-7].*)
7612 LDSHARED="ld -Bshareable ${LDFLAGS}"
7613 ;;
7614 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007615 LDSHARED='$(CC) -shared $(CCSHARED)'
7616 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007617 ;;
7618 esac
7619 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007620 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007621 LDSHARED='$(CC) -shared'
7622 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007623 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007624 if test "$GCC" = "yes" ; then
7625 LDSHARED='$(CC) -shared'
7626 LDCXXSHARED='$(CXX) -shared'
7627 else
7628 LDSHARED='$(CC) -G'
7629 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007630 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007631 SCO_SV*)
7632 LDSHARED='$(CC) -Wl,-G,-Bexport'
7633 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7634 CYGWIN*)
7635 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7636 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007637 *) LDSHARED="ld";;
7638 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007639fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7641$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007642LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007643BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007644# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007645# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7647$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007648if test -z "$CCSHARED"
7649then
Guido van Rossum07397971997-04-29 21:49:50 +00007650 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007651 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007652 then CCSHARED="-fPIC";
7653 elif test `uname -p` = sparc;
7654 then CCSHARED="-xcode=pic32";
7655 else CCSHARED="-Kpic";
7656 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007657 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007658 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007659 else CCSHARED="+z";
7660 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007661 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007662 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007663 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007664 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007665 if test "$GCC" = "yes"
7666 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007667 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007668 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007669 SCO_SV*)
7670 if test "$GCC" = "yes"
7671 then CCSHARED="-fPIC"
7672 else CCSHARED="-Kpic -belf"
7673 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007674 IRIX*/6*) case $CC in
7675 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007676 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007677 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007678 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7681$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007682# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007683# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7685$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007686if test -z "$LINKFORSHARED"
7687then
Guido van Rossum07397971997-04-29 21:49:50 +00007688 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007689 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007690 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007691 LINKFORSHARED="-Wl,-E -Wl,+s";;
7692# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007693 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007694 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007695 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007696 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007697 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007698 if test "$enable_framework"
7699 then
Jack Jansenda49e192005-01-07 13:08:22 +00007700 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007701 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007702 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007703 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007704 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007705 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007706 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007707 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7708 then
7709 LINKFORSHARED="-Wl,--export-dynamic"
7710 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007711 SunOS/5*) case $CC in
7712 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007713 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007714 then
7715 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007716 fi;;
7717 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007718 CYGWIN*)
7719 if test $enable_shared = "no"
7720 then
7721 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7722 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007723 QNX*)
7724 # -Wl,-E causes the symbols to be added to the dynamic
7725 # symbol table so that they can be found when a module
7726 # is loaded. -N 2048K causes the stack size to be set
7727 # to 2048 kilobytes so that the stack doesn't overflow
7728 # when running test_compile.py.
7729 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007730 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7733$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007734
Michael W. Hudson54241132001-12-07 15:38:26 +00007735
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007736
Matthias Kloseb9621712010-04-24 17:59:49 +00007737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7738$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007739if test ! "$LIBRARY" = "$LDLIBRARY"
7740then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007741 case $ac_sys_system in
7742 CYGWIN*)
7743 # Cygwin needs CCSHARED when building extension DLLs
7744 # but not when building the interpreter DLL.
7745 CFLAGSFORSHARED='';;
7746 *)
7747 CFLAGSFORSHARED='$(CCSHARED)'
7748 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7751$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007752
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007753# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7754# library (with --enable-shared).
7755# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007756# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7757# if it is not required, since it creates a dependency of the shared library
7758# to LIBS. This, in turn, means that applications linking the shared libpython
7759# don't need to link LIBS explicitly. The default should be only changed
7760# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007761
Matthias Kloseb9621712010-04-24 17:59:49 +00007762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7763$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007764case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007765 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007766 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007767esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7769$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007770
7771
Guido van Rossum627b2d71993-12-24 10:39:16 +00007772# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00007773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
7774$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007775if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007776 $as_echo_n "(cached) " >&6
7777else
7778 ac_check_lib_save_LIBS=$LIBS
7779LIBS="-lsendfile $LIBS"
7780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7781/* end confdefs.h. */
7782
7783/* Override any GCC internal prototype to avoid an error.
7784 Use char because int might match the return type of a GCC
7785 builtin and then its argument prototype would still apply. */
7786#ifdef __cplusplus
7787extern "C"
7788#endif
7789char sendfile ();
7790int
7791main ()
7792{
7793return sendfile ();
7794 ;
7795 return 0;
7796}
7797_ACEOF
7798if ac_fn_c_try_link "$LINENO"; then :
7799 ac_cv_lib_sendfile_sendfile=yes
7800else
7801 ac_cv_lib_sendfile_sendfile=no
7802fi
7803rm -f core conftest.err conftest.$ac_objext \
7804 conftest$ac_exeext conftest.$ac_ext
7805LIBS=$ac_check_lib_save_LIBS
7806fi
7807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
7808$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007809if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007810 cat >>confdefs.h <<_ACEOF
7811#define HAVE_LIBSENDFILE 1
7812_ACEOF
7813
7814 LIBS="-lsendfile $LIBS"
7815
7816fi
7817
Matthias Kloseb9621712010-04-24 17:59:49 +00007818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7819$as_echo_n "checking for dlopen in -ldl... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007820if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007821 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007822else
Martin v. Löwis11437992002-04-12 09:54:03 +00007823 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007824LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007826/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007827
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007828/* Override any GCC internal prototype to avoid an error.
7829 Use char because int might match the return type of a GCC
7830 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007831#ifdef __cplusplus
7832extern "C"
7833#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007834char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007835int
7836main ()
7837{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007838return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007839 ;
7840 return 0;
7841}
7842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007843if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007844 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007845else
Matthias Kloseb9621712010-04-24 17:59:49 +00007846 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007848rm -f core conftest.err conftest.$ac_objext \
7849 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007850LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7853$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007854if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007855 cat >>confdefs.h <<_ACEOF
7856#define HAVE_LIBDL 1
7857_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007858
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007859 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007860
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007861fi
7862 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7864$as_echo_n "checking for shl_load in -ldld... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007865if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007866 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007867else
Martin v. Löwis11437992002-04-12 09:54:03 +00007868 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007869LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007871/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007872
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007873/* Override any GCC internal prototype to avoid an error.
7874 Use char because int might match the return type of a GCC
7875 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007876#ifdef __cplusplus
7877extern "C"
7878#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007879char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007880int
7881main ()
7882{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007883return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007884 ;
7885 return 0;
7886}
7887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007888if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007889 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007890else
Matthias Kloseb9621712010-04-24 17:59:49 +00007891 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007892fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007893rm -f core conftest.err conftest.$ac_objext \
7894 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007895LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007896fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7898$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007899if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007900 cat >>confdefs.h <<_ACEOF
7901#define HAVE_LIBDLD 1
7902_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007903
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007904 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007905
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007906fi
7907 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007908
Georg Brandlb1441c72009-01-03 22:33:39 +00007909# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007910if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7912$as_echo_n "checking for library containing sem_init... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007913if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007914 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007915else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007916 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007918/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007919
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007920/* Override any GCC internal prototype to avoid an error.
7921 Use char because int might match the return type of a GCC
7922 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007923#ifdef __cplusplus
7924extern "C"
7925#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007926char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007927int
7928main ()
7929{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007930return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007931 ;
7932 return 0;
7933}
7934_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007935for ac_lib in '' pthread rt posix4; do
7936 if test -z "$ac_lib"; then
7937 ac_res="none required"
7938 else
7939 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007940 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007941 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007942 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007943 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007944fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007945rm -f core conftest.err conftest.$ac_objext \
7946 conftest$ac_exeext
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007947 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007948 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007949fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007950done
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007951if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007952
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007953else
7954 ac_cv_search_sem_init=no
7955fi
7956rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007957LIBS=$ac_func_search_save_LIBS
7958fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7960$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007961ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007962if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007963 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007964
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007965fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007966 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007967 # posix4 on Solaris 2.6
7968 # pthread (first!) on Linux
7969fi
7970
Martin v. Löwis19d17342003-06-14 21:03:05 +00007971# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7973$as_echo_n "checking for textdomain in -lintl... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007974if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007975 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007976else
7977 ac_check_lib_save_LIBS=$LIBS
7978LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007980/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007981
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007982/* Override any GCC internal prototype to avoid an error.
7983 Use char because int might match the return type of a GCC
7984 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007985#ifdef __cplusplus
7986extern "C"
7987#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007988char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007989int
7990main ()
7991{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007992return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007993 ;
7994 return 0;
7995}
7996_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007997if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007998 ac_cv_lib_intl_textdomain=yes
7999else
Matthias Kloseb9621712010-04-24 17:59:49 +00008000 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008002rm -f core conftest.err conftest.$ac_objext \
8003 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008004LIBS=$ac_check_lib_save_LIBS
8005fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8007$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008008if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008009
Matthias Kloseb9621712010-04-24 17:59:49 +00008010$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008011
Brett Cannonc6d936e2009-06-07 20:09:53 +00008012 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008013fi
8014
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008015
8016# checks for system dependent C++ extensions support
8017case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008018 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8019$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008021/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008022
Georg Brandl59e87bd2011-02-15 19:48:59 +00008023 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008024int
8025main ()
8026{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008027loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008028 ;
8029 return 0;
8030}
Matthias Kloseb159a552010-04-25 21:00:44 +00008031
Martin v. Löwis11437992002-04-12 09:54:03 +00008032_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008033if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008034
Matthias Kloseb159a552010-04-25 21:00:44 +00008035
Matthias Kloseb9621712010-04-24 17:59:49 +00008036$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008037
Matthias Kloseb159a552010-04-25 21:00:44 +00008038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008039$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008040
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008041else
Matthias Kloseb159a552010-04-25 21:00:44 +00008042
8043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008044$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008045
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008046fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008047rm -f core conftest.err conftest.$ac_objext \
8048 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008049 *) ;;
8050esac
8051
Guido van Rossum70c7f481998-03-26 18:44:10 +00008052# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8054$as_echo_n "checking for t_open in -lnsl... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008055if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008056 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008057else
Martin v. Löwis11437992002-04-12 09:54:03 +00008058 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008059LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008061/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008062
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008063/* Override any GCC internal prototype to avoid an error.
8064 Use char because int might match the return type of a GCC
8065 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008066#ifdef __cplusplus
8067extern "C"
8068#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008069char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008070int
8071main ()
8072{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008073return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008074 ;
8075 return 0;
8076}
8077_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008078if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008079 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008080else
Matthias Kloseb9621712010-04-24 17:59:49 +00008081 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008082fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008083rm -f core conftest.err conftest.$ac_objext \
8084 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008085LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008086fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8088$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008089if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008090 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008091fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008092 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8094$as_echo_n "checking for socket in -lsocket... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008095if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008096 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008097else
Martin v. Löwis11437992002-04-12 09:54:03 +00008098 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008099LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008101/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008102
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008103/* Override any GCC internal prototype to avoid an error.
8104 Use char because int might match the return type of a GCC
8105 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008106#ifdef __cplusplus
8107extern "C"
8108#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008109char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008110int
8111main ()
8112{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008113return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008114 ;
8115 return 0;
8116}
8117_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008118if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008119 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008120else
Matthias Kloseb9621712010-04-24 17:59:49 +00008121 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008122fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008123rm -f core conftest.err conftest.$ac_objext \
8124 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008125LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008126fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8128$as_echo "$ac_cv_lib_socket_socket" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008129if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008130 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008131fi
8132 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008133
Matthias Kloseb9621712010-04-24 17:59:49 +00008134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8135$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008136
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008137# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008138if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008139 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8141$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008142LIBS="$withval $LIBS"
8143
8144else
Matthias Kloseb9621712010-04-24 17:59:49 +00008145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8146$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008147fi
8148
Guido van Rossum7f43da71994-08-01 12:15:30 +00008149
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008150if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008151 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8152set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8154$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008155if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008156 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008157else
8158 case $PKG_CONFIG in
8159 [\\/]* | ?:[\\/]*)
8160 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8161 ;;
8162 *)
8163 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8164for as_dir in $PATH
8165do
8166 IFS=$as_save_IFS
8167 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008168 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008169 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8170 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008171 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008172 break 2
8173 fi
8174done
Matthias Kloseb9621712010-04-24 17:59:49 +00008175 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008176IFS=$as_save_IFS
8177
8178 ;;
8179esac
8180fi
8181PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8182if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8184$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008185else
Matthias Kloseb9621712010-04-24 17:59:49 +00008186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8187$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008188fi
8189
8190
8191fi
8192if test -z "$ac_cv_path_PKG_CONFIG"; then
8193 ac_pt_PKG_CONFIG=$PKG_CONFIG
8194 # Extract the first word of "pkg-config", so it can be a program name with args.
8195set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8197$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008198if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008199 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008200else
8201 case $ac_pt_PKG_CONFIG in
8202 [\\/]* | ?:[\\/]*)
8203 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8204 ;;
8205 *)
8206 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8207for as_dir in $PATH
8208do
8209 IFS=$as_save_IFS
8210 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008211 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008212 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8213 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008214 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008215 break 2
8216 fi
8217done
Matthias Kloseb9621712010-04-24 17:59:49 +00008218 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008219IFS=$as_save_IFS
8220
8221 ;;
8222esac
8223fi
8224ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8225if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8227$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008228else
Matthias Kloseb9621712010-04-24 17:59:49 +00008229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8230$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008231fi
8232
8233 if test "x$ac_pt_PKG_CONFIG" = x; then
8234 PKG_CONFIG=""
8235 else
8236 case $cross_compiling:$ac_tool_warned in
8237yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008238{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8239$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008240ac_tool_warned=yes ;;
8241esac
8242 PKG_CONFIG=$ac_pt_PKG_CONFIG
8243 fi
8244else
8245 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8246fi
8247
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008248
8249# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8251$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008252
8253# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008254if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008255 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008256else
8257 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008258fi
8259
8260
Matthias Kloseb9621712010-04-24 17:59:49 +00008261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8262$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008263
8264# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8266$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008267
8268# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008269if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008270 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008271else
8272 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008273fi
8274
8275
8276if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008277 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8278else
8279 LIBFFI_INCLUDEDIR=""
8280fi
8281
8282
Matthias Kloseb9621712010-04-24 17:59:49 +00008283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8284$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008285
Benjamin Peterson076ed002010-10-31 17:11:02 +00008286# Check for support for loadable sqlite extensions
8287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8288$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8289# Check whether --enable-loadable-sqlite-extensions was given.
8290if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8291 enableval=$enable_loadable_sqlite_extensions;
8292else
8293 enable_loadable_sqlite_extensions="no"
8294fi
8295
8296
8297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8298$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8299
Matthias Klose55708cc2009-04-30 08:06:49 +00008300# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8302$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008303
8304# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008305if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008306 withval=$with_dbmliborder;
8307if test x$with_dbmliborder = xyes
8308then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008309as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008310else
8311 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8312 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8313 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008314 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008315 fi
8316 done
8317fi
8318fi
8319
Matthias Kloseb9621712010-04-24 17:59:49 +00008320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8321$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008322
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008323# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008324
8325
Matthias Kloseb9621712010-04-24 17:59:49 +00008326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8327$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008328
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008329# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008330if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008331 withval=$with_signal_module;
8332fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008333
8334
8335if test -z "$with_signal_module"
8336then with_signal_module="yes"
8337fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8339$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008340
8341if test "${with_signal_module}" = "yes"; then
8342 USE_SIGNAL_MODULE=""
8343 SIGNAL_OBJS=""
8344else
8345 USE_SIGNAL_MODULE="#"
8346 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8347fi
8348
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008349# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008350
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008351USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008352
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008353
Martin v. Löwis11437992002-04-12 09:54:03 +00008354
8355# Templates for things AC_DEFINEd more than once.
8356# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008357
8358
Martin v. Löwis11437992002-04-12 09:54:03 +00008359
Matthias Kloseb9621712010-04-24 17:59:49 +00008360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8361$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008362
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008363# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008364if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008365 withval=$with_threads;
8366fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008367
8368
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008369# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008370
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008371# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008372if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008373 withval=$with_thread; with_threads=$with_thread
8374fi
8375
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008376
8377if test -z "$with_threads"
8378then with_threads="yes"
8379fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8381$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008382
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008383
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008384if test "$with_threads" = "no"
8385then
8386 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008387elif test "$ac_cv_pthread_is_default" = yes
8388then
Matthias Kloseb9621712010-04-24 17:59:49 +00008389 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008390
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008391 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008392 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008393
8394 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008395 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008396elif test "$ac_cv_kpthread" = "yes"
8397then
8398 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008399 if test "$ac_cv_cxx_thread" = "yes"; then
8400 CXX="$CXX -Kpthread"
8401 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008402 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008403
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008404 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008405 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008406elif test "$ac_cv_kthread" = "yes"
8407then
8408 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008409 if test "$ac_cv_cxx_thread" = "yes"; then
8410 CXX="$CXX -Kthread"
8411 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008412 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008413
8414 posix_threads=yes
8415 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008416elif test "$ac_cv_pthread" = "yes"
8417then
8418 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008419 if test "$ac_cv_cxx_thread" = "yes"; then
8420 CXX="$CXX -pthread"
8421 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008422 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008423
8424 posix_threads=yes
8425 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008426else
8427 if test ! -z "$with_threads" -a -d "$with_threads"
8428 then LDFLAGS="$LDFLAGS -L$with_threads"
8429 fi
8430 if test ! -z "$withval" -a -d "$withval"
8431 then LDFLAGS="$LDFLAGS -L$withval"
8432 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008433
8434 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008435 # define _POSIX_THREADS in unistd.h. Some apparently don't
8436 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8438$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008440/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008441
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008442#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008443#ifdef _POSIX_THREADS
8444yes
8445#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008446
8447_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008448if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008449 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008450 unistd_defines_pthreads=yes
8451else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008452 unistd_defines_pthreads=no
8453fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008454rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008455
Matthias Kloseb9621712010-04-24 17:59:49 +00008456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8457$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008458
Matthias Kloseb9621712010-04-24 17:59:49 +00008459 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008460
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008461 # Just looking for pthread_create in libpthread is not enough:
8462 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8463 # So we really have to include pthread.h, and then link.
8464 _libs=$LIBS
8465 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8467$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008469/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008470#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008471
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008472void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008473int
8474main ()
8475{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008476
8477pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008478 ;
8479 return 0;
8480}
8481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008482if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008483
Matthias Kloseb9621712010-04-24 17:59:49 +00008484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8485$as_echo "yes" >&6; }
8486 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008487
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008488 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008489 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008490else
Martin v. Löwis11437992002-04-12 09:54:03 +00008491
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008492 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008493 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008494if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008495 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008496
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008497 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008498 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008499else
Guido van Rossumad678af1998-10-02 14:42:15 +00008500
Matthias Kloseb9621712010-04-24 17:59:49 +00008501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8502$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008503if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008504 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008505else
Martin v. Löwis11437992002-04-12 09:54:03 +00008506 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008507LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008509/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008510
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008511/* Override any GCC internal prototype to avoid an error.
8512 Use char because int might match the return type of a GCC
8513 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008514#ifdef __cplusplus
8515extern "C"
8516#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008517char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008518int
8519main ()
8520{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008521return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008522 ;
8523 return 0;
8524}
8525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008526if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008527 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008528else
Matthias Kloseb9621712010-04-24 17:59:49 +00008529 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008530fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008531rm -f core conftest.err conftest.$ac_objext \
8532 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008533LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008534fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8536$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008537if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008538 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008539
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008540 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008541 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008542 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008543else
Greg Steinadf63d62000-07-05 10:38:09 +00008544
Matthias Kloseb9621712010-04-24 17:59:49 +00008545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8546$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008547if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008548 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008549else
Martin v. Löwis11437992002-04-12 09:54:03 +00008550 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008551LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008553/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008554
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008555/* Override any GCC internal prototype to avoid an error.
8556 Use char because int might match the return type of a GCC
8557 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008558#ifdef __cplusplus
8559extern "C"
8560#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008561char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008562int
8563main ()
8564{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008565return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008566 ;
8567 return 0;
8568}
8569_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008570if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008571 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008572else
Matthias Kloseb9621712010-04-24 17:59:49 +00008573 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008574fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008575rm -f core conftest.err conftest.$ac_objext \
8576 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008577LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008578fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8580$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008581if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008582 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008583
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008584 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008585 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008586 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008587else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008588
Matthias Kloseb9621712010-04-24 17:59:49 +00008589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8590$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008591if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008592 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008593else
Martin v. Löwis11437992002-04-12 09:54:03 +00008594 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008595LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008597/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008598
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008599/* Override any GCC internal prototype to avoid an error.
8600 Use char because int might match the return type of a GCC
8601 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008602#ifdef __cplusplus
8603extern "C"
8604#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008605char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008606int
8607main ()
8608{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008609return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008610 ;
8611 return 0;
8612}
8613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008614if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008615 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008616else
Matthias Kloseb9621712010-04-24 17:59:49 +00008617 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008618fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008619rm -f core conftest.err conftest.$ac_objext \
8620 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008621LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008622fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8624$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008625if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008626 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008627
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008628 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008629 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008630 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008631else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008632
Matthias Kloseb9621712010-04-24 17:59:49 +00008633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8634$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008635if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008636 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008637else
Martin v. Löwis11437992002-04-12 09:54:03 +00008638 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008639LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008640cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008641/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008642
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008643/* Override any GCC internal prototype to avoid an error.
8644 Use char because int might match the return type of a GCC
8645 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008646#ifdef __cplusplus
8647extern "C"
8648#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008649char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008650int
8651main ()
8652{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008653return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008654 ;
8655 return 0;
8656}
8657_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008658if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008659 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008660else
Matthias Kloseb9621712010-04-24 17:59:49 +00008661 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008662fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008663rm -f core conftest.err conftest.$ac_objext \
8664 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008665LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008666fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8668$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008669if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008670 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008671
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008672 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008673 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008674 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008675else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008676
Martin v. Löwis130fb172001-07-19 11:00:41 +00008677 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008678fi
8679
Guido van Rossum627b2d71993-12-24 10:39:16 +00008680
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008681fi
8682
Guido van Rossum0be3e491997-05-22 20:33:33 +00008683fi
8684
Guido van Rossum49545951997-12-02 19:28:29 +00008685fi
8686
Guido van Rossumb93a8621998-05-07 13:27:32 +00008687fi
8688
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008689fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008690rm -f core conftest.err conftest.$ac_objext \
8691 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008692
Matthias Kloseb9621712010-04-24 17:59:49 +00008693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8694$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008695if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008696 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008697else
Martin v. Löwis11437992002-04-12 09:54:03 +00008698 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008699LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008700cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008701/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008702
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008703/* Override any GCC internal prototype to avoid an error.
8704 Use char because int might match the return type of a GCC
8705 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008706#ifdef __cplusplus
8707extern "C"
8708#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008709char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008710int
8711main ()
8712{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008713return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008714 ;
8715 return 0;
8716}
8717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008718if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008719 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008720else
Matthias Kloseb9621712010-04-24 17:59:49 +00008721 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008722fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008723rm -f core conftest.err conftest.$ac_objext \
8724 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008725LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008726fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8728$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008729if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008730 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008731
Martin v. Löwis130fb172001-07-19 11:00:41 +00008732 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008733 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008734 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008735fi
8736
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008737
Neal Norwitza978ab02002-11-02 16:58:05 +00008738 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8740$as_echo_n "checking for thr_create in -lthread... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008741if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008742 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008743else
Martin v. Löwis11437992002-04-12 09:54:03 +00008744 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008745LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008747/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008748
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008749/* Override any GCC internal prototype to avoid an error.
8750 Use char because int might match the return type of a GCC
8751 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008752#ifdef __cplusplus
8753extern "C"
8754#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008755char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008756int
8757main ()
8758{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008759return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008760 ;
8761 return 0;
8762}
8763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008764if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008765 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008766else
Matthias Kloseb9621712010-04-24 17:59:49 +00008767 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008768fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008769rm -f core conftest.err conftest.$ac_objext \
8770 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008771LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008772fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8774$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008775if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008776 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008777
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008778 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008779 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008780 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008781fi
8782
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008783 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008784fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008785
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008786if test "$posix_threads" = "yes"; then
8787 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008788
Matthias Kloseb9621712010-04-24 17:59:49 +00008789$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008790
8791 fi
8792
8793 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8794 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02008795 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008796$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008797
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008798 ;;
8799 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008800$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008801
8802 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02008803 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00008804$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008805
8806 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008807 esac
8808
Matthias Kloseb9621712010-04-24 17:59:49 +00008809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8810$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008811 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008812 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008813else
Matthias Kloseb9621712010-04-24 17:59:49 +00008814 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008815 ac_cv_pthread_system_supported=no
8816else
Matthias Kloseb9621712010-04-24 17:59:49 +00008817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008818/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008819#include <pthread.h>
8820 void *foo(void *parm) {
8821 return NULL;
8822 }
8823 main() {
8824 pthread_attr_t attr;
8825 pthread_t id;
8826 if (pthread_attr_init(&attr)) exit(-1);
8827 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8828 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8829 exit(0);
8830 }
8831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008832if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008833 ac_cv_pthread_system_supported=yes
8834else
Matthias Kloseb9621712010-04-24 17:59:49 +00008835 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008836fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008837rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8838 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008839fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008840
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008841
Guido van Rossum627b2d71993-12-24 10:39:16 +00008842fi
8843
Matthias Kloseb9621712010-04-24 17:59:49 +00008844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8845$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008846 if test "$ac_cv_pthread_system_supported" = "yes"; then
8847
Matthias Kloseb9621712010-04-24 17:59:49 +00008848$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008849
8850 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008851 for ac_func in pthread_sigmask
8852do :
8853 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008854if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008855 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008856#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008857_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008858 case $ac_sys_system in
8859 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008860
Matthias Kloseb9621712010-04-24 17:59:49 +00008861$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008862
8863 ;;
8864 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008865fi
8866done
8867
8868fi
8869
8870
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008871# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008872
Matthias Kloseb9621712010-04-24 17:59:49 +00008873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8874$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008875# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008876if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008877 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008878 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8880$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008881 ipv6=no
8882 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008883 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8884$as_echo "yes" >&6; }
8885 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008886
8887 ipv6=yes
8888 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008889 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008890else
Martin v. Löwis11437992002-04-12 09:54:03 +00008891
Matthias Kloseb9621712010-04-24 17:59:49 +00008892 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008893
Matthias Kloseb9621712010-04-24 17:59:49 +00008894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8895$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008896 ipv6=no
8897
8898else
Matthias Kloseb9621712010-04-24 17:59:49 +00008899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008900/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008901 /* AF_INET6 available check */
8902#include <sys/types.h>
8903#include <sys/socket.h>
8904main()
8905{
8906 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8907 exit(1);
8908 else
8909 exit(0);
8910}
8911
Martin v. Löwis11437992002-04-12 09:54:03 +00008912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008913if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008914
Matthias Kloseb9621712010-04-24 17:59:49 +00008915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8916$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008917 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008918
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008919else
Matthias Kloseb159a552010-04-25 21:00:44 +00008920
Matthias Kloseb9621712010-04-24 17:59:49 +00008921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8922$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008923 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008924
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008925fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008926rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8927 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008928fi
8929
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008930
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008931if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8933$as_echo_n "checking if RFC2553 API is available... " >&6; }
8934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008935/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008936
8937 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008938#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008939int
8940main ()
8941{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008942struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008943 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008944 ;
8945 return 0;
8946}
Matthias Kloseb159a552010-04-25 21:00:44 +00008947
Martin v. Löwis11437992002-04-12 09:54:03 +00008948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008949if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008950
8951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008952$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008953 ipv6=yes
8954
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008955else
Matthias Kloseb159a552010-04-25 21:00:44 +00008956
8957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008958$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008959 ipv6=no
8960
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008961fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008963fi
8964
8965if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008966 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008967
8968fi
8969
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008970fi
8971
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008972
8973ipv6type=unknown
8974ipv6lib=none
8975ipv6trylibc=no
8976
8977if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8979$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008980 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8981 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008982 case $i in
8983 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008985/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008986
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008987#include <netinet/in.h>
8988#ifdef IPV6_INRIA_VERSION
8989yes
8990#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008991_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008992if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008993 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008994 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008995fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008996rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008997
8998 ;;
8999 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009001/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009002
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009003#include <netinet/in.h>
9004#ifdef __KAME__
9005yes
9006#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009007_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009008if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009009 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009010 ipv6type=$i;
9011 ipv6lib=inet6
9012 ipv6libdir=/usr/local/v6/lib
9013 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009014fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009015rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009016
9017 ;;
9018 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009020/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009021
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009022#include <features.h>
9023#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9024yes
9025#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009026_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009027if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009028 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009029 ipv6type=$i;
9030 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009031fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009032rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009033
9034 ;;
9035 linux-inet6)
9036 if test -d /usr/inet6; then
9037 ipv6type=$i
9038 ipv6lib=inet6
9039 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009040 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009041 fi
9042 ;;
9043 solaris)
9044 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009045 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009046 ipv6type=$i
9047 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009048 fi
9049 fi
9050 ;;
9051 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009053/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009054
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009055#include <sys/param.h>
9056#ifdef _TOSHIBA_INET6
9057yes
9058#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009059_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009060if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009061 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009062 ipv6type=$i;
9063 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009064 ipv6libdir=/usr/local/v6/lib
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 v6d)
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 </usr/local/v6/include/sys/v6config.h>
9074#ifdef __V6D__
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=v6;
9082 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009083 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
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 zeta)
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 <sys/param.h>
9093#ifdef _ZETA_MINAMI_INET6
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 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009101 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009102fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009103rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009104
9105 ;;
9106 esac
9107 if test "$ipv6type" != "unknown"; then
9108 break
9109 fi
9110 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9112$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009113fi
9114
9115if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9116 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9117 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9118 echo "using lib$ipv6lib"
9119 else
9120 if test $ipv6trylibc = "yes"; then
9121 echo "using libc"
9122 else
9123 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9124 echo "You need to fetch lib$ipv6lib.a from appropriate"
9125 echo 'ipv6 kit and compile beforehand.'
9126 exit 1
9127 fi
9128 fi
9129fi
9130
Matthias Kloseb9621712010-04-24 17:59:49 +00009131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9132$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009134/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009135
9136 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009137int
9138main ()
9139{
9140FSIORefNum fRef = 0
9141 ;
9142 return 0;
9143}
Matthias Kloseb159a552010-04-25 21:00:44 +00009144
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009146if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009147
Matthias Kloseb159a552010-04-25 21:00:44 +00009148
Matthias Kloseb9621712010-04-24 17:59:49 +00009149$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009150
Matthias Kloseb9621712010-04-24 17:59:49 +00009151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9152$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009153
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009154else
Matthias Kloseb159a552010-04-25 21:00:44 +00009155
Matthias Kloseb9621712010-04-24 17:59:49 +00009156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9157$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009158
9159fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9161
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009162# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9164$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009165
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009166# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009167if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009168 withval=$with_doc_strings;
9169fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009170
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009171
9172if test -z "$with_doc_strings"
9173then with_doc_strings="yes"
9174fi
9175if test "$with_doc_strings" != "no"
9176then
9177
Matthias Kloseb9621712010-04-24 17:59:49 +00009178$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009179
9180fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9182$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009183
Antoine Pitrou042b1282010-08-13 21:15:58 +00009184# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9186$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009187
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009188# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009189if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009190 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009191if test "$withval" != no
9192then
9193
Matthias Kloseb9621712010-04-24 17:59:49 +00009194$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009195
Matthias Kloseb9621712010-04-24 17:59:49 +00009196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9197$as_echo "yes" >&6; }
9198else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9199$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009200fi
9201else
Matthias Kloseb9621712010-04-24 17:59:49 +00009202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9203$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009204fi
9205
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009206
9207# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9209$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009210
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009211# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009212if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009213 withval=$with_pymalloc;
9214fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009215
Neil Schemenauera35c6882001-02-27 04:45:05 +00009216
Neil Schemenauer16c22972002-03-22 15:34:49 +00009217if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009218then
9219 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009220 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009221fi
9222if test "$with_pymalloc" != "no"
9223then
Martin v. Löwis11437992002-04-12 09:54:03 +00009224
Matthias Kloseb9621712010-04-24 17:59:49 +00009225$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009226
9227fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9229$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009230
Benjamin Peterson05159c42009-12-03 03:01:27 +00009231# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9233$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009234
9235# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009236if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009237 withval=$with_valgrind;
9238else
9239 with_valgrind=no
9240fi
9241
Matthias Kloseb9621712010-04-24 17:59:49 +00009242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9243$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009244if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009245 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009246if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009247
Matthias Kloseb9621712010-04-24 17:59:49 +00009248$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009249
9250else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009251 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009252
9253fi
9254
9255
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009256 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009257fi
9258
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009259# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009260
Guido van Rossum98935bf2001-09-05 19:13:16 +00009261DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009262
Guido van Rossume97ee181999-12-20 21:27:22 +00009263# the dlopen() function means we might want to use dynload_shlib.o. some
9264# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009265for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009266do :
9267 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009268if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009269 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009270#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009271_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009272
Guido van Rossume97ee181999-12-20 21:27:22 +00009273fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009274done
Guido van Rossume97ee181999-12-20 21:27:22 +00009275
Michael W. Hudson54241132001-12-07 15:38:26 +00009276
Guido van Rossume97ee181999-12-20 21:27:22 +00009277# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9278# loading of modules.
9279
Matthias Kloseb9621712010-04-24 17:59:49 +00009280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9281$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009282if test -z "$DYNLOADFILE"
9283then
9284 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009285 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9286 if test "$ac_cv_func_dlopen" = yes
9287 then DYNLOADFILE="dynload_shlib.o"
9288 else DYNLOADFILE="dynload_aix.o"
9289 fi
9290 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009291 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009292 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9293 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009294 *)
9295 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9296 # out any dynamic loading
9297 if test "$ac_cv_func_dlopen" = yes
9298 then DYNLOADFILE="dynload_shlib.o"
9299 else DYNLOADFILE="dynload_stub.o"
9300 fi
9301 ;;
9302 esac
9303fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9305$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009306if test "$DYNLOADFILE" != "dynload_stub.o"
9307then
Martin v. Löwis11437992002-04-12 09:54:03 +00009308
Matthias Kloseb9621712010-04-24 17:59:49 +00009309$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009310
9311fi
9312
Neil Schemenauer4e425612001-06-19 15:44:15 +00009313# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9314
Michael W. Hudson54241132001-12-07 15:38:26 +00009315
Matthias Kloseb9621712010-04-24 17:59:49 +00009316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9317$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009318if test -z "$MACHDEP_OBJS"
9319then
Jack Jansene578a632001-08-15 01:27:14 +00009320 MACHDEP_OBJS=$extra_machdep_objs
9321else
9322 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009323fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9325$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009326
Guido van Rossum627b2d71993-12-24 10:39:16 +00009327# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009328for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Antoine Pitrou8250e232011-02-25 23:41:16 +00009329 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009330 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009331 futimens futimes gai_strerror \
9332 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009333 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07009334 if_nameindex \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009335 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +02009336 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009337 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009338 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009339 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009340 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009341 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Benjamin Petersonc5fce4d2011-08-02 18:07:32 -05009342 sched_setaffinity sched_setscheduler sched_setparam sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +02009343 sigaction sigaltstack siginterrupt sigpending sigrelse \
9344 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009345 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009346 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
9347 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009348do :
9349 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9350ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009351if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009352 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009353#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009354_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009355
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009356fi
9357done
9358
Michael W. Hudson54241132001-12-07 15:38:26 +00009359
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009360# For some functions, having a definition is not sufficient, since
9361# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9363$as_echo_n "checking for chroot... " >&6; }
9364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009365/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009366#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009367int
9368main ()
9369{
9370void *x=chroot
9371 ;
9372 return 0;
9373}
9374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009375if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009376
Matthias Kloseb9621712010-04-24 17:59:49 +00009377$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009378
Matthias Kloseb159a552010-04-25 21:00:44 +00009379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009380$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009381else
Matthias Kloseb9621712010-04-24 17:59:49 +00009382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9383$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009384
9385fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9388$as_echo_n "checking for link... " >&6; }
9389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009390/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009391#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009392int
9393main ()
9394{
9395void *x=link
9396 ;
9397 return 0;
9398}
9399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009400if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009401
Matthias Kloseb9621712010-04-24 17:59:49 +00009402$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009403
Matthias Kloseb159a552010-04-25 21:00:44 +00009404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009405$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009406else
Matthias Kloseb9621712010-04-24 17:59:49 +00009407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9408$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009409
9410fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9413$as_echo_n "checking for symlink... " >&6; }
9414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009415/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009416#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009417int
9418main ()
9419{
9420void *x=symlink
9421 ;
9422 return 0;
9423}
9424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009425if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009426
Matthias Kloseb9621712010-04-24 17:59:49 +00009427$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009428
Matthias Kloseb159a552010-04-25 21:00:44 +00009429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009430$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009431else
Matthias Kloseb9621712010-04-24 17:59:49 +00009432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9433$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009434
9435fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9438$as_echo_n "checking for fchdir... " >&6; }
9439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009440/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009441#include <unistd.h>
9442int
9443main ()
9444{
9445void *x=fchdir
9446 ;
9447 return 0;
9448}
9449_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009450if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009451
Matthias Kloseb9621712010-04-24 17:59:49 +00009452$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009453
Matthias Kloseb159a552010-04-25 21:00:44 +00009454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009455$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009456else
Matthias Kloseb9621712010-04-24 17:59:49 +00009457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9458$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009459
9460fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9463$as_echo_n "checking for fsync... " >&6; }
9464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009465/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009466#include <unistd.h>
9467int
9468main ()
9469{
9470void *x=fsync
9471 ;
9472 return 0;
9473}
9474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009475if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009476
Matthias Kloseb9621712010-04-24 17:59:49 +00009477$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009478
Matthias Kloseb159a552010-04-25 21:00:44 +00009479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009480$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009481else
Matthias Kloseb9621712010-04-24 17:59:49 +00009482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9483$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009484
9485fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9488$as_echo_n "checking for fdatasync... " >&6; }
9489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009490/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009491#include <unistd.h>
9492int
9493main ()
9494{
9495void *x=fdatasync
9496 ;
9497 return 0;
9498}
9499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009500if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009501
Matthias Kloseb9621712010-04-24 17:59:49 +00009502$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009503
Matthias Kloseb159a552010-04-25 21:00:44 +00009504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009505$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009506else
Matthias Kloseb9621712010-04-24 17:59:49 +00009507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9508$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009509
9510fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9513$as_echo_n "checking for epoll... " >&6; }
9514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009515/* end confdefs.h. */
9516#include <sys/epoll.h>
9517int
9518main ()
9519{
9520void *x=epoll_create
9521 ;
9522 return 0;
9523}
9524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009525if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009526
Matthias Kloseb9621712010-04-24 17:59:49 +00009527$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009528
Matthias Kloseb159a552010-04-25 21:00:44 +00009529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009530$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009531else
Matthias Kloseb9621712010-04-24 17:59:49 +00009532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9533$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009534
9535fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9538$as_echo_n "checking for kqueue... " >&6; }
9539cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009540/* end confdefs.h. */
9541
9542#include <sys/types.h>
9543#include <sys/event.h>
9544
9545int
9546main ()
9547{
9548int x=kqueue()
9549 ;
9550 return 0;
9551}
9552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009553if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009554
Matthias Kloseb9621712010-04-24 17:59:49 +00009555$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009556
Matthias Kloseb159a552010-04-25 21:00:44 +00009557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009558$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009559else
Matthias Kloseb9621712010-04-24 17:59:49 +00009560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9561$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009562
9563fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009565# On some systems (eg. FreeBSD 5), we would find a definition of the
9566# functions ctermid_r, setgroups in the library, but no prototype
9567# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9568# address to avoid compiler warnings and potential miscompilations
9569# because of the missing prototypes.
9570
Matthias Kloseb9621712010-04-24 17:59:49 +00009571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9572$as_echo_n "checking for ctermid_r... " >&6; }
9573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009574/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009575
Martin v. Löwisd5843682002-11-21 20:41:28 +00009576#include <stdio.h>
9577
Martin v. Löwisd5843682002-11-21 20:41:28 +00009578int
9579main ()
9580{
9581void* p = ctermid_r
9582 ;
9583 return 0;
9584}
9585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009586if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009587
Matthias Kloseb9621712010-04-24 17:59:49 +00009588$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009589
Matthias Kloseb159a552010-04-25 21:00:44 +00009590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009591$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009592else
Matthias Kloseb9621712010-04-24 17:59:49 +00009593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9594$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009595
9596fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9598
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9600$as_echo_n "checking for flock declaration... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009601if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009602 $as_echo_n "(cached) " >&6
9603else
9604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009605/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009606#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009607int
9608main ()
9609{
9610void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009611
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009612 ;
9613 return 0;
9614}
9615_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009616if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009617 ac_cv_flock_decl=yes
9618else
9619 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009620
9621fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009623
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009624fi
9625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9626$as_echo "$ac_cv_flock_decl" >&6; }
9627if test "x${ac_cv_flock_decl}" = xyes; then
9628 for ac_func in flock
9629do :
9630 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009631if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009632 cat >>confdefs.h <<_ACEOF
9633#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009634_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009635
Antoine Pitroua3000072010-09-07 14:52:42 +00009636else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009638$as_echo_n "checking for flock in -lbsd... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009639if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009640 $as_echo_n "(cached) " >&6
9641else
9642 ac_check_lib_save_LIBS=$LIBS
9643LIBS="-lbsd $LIBS"
9644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9645/* end confdefs.h. */
9646
9647/* Override any GCC internal prototype to avoid an error.
9648 Use char because int might match the return type of a GCC
9649 builtin and then its argument prototype would still apply. */
9650#ifdef __cplusplus
9651extern "C"
9652#endif
9653char flock ();
9654int
9655main ()
9656{
9657return flock ();
9658 ;
9659 return 0;
9660}
9661_ACEOF
9662if ac_fn_c_try_link "$LINENO"; then :
9663 ac_cv_lib_bsd_flock=yes
9664else
9665 ac_cv_lib_bsd_flock=no
9666fi
9667rm -f core conftest.err conftest.$ac_objext \
9668 conftest$ac_exeext conftest.$ac_ext
9669LIBS=$ac_check_lib_save_LIBS
9670fi
9671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9672$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009673if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009674 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009675
9676
9677$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9678
9679
9680fi
9681
9682
9683fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009684done
9685
Antoine Pitroua3000072010-09-07 14:52:42 +00009686fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009687
Matthias Kloseb9621712010-04-24 17:59:49 +00009688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9689$as_echo_n "checking for getpagesize... " >&6; }
9690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009691/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009692
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009693#include <unistd.h>
9694
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009695int
9696main ()
9697{
9698void* p = getpagesize
9699 ;
9700 return 0;
9701}
9702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009703if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009704
Matthias Kloseb9621712010-04-24 17:59:49 +00009705$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009706
Matthias Kloseb159a552010-04-25 21:00:44 +00009707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009708$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009709else
Matthias Kloseb9621712010-04-24 17:59:49 +00009710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9711$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009712
9713fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009715
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mallopt can set malloc mmap threshold" >&5
9717$as_echo_n "checking whether mallopt can set malloc mmap threshold... " >&6; }
9718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9719/* end confdefs.h. */
9720
9721#include <malloc.h>
9722
9723int
9724main ()
9725{
9726mallopt(M_MMAP_THRESHOLD, 256 * 1024)
9727 ;
9728 return 0;
9729}
9730_ACEOF
9731if ac_fn_c_try_compile "$LINENO"; then :
9732
9733$as_echo "#define HAVE_MALLOPT_MMAP_THRESHOLD 1" >>confdefs.h
9734
9735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9736$as_echo "yes" >&6; }
9737else
9738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9739$as_echo "no" >&6; }
9740
9741fi
9742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9743
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009744for ac_prog in true
9745do
9746 # Extract the first word of "$ac_prog", so it can be a program name with args.
9747set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9749$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009750if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009751 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009752else
9753 if test -n "$TRUE"; then
9754 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9755else
9756as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9757for as_dir in $PATH
9758do
9759 IFS=$as_save_IFS
9760 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009761 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009762 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 +00009763 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009764 $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 +00009765 break 2
9766 fi
9767done
Matthias Kloseb9621712010-04-24 17:59:49 +00009768 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009769IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009770
9771fi
9772fi
9773TRUE=$ac_cv_prog_TRUE
9774if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9776$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009777else
Matthias Kloseb9621712010-04-24 17:59:49 +00009778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9779$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009780fi
9781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009782
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009783 test -n "$TRUE" && break
9784done
9785test -n "$TRUE" || TRUE="/bin/true"
9786
9787
Matthias Kloseb9621712010-04-24 17:59:49 +00009788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9789$as_echo_n "checking for inet_aton in -lc... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009790if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009791 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009792else
9793 ac_check_lib_save_LIBS=$LIBS
9794LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009796/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009797
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009798/* Override any GCC internal prototype to avoid an error.
9799 Use char because int might match the return type of a GCC
9800 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009801#ifdef __cplusplus
9802extern "C"
9803#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009804char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009805int
9806main ()
9807{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009808return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009809 ;
9810 return 0;
9811}
9812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009813if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009814 ac_cv_lib_c_inet_aton=yes
9815else
Matthias Kloseb9621712010-04-24 17:59:49 +00009816 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009818rm -f core conftest.err conftest.$ac_objext \
9819 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009820LIBS=$ac_check_lib_save_LIBS
9821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9823$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009824if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009825 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009826else
Matthias Kloseb9621712010-04-24 17:59:49 +00009827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9828$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009829if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009830 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009831else
9832 ac_check_lib_save_LIBS=$LIBS
9833LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009835/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009836
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009837/* Override any GCC internal prototype to avoid an error.
9838 Use char because int might match the return type of a GCC
9839 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009840#ifdef __cplusplus
9841extern "C"
9842#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009843char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009844int
9845main ()
9846{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009847return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009848 ;
9849 return 0;
9850}
9851_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009852if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009853 ac_cv_lib_resolv_inet_aton=yes
9854else
Matthias Kloseb9621712010-04-24 17:59:49 +00009855 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009856fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009857rm -f core conftest.err conftest.$ac_objext \
9858 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009859LIBS=$ac_check_lib_save_LIBS
9860fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9862$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009863if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009864 cat >>confdefs.h <<_ACEOF
9865#define HAVE_LIBRESOLV 1
9866_ACEOF
9867
9868 LIBS="-lresolv $LIBS"
9869
9870fi
9871
9872
9873fi
9874
9875
Christian Heimesd0764e22007-12-04 15:00:33 +00009876# On Tru64, chflags seems to be present, but calling it will
9877# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9879$as_echo_n "checking for chflags... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009880if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009881 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009882else
Matthias Kloseb9621712010-04-24 17:59:49 +00009883 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009884 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009885else
Matthias Kloseb9621712010-04-24 17:59:49 +00009886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009887/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009888
Christian Heimesd0764e22007-12-04 15:00:33 +00009889#include <sys/stat.h>
9890#include <unistd.h>
9891int main(int argc, char*argv[])
9892{
9893 if(chflags(argv[0], 0) != 0)
9894 return 1;
9895 return 0;
9896}
Ned Deily3eb67d52011-06-28 00:00:28 -07009897
Christian Heimesd0764e22007-12-04 15:00:33 +00009898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009899if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009900 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009901else
Matthias Kloseb9621712010-04-24 17:59:49 +00009902 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009903fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009904rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9905 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009906fi
9907
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009908
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009909fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9911$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009912if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009913 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009914if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009915 ac_cv_have_chflags="yes"
9916else
9917 ac_cv_have_chflags="no"
9918fi
9919
9920fi
9921if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009922
Matthias Kloseb9621712010-04-24 17:59:49 +00009923$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009924
9925fi
9926
Matthias Kloseb9621712010-04-24 17:59:49 +00009927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9928$as_echo_n "checking for lchflags... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009929if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009930 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009931else
Matthias Kloseb9621712010-04-24 17:59:49 +00009932 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009933 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009934else
Matthias Kloseb9621712010-04-24 17:59:49 +00009935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009936/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009937
Christian Heimesd0764e22007-12-04 15:00:33 +00009938#include <sys/stat.h>
9939#include <unistd.h>
9940int main(int argc, char*argv[])
9941{
9942 if(lchflags(argv[0], 0) != 0)
9943 return 1;
9944 return 0;
9945}
Ned Deily3eb67d52011-06-28 00:00:28 -07009946
Christian Heimesd0764e22007-12-04 15:00:33 +00009947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009948if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009949 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009950else
Matthias Kloseb9621712010-04-24 17:59:49 +00009951 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009953rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9954 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009955fi
9956
9957
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009958fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9960$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009961if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009962 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009963if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009964 ac_cv_have_lchflags="yes"
9965else
9966 ac_cv_have_lchflags="no"
9967fi
9968
9969fi
9970if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009971
Matthias Kloseb9621712010-04-24 17:59:49 +00009972$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009973
9974fi
9975
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009976case $ac_sys_system/$ac_sys_release in
9977Darwin/*)
9978 _CUR_CFLAGS="${CFLAGS}"
9979 _CUR_LDFLAGS="${LDFLAGS}"
9980 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9981 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9982 ;;
9983esac
9984
Matthias Kloseb9621712010-04-24 17:59:49 +00009985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9986$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009987if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009988 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009989else
9990 ac_check_lib_save_LIBS=$LIBS
9991LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009993/* end confdefs.h. */
9994
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009995/* Override any GCC internal prototype to avoid an error.
9996 Use char because int might match the return type of a GCC
9997 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009998#ifdef __cplusplus
9999extern "C"
10000#endif
10001char inflateCopy ();
10002int
10003main ()
10004{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010005return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010006 ;
10007 return 0;
10008}
10009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010010if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010011 ac_cv_lib_z_inflateCopy=yes
10012else
Matthias Kloseb9621712010-04-24 17:59:49 +000010013 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010014fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010015rm -f core conftest.err conftest.$ac_objext \
10016 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010017LIBS=$ac_check_lib_save_LIBS
10018fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10020$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010021if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010022
Matthias Kloseb9621712010-04-24 17:59:49 +000010023$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010024
10025fi
10026
10027
10028case $ac_sys_system/$ac_sys_release in
10029Darwin/*)
10030 CFLAGS="${_CUR_CFLAGS}"
10031 LDFLAGS="${_CUR_LDFLAGS}"
10032 ;;
10033esac
10034
Matthias Kloseb9621712010-04-24 17:59:49 +000010035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10036$as_echo_n "checking for hstrerror... " >&6; }
10037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010038/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010039
Martin v. Löwise9416172003-05-03 10:12:45 +000010040#include <netdb.h>
10041
Martin v. Löwise9416172003-05-03 10:12:45 +000010042int
10043main ()
10044{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010045void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010046 ;
10047 return 0;
10048}
10049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010050if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010051
Matthias Kloseb9621712010-04-24 17:59:49 +000010052$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010053
Matthias Kloseb159a552010-04-25 21:00:44 +000010054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010055$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010056else
Matthias Kloseb9621712010-04-24 17:59:49 +000010057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10058$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010059
10060fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010061rm -f core conftest.err conftest.$ac_objext \
10062 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010063
Matthias Kloseb9621712010-04-24 17:59:49 +000010064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10065$as_echo_n "checking for inet_aton... " >&6; }
10066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010067/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010068
Martin v. Löwis86d66262006-02-17 08:40:11 +000010069#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010070#include <sys/socket.h>
10071#include <netinet/in.h>
10072#include <arpa/inet.h>
10073
Martin v. Löwise9416172003-05-03 10:12:45 +000010074int
10075main ()
10076{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010077void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010078 ;
10079 return 0;
10080}
10081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010082if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010083
Matthias Kloseb9621712010-04-24 17:59:49 +000010084$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010085
Matthias Kloseb159a552010-04-25 21:00:44 +000010086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010087$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010088else
Matthias Kloseb9621712010-04-24 17:59:49 +000010089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10090$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010091
10092fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010093rm -f core conftest.err conftest.$ac_objext \
10094 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010095
Matthias Kloseb9621712010-04-24 17:59:49 +000010096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10097$as_echo_n "checking for inet_pton... " >&6; }
10098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010099/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010100
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010101#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010102#include <sys/socket.h>
10103#include <netinet/in.h>
10104#include <arpa/inet.h>
10105
Martin v. Löwise9416172003-05-03 10:12:45 +000010106int
10107main ()
10108{
10109void* p = inet_pton
10110 ;
10111 return 0;
10112}
10113_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010114if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010115
Matthias Kloseb9621712010-04-24 17:59:49 +000010116$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010117
Matthias Kloseb159a552010-04-25 21:00:44 +000010118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010119$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010120else
Matthias Kloseb9621712010-04-24 17:59:49 +000010121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10122$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010123
10124fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010126
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010127# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10129$as_echo_n "checking for setgroups... " >&6; }
10130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010131/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010132
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010133#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010134#ifdef HAVE_GRP_H
10135#include <grp.h>
10136#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010137
Martin v. Löwisd5843682002-11-21 20:41:28 +000010138int
10139main ()
10140{
10141void* p = setgroups
10142 ;
10143 return 0;
10144}
10145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010146if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010147
Matthias Kloseb9621712010-04-24 17:59:49 +000010148$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010149
Matthias Kloseb159a552010-04-25 21:00:44 +000010150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010151$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010152else
Matthias Kloseb9621712010-04-24 17:59:49 +000010153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10154$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010155
10156fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010158
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010159# check for openpty and forkpty
10160
10161for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010162do :
10163 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010164if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010165 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010166#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010167_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010168
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010169else
Matthias Kloseb9621712010-04-24 17:59:49 +000010170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10171$as_echo_n "checking for openpty in -lutil... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010172if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010173 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010174else
Martin v. Löwis11437992002-04-12 09:54:03 +000010175 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010176LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010177cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010178/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010179
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010180/* Override any GCC internal prototype to avoid an error.
10181 Use char because int might match the return type of a GCC
10182 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010183#ifdef __cplusplus
10184extern "C"
10185#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010186char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010187int
10188main ()
10189{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010190return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010191 ;
10192 return 0;
10193}
10194_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010195if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010196 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010197else
Matthias Kloseb9621712010-04-24 17:59:49 +000010198 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010199fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010200rm -f core conftest.err conftest.$ac_objext \
10201 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010202LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010203fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10205$as_echo "$ac_cv_lib_util_openpty" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010206if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010207 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010208 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010209else
Matthias Kloseb9621712010-04-24 17:59:49 +000010210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10211$as_echo_n "checking for openpty in -lbsd... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010212if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010213 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010214else
10215 ac_check_lib_save_LIBS=$LIBS
10216LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010218/* end confdefs.h. */
10219
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010220/* Override any GCC internal prototype to avoid an error.
10221 Use char because int might match the return type of a GCC
10222 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010223#ifdef __cplusplus
10224extern "C"
10225#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010226char openpty ();
10227int
10228main ()
10229{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010230return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010231 ;
10232 return 0;
10233}
10234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010235if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010236 ac_cv_lib_bsd_openpty=yes
10237else
Matthias Kloseb9621712010-04-24 17:59:49 +000010238 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010239fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010240rm -f core conftest.err conftest.$ac_objext \
10241 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010242LIBS=$ac_check_lib_save_LIBS
10243fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10245$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010246if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010247 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010248 LIBS="$LIBS -lbsd"
10249fi
10250
10251
10252fi
10253
Fred Drake8cef4cf2000-06-28 16:40:38 +000010254
10255fi
10256done
10257
10258for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010259do :
10260 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010261if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010262 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010263#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010264_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010265
Fred Drake8cef4cf2000-06-28 16:40:38 +000010266else
Matthias Kloseb9621712010-04-24 17:59:49 +000010267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10268$as_echo_n "checking for forkpty in -lutil... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010269if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010270 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010271else
Martin v. Löwis11437992002-04-12 09:54:03 +000010272 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010273LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010275/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010276
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010277/* Override any GCC internal prototype to avoid an error.
10278 Use char because int might match the return type of a GCC
10279 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010280#ifdef __cplusplus
10281extern "C"
10282#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010283char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010284int
10285main ()
10286{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010287return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010288 ;
10289 return 0;
10290}
10291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010292if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010293 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010294else
Matthias Kloseb9621712010-04-24 17:59:49 +000010295 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010296fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010297rm -f core conftest.err conftest.$ac_objext \
10298 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010299LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010300fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10302$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010303if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010304 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010305 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010306else
Matthias Kloseb9621712010-04-24 17:59:49 +000010307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10308$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010309if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010310 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010311else
10312 ac_check_lib_save_LIBS=$LIBS
10313LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010314cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010315/* end confdefs.h. */
10316
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010317/* Override any GCC internal prototype to avoid an error.
10318 Use char because int might match the return type of a GCC
10319 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010320#ifdef __cplusplus
10321extern "C"
10322#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010323char forkpty ();
10324int
10325main ()
10326{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010327return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010328 ;
10329 return 0;
10330}
10331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010332if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010333 ac_cv_lib_bsd_forkpty=yes
10334else
Matthias Kloseb9621712010-04-24 17:59:49 +000010335 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010336fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010337rm -f core conftest.err conftest.$ac_objext \
10338 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010339LIBS=$ac_check_lib_save_LIBS
10340fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10342$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010343if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010344 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010345 LIBS="$LIBS -lbsd"
10346fi
10347
10348
10349fi
10350
Fred Drake8cef4cf2000-06-28 16:40:38 +000010351
10352fi
10353done
10354
Jack Jansendd19cf82001-12-06 22:36:17 +000010355
Christian Heimesb186d002008-03-18 15:15:01 +000010356# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010357for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010358do :
10359 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010360if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010361 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010362#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010363_ACEOF
10364
10365fi
10366done
10367
10368
Michael W. Hudson54241132001-12-07 15:38:26 +000010369# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010370for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010371do :
10372 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10373ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010374if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010375 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010376#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010377_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010378
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010379fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010380done
10381
Michael W. Hudson54241132001-12-07 15:38:26 +000010382
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010383ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010384if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010385 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010386
Martin v. Löwis1142de32002-03-29 16:28:31 +000010387else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010388 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010389 *" dup2.$ac_objext "* ) ;;
10390 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010391 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010392esac
10393
Martin v. Löwis1142de32002-03-29 16:28:31 +000010394fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010395
10396ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010397if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010398 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10399
10400else
10401 case " $LIBOBJS " in
10402 *" getcwd.$ac_objext "* ) ;;
10403 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10404 ;;
10405esac
10406
10407fi
10408
10409ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010410if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010411 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10412
10413else
10414 case " $LIBOBJS " in
10415 *" strdup.$ac_objext "* ) ;;
10416 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10417 ;;
10418esac
10419
10420fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010421
10422
10423for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010424do :
10425 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010426if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010427 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010428#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010429_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010431/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010432#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010433int
10434main ()
10435{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010436getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010437 ;
10438 return 0;
10439}
10440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010441if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010442
Matthias Kloseb9621712010-04-24 17:59:49 +000010443$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010444
Guido van Rossum627b2d71993-12-24 10:39:16 +000010445fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010447
Guido van Rossum627b2d71993-12-24 10:39:16 +000010448fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010449done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010450
Jack Jansen150753c2003-03-29 22:07:47 +000010451for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010452do :
10453 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010454if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010455 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010456#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010459/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010460#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010461int
10462main ()
10463{
10464setpgrp(0,0);
10465 ;
10466 return 0;
10467}
10468_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010469if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010470
Matthias Kloseb9621712010-04-24 17:59:49 +000010471$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010472
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010473fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010475
10476fi
10477done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010478
Thomas Wouters3a584202000-08-05 23:28:51 +000010479for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010480do :
10481 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010482if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010483 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010484#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010487/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010488#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010489int
10490main ()
10491{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010492gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010493 ;
10494 return 0;
10495}
10496_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010497if ac_fn_c_try_compile "$LINENO"; then :
10498
Guido van Rossum627b2d71993-12-24 10:39:16 +000010499else
Skip Montanaro6dead952003-09-25 14:50:04 +000010500
Matthias Kloseb9621712010-04-24 17:59:49 +000010501$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010502
Martin v. Löwis11437992002-04-12 09:54:03 +000010503
Guido van Rossum627b2d71993-12-24 10:39:16 +000010504fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010506
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010507fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010508done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010509
Michael W. Hudson54241132001-12-07 15:38:26 +000010510
Matthias Kloseb9621712010-04-24 17:59:49 +000010511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10512$as_echo_n "checking for major... " >&6; }
10513cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010514/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010515
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010516#if defined(MAJOR_IN_MKDEV)
10517#include <sys/mkdev.h>
10518#elif defined(MAJOR_IN_SYSMACROS)
10519#include <sys/sysmacros.h>
10520#else
10521#include <sys/types.h>
10522#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010523
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010524int
10525main ()
10526{
10527
10528 makedev(major(0),minor(0));
10529
10530 ;
10531 return 0;
10532}
10533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010534if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010535
10536
Matthias Kloseb9621712010-04-24 17:59:49 +000010537$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010538
Matthias Kloseb9621712010-04-24 17:59:49 +000010539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10540$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010541
10542else
Skip Montanaro6dead952003-09-25 14:50:04 +000010543
Matthias Kloseb9621712010-04-24 17:59:49 +000010544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10545$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010546
10547fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010548rm -f core conftest.err conftest.$ac_objext \
10549 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010550
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010551# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010552# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10554$as_echo_n "checking for getaddrinfo... " >&6; }
10555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010556/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010557
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010558#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010559#include <sys/socket.h>
10560#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010561#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010562
Martin v. Löwis11437992002-04-12 09:54:03 +000010563int
10564main ()
10565{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010566getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010567 ;
10568 return 0;
10569}
10570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010571if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010572 have_getaddrinfo=yes
10573else
Matthias Kloseb9621712010-04-24 17:59:49 +000010574 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010575fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010576rm -f core conftest.err conftest.$ac_objext \
10577 conftest$ac_exeext conftest.$ac_ext
10578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10579$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010580if test $have_getaddrinfo = yes
10581then
Matthias Kloseb9621712010-04-24 17:59:49 +000010582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10583$as_echo_n "checking getaddrinfo bug... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010584 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010585 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010586else
Matthias Kloseb9621712010-04-24 17:59:49 +000010587 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010588 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010589else
Matthias Kloseb9621712010-04-24 17:59:49 +000010590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010591/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010592
10593#include <sys/types.h>
10594#include <netdb.h>
10595#include <string.h>
10596#include <sys/socket.h>
10597#include <netinet/in.h>
10598
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010599int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010600{
10601 int passive, gaierr, inet4 = 0, inet6 = 0;
10602 struct addrinfo hints, *ai, *aitop;
10603 char straddr[INET6_ADDRSTRLEN], strport[16];
10604
10605 for (passive = 0; passive <= 1; passive++) {
10606 memset(&hints, 0, sizeof(hints));
10607 hints.ai_family = AF_UNSPEC;
10608 hints.ai_flags = passive ? AI_PASSIVE : 0;
10609 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010610 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010611 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10612 (void)gai_strerror(gaierr);
10613 goto bad;
10614 }
10615 for (ai = aitop; ai; ai = ai->ai_next) {
10616 if (ai->ai_addr == NULL ||
10617 ai->ai_addrlen == 0 ||
10618 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10619 straddr, sizeof(straddr), strport, sizeof(strport),
10620 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10621 goto bad;
10622 }
10623 switch (ai->ai_family) {
10624 case AF_INET:
10625 if (strcmp(strport, "54321") != 0) {
10626 goto bad;
10627 }
10628 if (passive) {
10629 if (strcmp(straddr, "0.0.0.0") != 0) {
10630 goto bad;
10631 }
10632 } else {
10633 if (strcmp(straddr, "127.0.0.1") != 0) {
10634 goto bad;
10635 }
10636 }
10637 inet4++;
10638 break;
10639 case AF_INET6:
10640 if (strcmp(strport, "54321") != 0) {
10641 goto bad;
10642 }
10643 if (passive) {
10644 if (strcmp(straddr, "::") != 0) {
10645 goto bad;
10646 }
10647 } else {
10648 if (strcmp(straddr, "::1") != 0) {
10649 goto bad;
10650 }
10651 }
10652 inet6++;
10653 break;
10654 case AF_UNSPEC:
10655 goto bad;
10656 break;
10657 default:
10658 /* another family support? */
10659 break;
10660 }
10661 }
10662 }
10663
10664 if (!(inet4 == 0 || inet4 == 2))
10665 goto bad;
10666 if (!(inet6 == 0 || inet6 == 2))
10667 goto bad;
10668
10669 if (aitop)
10670 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010671 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010672
10673 bad:
10674 if (aitop)
10675 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010676 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010677}
10678
Martin v. Löwis11437992002-04-12 09:54:03 +000010679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010680if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010681 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010682else
Matthias Kloseb9621712010-04-24 17:59:49 +000010683 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010684fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010685rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10686 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010687fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010688
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010689fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010690
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010691fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010692
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10694$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10695
Mark Dickinson2df5d282009-12-31 21:22:50 +000010696if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010697then
10698 if test $ipv6 = yes
10699 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010700 echo 'Fatal: You must get working getaddrinfo() function.'
10701 echo ' or you can specify "--disable-ipv6"'.
10702 exit 1
10703 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010704else
Martin v. Löwis11437992002-04-12 09:54:03 +000010705
Matthias Kloseb9621712010-04-24 17:59:49 +000010706$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010707
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010708fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010709
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010710for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010711do :
10712 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010713if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010714 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010715#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010716_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010717
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010718fi
10719done
10720
Michael W. Hudson54241132001-12-07 15:38:26 +000010721
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010722# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10724$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010725if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010726 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010727else
Matthias Kloseb9621712010-04-24 17:59:49 +000010728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010729/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010730#include <sys/types.h>
10731#include <sys/time.h>
10732#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010733
Martin v. Löwis11437992002-04-12 09:54:03 +000010734int
10735main ()
10736{
10737if ((struct tm *) 0)
10738return 0;
10739 ;
10740 return 0;
10741}
10742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010743if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010744 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010745else
Matthias Kloseb9621712010-04-24 17:59:49 +000010746 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010747fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010749fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10751$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010752if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010753
Matthias Kloseb9621712010-04-24 17:59:49 +000010754$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010755
10756fi
10757
Matthias Kloseb9621712010-04-24 17:59:49 +000010758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10759$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010760if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010761 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010762else
Matthias Kloseb9621712010-04-24 17:59:49 +000010763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010764/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010765#include <sys/types.h>
10766#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010767
Martin v. Löwis11437992002-04-12 09:54:03 +000010768int
10769main ()
10770{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010771struct tm tm;
10772 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010773 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010774 ;
10775 return 0;
10776}
10777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010778if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010779 ac_cv_struct_tm=time.h
10780else
Matthias Kloseb9621712010-04-24 17:59:49 +000010781 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010782fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010784fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10786$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010787if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010788
Matthias Kloseb9621712010-04-24 17:59:49 +000010789$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010790
10791fi
10792
Matthias Kloseb9621712010-04-24 17:59:49 +000010793ac_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 +000010794#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010795
Matthias Kloseb9621712010-04-24 17:59:49 +000010796"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010797if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010798
10799cat >>confdefs.h <<_ACEOF
10800#define HAVE_STRUCT_TM_TM_ZONE 1
10801_ACEOF
10802
10803
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010804fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010805
Martin v. Löwis11437992002-04-12 09:54:03 +000010806if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10807
Matthias Kloseb9621712010-04-24 17:59:49 +000010808$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010809
10810else
Matthias Kloseb9621712010-04-24 17:59:49 +000010811 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10812"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010813if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010814 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010815else
Matthias Kloseb9621712010-04-24 17:59:49 +000010816 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010817fi
10818
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010819cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010820#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010821_ACEOF
10822
Matthias Kloseb9621712010-04-24 17:59:49 +000010823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10824$as_echo_n "checking for tzname... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010825if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010826 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010827else
Matthias Kloseb9621712010-04-24 17:59:49 +000010828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010829/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010830#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010831#if !HAVE_DECL_TZNAME
10832extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010833#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010834
Martin v. Löwis11437992002-04-12 09:54:03 +000010835int
10836main ()
10837{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010838return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010839 ;
10840 return 0;
10841}
10842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010843if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010844 ac_cv_var_tzname=yes
10845else
Matthias Kloseb9621712010-04-24 17:59:49 +000010846 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010847fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010848rm -f core conftest.err conftest.$ac_objext \
10849 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010850fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10852$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010853 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010854
Matthias Kloseb9621712010-04-24 17:59:49 +000010855$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010856
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010857 fi
10858fi
10859
Matthias Kloseb9621712010-04-24 17:59:49 +000010860ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010861if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010862
10863cat >>confdefs.h <<_ACEOF
10864#define HAVE_STRUCT_STAT_ST_RDEV 1
10865_ACEOF
10866
10867
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010868fi
10869
Matthias Kloseb9621712010-04-24 17:59:49 +000010870ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010871if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010872
Martin v. Löwis11437992002-04-12 09:54:03 +000010873cat >>confdefs.h <<_ACEOF
10874#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10875_ACEOF
10876
10877
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010878fi
10879
Matthias Kloseb9621712010-04-24 17:59:49 +000010880ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010881if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010882
10883cat >>confdefs.h <<_ACEOF
10884#define HAVE_STRUCT_STAT_ST_FLAGS 1
10885_ACEOF
10886
10887
10888fi
10889
Matthias Kloseb9621712010-04-24 17:59:49 +000010890ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010891if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010892
10893cat >>confdefs.h <<_ACEOF
10894#define HAVE_STRUCT_STAT_ST_GEN 1
10895_ACEOF
10896
10897
10898fi
10899
Matthias Kloseb9621712010-04-24 17:59:49 +000010900ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010901if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010902
10903cat >>confdefs.h <<_ACEOF
10904#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10905_ACEOF
10906
10907
10908fi
10909
Matthias Kloseb9621712010-04-24 17:59:49 +000010910ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010911if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010912
Martin v. Löwis11437992002-04-12 09:54:03 +000010913cat >>confdefs.h <<_ACEOF
10914#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10915_ACEOF
10916
10917
Matthias Kloseb9621712010-04-24 17:59:49 +000010918$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010919
10920else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010921 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010922 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010923 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10924 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010925esac
10926
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010927fi
10928
Michael W. Hudson54241132001-12-07 15:38:26 +000010929
Martin v. Löwis11437992002-04-12 09:54:03 +000010930
Matthias Kloseb9621712010-04-24 17:59:49 +000010931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10932$as_echo_n "checking for time.h that defines altzone... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010933if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010934 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010935else
Matthias Kloseb159a552010-04-25 21:00:44 +000010936
Matthias Kloseb9621712010-04-24 17:59:49 +000010937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010938/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010939#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010940int
10941main ()
10942{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010943return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010944 ;
10945 return 0;
10946}
10947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010948if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010949 ac_cv_header_time_altzone=yes
10950else
Matthias Kloseb9621712010-04-24 17:59:49 +000010951 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010952fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010954
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010955fi
10956
Matthias Kloseb9621712010-04-24 17:59:49 +000010957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10958$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010959if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010960
Matthias Kloseb9621712010-04-24 17:59:49 +000010961$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010962
10963fi
10964
Guido van Rossumda88dad1995-01-26 00:46:29 +000010965was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10967$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10968cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010969/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010970
10971#include <sys/types.h>
10972#include <sys/select.h>
10973#include <sys/time.h>
10974
Martin v. Löwis11437992002-04-12 09:54:03 +000010975int
10976main ()
10977{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010978;
Martin v. Löwis11437992002-04-12 09:54:03 +000010979 ;
10980 return 0;
10981}
10982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010983if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010984
10985
Matthias Kloseb9621712010-04-24 17:59:49 +000010986$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010987
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010988 was_it_defined=yes
10989
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010990fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10993$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010994
Matthias Kloseb9621712010-04-24 17:59:49 +000010995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10996$as_echo_n "checking for addrinfo... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010997if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010998 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010999else
Matthias Kloseb9621712010-04-24 17:59:49 +000011000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011001/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011002#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011003int
11004main ()
11005{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011006struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011007 ;
11008 return 0;
11009}
11010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011011if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011012 ac_cv_struct_addrinfo=yes
11013else
Matthias Kloseb9621712010-04-24 17:59:49 +000011014 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011015fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11017fi
11018
Matthias Kloseb9621712010-04-24 17:59:49 +000011019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11020$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011021if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011022
Matthias Kloseb9621712010-04-24 17:59:49 +000011023$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011024
11025fi
11026
Matthias Kloseb9621712010-04-24 17:59:49 +000011027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11028$as_echo_n "checking for sockaddr_storage... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011029if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011030 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011031else
Matthias Kloseb9621712010-04-24 17:59:49 +000011032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011033/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011034
11035# include <sys/types.h>
11036# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011037int
11038main ()
11039{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011040struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011041 ;
11042 return 0;
11043}
11044_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011045if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011046 ac_cv_struct_sockaddr_storage=yes
11047else
Matthias Kloseb9621712010-04-24 17:59:49 +000011048 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011049fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11051fi
11052
Matthias Kloseb9621712010-04-24 17:59:49 +000011053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11054$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011055if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011056
Matthias Kloseb9621712010-04-24 17:59:49 +000011057$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011058
11059fi
11060
Guido van Rossum627b2d71993-12-24 10:39:16 +000011061# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011062
Matthias Kloseb9621712010-04-24 17:59:49 +000011063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11064$as_echo_n "checking whether char is unsigned... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011065if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011066 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011067else
Matthias Kloseb9621712010-04-24 17:59:49 +000011068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011069/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011070$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011071int
11072main ()
11073{
11074static int test_array [1 - 2 * !(((char) -1) < 0)];
11075test_array [0] = 0
11076
11077 ;
11078 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011079}
Martin v. Löwis11437992002-04-12 09:54:03 +000011080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011081if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011082 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011083else
Matthias Kloseb9621712010-04-24 17:59:49 +000011084 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011085fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011087fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11089$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011090if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011091 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011092
11093fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011094
Matthias Kloseb9621712010-04-24 17:59:49 +000011095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11096$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011097if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011098 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011099else
Matthias Kloseb9621712010-04-24 17:59:49 +000011100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011101/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011102
Martin v. Löwis11437992002-04-12 09:54:03 +000011103int
11104main ()
11105{
11106/* FIXME: Include the comments suggested by Paul. */
11107#ifndef __cplusplus
11108 /* Ultrix mips cc rejects this. */
11109 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011110 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011111 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011112 char const *const *pcpcc;
11113 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011114 /* NEC SVR4.0.2 mips cc rejects this. */
11115 struct point {int x, y;};
11116 static struct point const zero = {0,0};
11117 /* AIX XL C 1.02.0.0 rejects this.
11118 It does not let you subtract one const X* pointer from another in
11119 an arm of an if-expression whose if-part is not a constant
11120 expression */
11121 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011122 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011123 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011124 ++pcpcc;
11125 ppc = (char**) pcpcc;
11126 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011127 { /* SCO 3.2v4 cc rejects this. */
11128 char *t;
11129 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011130
Martin v. Löwis11437992002-04-12 09:54:03 +000011131 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011132 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011133 }
11134 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11135 int x[] = {25, 17};
11136 const int *foo = &x[0];
11137 ++foo;
11138 }
11139 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11140 typedef const int *iptr;
11141 iptr p = 0;
11142 ++p;
11143 }
11144 { /* AIX XL C 1.02.0.0 rejects this saying
11145 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11146 struct s { int j; const int *ap[3]; };
11147 struct s *b; b->j = 5;
11148 }
11149 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11150 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011151 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011152 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011153 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011154#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011155
Martin v. Löwis11437992002-04-12 09:54:03 +000011156 ;
11157 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011158}
Martin v. Löwis11437992002-04-12 09:54:03 +000011159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011160if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011161 ac_cv_c_const=yes
11162else
Matthias Kloseb9621712010-04-24 17:59:49 +000011163 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011164fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011166fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11168$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011169if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011170
Matthias Kloseb9621712010-04-24 17:59:49 +000011171$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011172
11173fi
11174
Michael W. Hudson54241132001-12-07 15:38:26 +000011175
Guido van Rossumda88dad1995-01-26 00:46:29 +000011176works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11178$as_echo_n "checking for working volatile... " >&6; }
11179cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011180/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011181
Martin v. Löwis11437992002-04-12 09:54:03 +000011182int
11183main ()
11184{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011185volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011186 ;
11187 return 0;
11188}
11189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011190if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011191 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011192else
Skip Montanaro6dead952003-09-25 14:50:04 +000011193
Matthias Kloseb9621712010-04-24 17:59:49 +000011194$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011195
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011196
Guido van Rossum627b2d71993-12-24 10:39:16 +000011197fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11200$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011201
Guido van Rossumda88dad1995-01-26 00:46:29 +000011202works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11204$as_echo_n "checking for working signed char... " >&6; }
11205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011206/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011207
Martin v. Löwis11437992002-04-12 09:54:03 +000011208int
11209main ()
11210{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011211signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011212 ;
11213 return 0;
11214}
11215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011216if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011217 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011218else
Skip Montanaro6dead952003-09-25 14:50:04 +000011219
Matthias Kloseb9621712010-04-24 17:59:49 +000011220$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011221
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011222
Guido van Rossum7f43da71994-08-01 12:15:30 +000011223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11226$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011227
Guido van Rossumda88dad1995-01-26 00:46:29 +000011228have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11230$as_echo_n "checking for prototypes... " >&6; }
11231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011232/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011233int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011234int
11235main ()
11236{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011237return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011238 ;
11239 return 0;
11240}
11241_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011242if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011243
Matthias Kloseb9621712010-04-24 17:59:49 +000011244$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011245
Matthias Kloseb159a552010-04-25 21:00:44 +000011246 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11250$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011251
Guido van Rossumda88dad1995-01-26 00:46:29 +000011252works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11254$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011256/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011257
11258#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011259int foo(int x, ...) {
11260 va_list va;
11261 va_start(va, x);
11262 va_arg(va, int);
11263 va_arg(va, char *);
11264 va_arg(va, double);
11265 return 0;
11266}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011267
Martin v. Löwis11437992002-04-12 09:54:03 +000011268int
11269main ()
11270{
Guido van Rossum90eea071996-08-30 20:58:57 +000011271return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011272 ;
11273 return 0;
11274}
11275_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011276if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011277
11278
Matthias Kloseb9621712010-04-24 17:59:49 +000011279$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011280
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011281 works=yes
11282
Guido van Rossum627b2d71993-12-24 10:39:16 +000011283fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11286$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011287
Martin v. Löwisd6320502004-08-12 13:45:08 +000011288# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11290$as_echo_n "checking for socketpair... " >&6; }
11291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011292/* end confdefs.h. */
11293
11294#include <sys/types.h>
11295#include <sys/socket.h>
11296
11297int
11298main ()
11299{
11300void *x=socketpair
11301 ;
11302 return 0;
11303}
11304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011305if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011306
Matthias Kloseb9621712010-04-24 17:59:49 +000011307$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011308
Matthias Kloseb159a552010-04-25 21:00:44 +000011309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011310$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011311else
Matthias Kloseb9621712010-04-24 17:59:49 +000011312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11313$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011314
11315fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011317
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011318# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11320$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011322/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011323#include <sys/types.h>
11324#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011325int
11326main ()
11327{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011328struct sockaddr x;
11329x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011330 ;
11331 return 0;
11332}
11333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011334if ac_fn_c_try_compile "$LINENO"; then :
11335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11336$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011337
Matthias Kloseb9621712010-04-24 17:59:49 +000011338$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011339
11340else
Matthias Kloseb9621712010-04-24 17:59:49 +000011341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11342$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011343
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011346
Guido van Rossumda88dad1995-01-26 00:46:29 +000011347va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11349$as_echo_n "checking whether va_list is an array... " >&6; }
11350cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011351/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011352
11353#ifdef HAVE_STDARG_PROTOTYPES
11354#include <stdarg.h>
11355#else
11356#include <varargs.h>
11357#endif
11358
Martin v. Löwis11437992002-04-12 09:54:03 +000011359int
11360main ()
11361{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011362va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011363 ;
11364 return 0;
11365}
11366_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011367if ac_fn_c_try_compile "$LINENO"; then :
11368
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011369else
Skip Montanaro6dead952003-09-25 14:50:04 +000011370
Martin v. Löwis11437992002-04-12 09:54:03 +000011371
Matthias Kloseb9621712010-04-24 17:59:49 +000011372$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011373
Guido van Rossumda88dad1995-01-26 00:46:29 +000011374 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011375
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11379$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011380
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011381# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011382
11383
Matthias Kloseb9621712010-04-24 17:59:49 +000011384ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011385if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011386
Matthias Kloseb9621712010-04-24 17:59:49 +000011387 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011388
Matthias Kloseb9621712010-04-24 17:59:49 +000011389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11390$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011391 OLD_CFLAGS=$CFLAGS
11392 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011394/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011395
11396# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011397
Martin v. Löwis11437992002-04-12 09:54:03 +000011398int
11399main ()
11400{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011401
11402 char *name;
11403 struct hostent *he, *res;
11404 char buffer[2048];
11405 int buflen = 2048;
11406 int h_errnop;
11407
11408 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011409
11410 ;
11411 return 0;
11412}
11413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011414if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011415
Matthias Kloseb9621712010-04-24 17:59:49 +000011416 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011417
Martin v. Löwis11437992002-04-12 09:54:03 +000011418
Matthias Kloseb9621712010-04-24 17:59:49 +000011419$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011420
Matthias Kloseb9621712010-04-24 17:59:49 +000011421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11422$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011423
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011424else
Skip Montanaro6dead952003-09-25 14:50:04 +000011425
Matthias Kloseb9621712010-04-24 17:59:49 +000011426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11427$as_echo "no" >&6; }
11428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11429$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011431/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011432
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011433# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011434
Martin v. Löwis11437992002-04-12 09:54:03 +000011435int
11436main ()
11437{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011438
11439 char *name;
11440 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011441 char buffer[2048];
11442 int buflen = 2048;
11443 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011444
Matthias Kloseb159a552010-04-25 21:00:44 +000011445 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011446
11447 ;
11448 return 0;
11449}
11450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011451if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011452
Matthias Kloseb9621712010-04-24 17:59:49 +000011453 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011454
Martin v. Löwis11437992002-04-12 09:54:03 +000011455
Matthias Kloseb159a552010-04-25 21:00:44 +000011456$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011457
Matthias Kloseb9621712010-04-24 17:59:49 +000011458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11459$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011460
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011461else
Skip Montanaro6dead952003-09-25 14:50:04 +000011462
Matthias Kloseb9621712010-04-24 17:59:49 +000011463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11464$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11466$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11468/* end confdefs.h. */
11469
11470# include <netdb.h>
11471
11472int
11473main ()
11474{
11475
11476 char *name;
11477 struct hostent *he;
11478 struct hostent_data data;
11479
11480 (void) gethostbyname_r(name, he, &data);
11481
11482 ;
11483 return 0;
11484}
11485_ACEOF
11486if ac_fn_c_try_compile "$LINENO"; then :
11487
11488 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11489
11490
11491$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11492
11493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11494$as_echo "yes" >&6; }
11495
11496else
11497
11498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11499$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011500
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011501fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011503
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011504fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011506
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011509 CFLAGS=$OLD_CFLAGS
11510
11511else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011512
Matthias Kloseb9621712010-04-24 17:59:49 +000011513 for ac_func in gethostbyname
11514do :
11515 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011516if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011517 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011518#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011519_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011520
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011521fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011522done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011523
Michael W. Hudson54241132001-12-07 15:38:26 +000011524
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011525fi
11526
Michael W. Hudson54241132001-12-07 15:38:26 +000011527
11528
11529
11530
11531
11532
Guido van Rossum627b2d71993-12-24 10:39:16 +000011533# checks for system services
11534# (none yet)
11535
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011536# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011537ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011538if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011539
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011540else
Matthias Kloseb9621712010-04-24 17:59:49 +000011541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11542$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011543if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011544 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011545else
Martin v. Löwis11437992002-04-12 09:54:03 +000011546 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011547LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011548cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011549/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011550
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011551/* Override any GCC internal prototype to avoid an error.
11552 Use char because int might match the return type of a GCC
11553 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011554#ifdef __cplusplus
11555extern "C"
11556#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011557char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011558int
11559main ()
11560{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011561return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011562 ;
11563 return 0;
11564}
11565_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011566if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011567 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011568else
Matthias Kloseb9621712010-04-24 17:59:49 +000011569 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011570fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011571rm -f core conftest.err conftest.$ac_objext \
11572 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011573LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011574fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11576$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011577if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011578 cat >>confdefs.h <<_ACEOF
11579#define HAVE_LIBIEEE 1
11580_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011581
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011582 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011583
Guido van Rossum627b2d71993-12-24 10:39:16 +000011584fi
11585
Michael W. Hudson54241132001-12-07 15:38:26 +000011586
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011587fi
11588
Michael W. Hudson54241132001-12-07 15:38:26 +000011589
Guido van Rossum7f253911997-05-09 02:42:48 +000011590# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11592$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011593
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011594# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011595if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011596 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011597if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011598then
11599
Matthias Kloseb9621712010-04-24 17:59:49 +000011600$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011601
Matthias Kloseb9621712010-04-24 17:59:49 +000011602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11603$as_echo "yes" >&6; }
11604else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11605$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011606fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011607else
Matthias Kloseb9621712010-04-24 17:59:49 +000011608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11609$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011610fi
11611
Guido van Rossum7f253911997-05-09 02:42:48 +000011612
Guido van Rossum7f43da71994-08-01 12:15:30 +000011613# check for --with-libm=...
11614
Guido van Rossum563e7081996-09-10 18:20:48 +000011615case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011616Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011617*) LIBM=-lm
11618esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11620$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011621
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011622# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011623if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011624 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011625if test "$withval" = no
11626then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11628$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011629elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011630then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11632$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011633else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011634fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011635else
Matthias Kloseb9621712010-04-24 17:59:49 +000011636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11637$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011638fi
11639
Guido van Rossum7f43da71994-08-01 12:15:30 +000011640
11641# check for --with-libc=...
11642
Matthias Kloseb9621712010-04-24 17:59:49 +000011643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11644$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011645
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011646# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011647if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011648 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011649if test "$withval" = no
11650then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11652$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011653elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011654then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11656$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011657else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011658fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011659else
Matthias Kloseb9621712010-04-24 17:59:49 +000011660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11661$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011662fi
11663
Guido van Rossum7f43da71994-08-01 12:15:30 +000011664
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011665# **************************************************
11666# * Check for various properties of floating point *
11667# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011668
Matthias Kloseb9621712010-04-24 17:59:49 +000011669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11670$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011671if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011672 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011673else
11674
Matthias Kloseb9621712010-04-24 17:59:49 +000011675if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011676 ac_cv_little_endian_double=no
11677else
Matthias Kloseb9621712010-04-24 17:59:49 +000011678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011679/* end confdefs.h. */
11680
11681#include <string.h>
11682int main() {
11683 double x = 9006104071832581.0;
11684 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11685 return 0;
11686 else
11687 return 1;
11688}
11689
11690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011691if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011692 ac_cv_little_endian_double=yes
11693else
Matthias Kloseb9621712010-04-24 17:59:49 +000011694 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011695fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011696rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11697 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011698fi
11699
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011700fi
11701
Matthias Kloseb9621712010-04-24 17:59:49 +000011702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11703$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011704if test "$ac_cv_little_endian_double" = yes
11705then
11706
Matthias Kloseb9621712010-04-24 17:59:49 +000011707$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011708
11709fi
11710
Matthias Kloseb9621712010-04-24 17:59:49 +000011711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11712$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011713if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011714 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011715else
11716
Matthias Kloseb9621712010-04-24 17:59:49 +000011717if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011718 ac_cv_big_endian_double=no
11719else
Matthias Kloseb9621712010-04-24 17:59:49 +000011720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011721/* end confdefs.h. */
11722
11723#include <string.h>
11724int main() {
11725 double x = 9006104071832581.0;
11726 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11727 return 0;
11728 else
11729 return 1;
11730}
11731
11732_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011733if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011734 ac_cv_big_endian_double=yes
11735else
Matthias Kloseb9621712010-04-24 17:59:49 +000011736 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011737fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011738rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11739 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011740fi
11741
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011742fi
11743
Matthias Kloseb9621712010-04-24 17:59:49 +000011744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11745$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011746if test "$ac_cv_big_endian_double" = yes
11747then
11748
Matthias Kloseb9621712010-04-24 17:59:49 +000011749$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011750
11751fi
11752
11753# Some ARM platforms use a mixed-endian representation for doubles.
11754# While Python doesn't currently have full support for these platforms
11755# (see e.g., issue 1762561), we can at least make sure that float <-> string
11756# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11758$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011759if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011760 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011761else
11762
Matthias Kloseb9621712010-04-24 17:59:49 +000011763if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011764 ac_cv_mixed_endian_double=no
11765else
Matthias Kloseb9621712010-04-24 17:59:49 +000011766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011767/* end confdefs.h. */
11768
11769#include <string.h>
11770int main() {
11771 double x = 9006104071832581.0;
11772 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11773 return 0;
11774 else
11775 return 1;
11776}
11777
11778_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011779if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011780 ac_cv_mixed_endian_double=yes
11781else
Matthias Kloseb9621712010-04-24 17:59:49 +000011782 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011783fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011784rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11785 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011786fi
11787
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011788fi
11789
Matthias Kloseb9621712010-04-24 17:59:49 +000011790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11791$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011792if test "$ac_cv_mixed_endian_double" = yes
11793then
11794
Matthias Kloseb9621712010-04-24 17:59:49 +000011795$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011796
11797fi
11798
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011799# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011800# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011801# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011802# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011803# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011804# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011805
11806# This inline assembler syntax may also work for suncc and icc,
11807# so we try it on all platforms.
11808
Matthias Kloseb9621712010-04-24 17:59:49 +000011809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11810$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011812/* end confdefs.h. */
11813
11814int
11815main ()
11816{
11817
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011818 unsigned short cw;
11819 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11820 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011821
11822 ;
11823 return 0;
11824}
11825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011826if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011827 have_gcc_asm_for_x87=yes
11828else
Matthias Kloseb9621712010-04-24 17:59:49 +000011829 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011830fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11833$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011834if test "$have_gcc_asm_for_x87" = yes
11835then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011836
Matthias Kloseb9621712010-04-24 17:59:49 +000011837$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011838
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011839fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011840
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011841# Detect whether system arithmetic is subject to x87-style double
11842# rounding issues. The result of this test has little meaning on non
11843# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11844# mode is round-to-nearest and double rounding issues are present, and
11845# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11847$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011848# $BASECFLAGS may affect the result
11849ac_save_cc="$CC"
11850CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011851if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011852 ac_cv_x87_double_rounding=no
11853else
Matthias Kloseb9621712010-04-24 17:59:49 +000011854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011855/* end confdefs.h. */
11856
11857#include <stdlib.h>
11858#include <math.h>
11859int main() {
11860 volatile double x, y, z;
11861 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11862 x = 0.99999999999999989; /* 1-2**-53 */
11863 y = 1./x;
11864 if (y != 1.)
11865 exit(0);
11866 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11867 x = 1e16;
11868 y = 2.99999;
11869 z = x + y;
11870 if (z != 1e16+4.)
11871 exit(0);
11872 /* both tests show evidence of double rounding */
11873 exit(1);
11874}
11875
11876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011877if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011878 ac_cv_x87_double_rounding=no
11879else
Matthias Kloseb9621712010-04-24 17:59:49 +000011880 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011881fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011882rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11883 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011884fi
11885
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011886CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11888$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011889if test "$ac_cv_x87_double_rounding" = yes
11890then
11891
Matthias Kloseb9621712010-04-24 17:59:49 +000011892$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011893
11894fi
11895
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011896# ************************************
11897# * Check for mathematical functions *
11898# ************************************
11899
11900LIBS_SAVE=$LIBS
11901LIBS="$LIBS $LIBM"
11902
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011903for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11904do :
11905 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11906ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011907if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011908 cat >>confdefs.h <<_ACEOF
11909#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11910_ACEOF
11911
11912fi
11913done
11914
Victor Stinner8f9f8d62011-05-09 12:45:41 +020011915for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011916do :
11917 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11918ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011919if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011920 cat >>confdefs.h <<_ACEOF
11921#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11922_ACEOF
11923
11924fi
11925done
11926
11927ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11928"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011929if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011930 ac_have_decl=1
11931else
11932 ac_have_decl=0
11933fi
11934
11935cat >>confdefs.h <<_ACEOF
11936#define HAVE_DECL_ISINF $ac_have_decl
11937_ACEOF
11938ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11939"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011940if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011941 ac_have_decl=1
11942else
11943 ac_have_decl=0
11944fi
11945
11946cat >>confdefs.h <<_ACEOF
11947#define HAVE_DECL_ISNAN $ac_have_decl
11948_ACEOF
11949ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11950"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011951if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011952 ac_have_decl=1
11953else
11954 ac_have_decl=0
11955fi
11956
11957cat >>confdefs.h <<_ACEOF
11958#define HAVE_DECL_ISFINITE $ac_have_decl
11959_ACEOF
11960
11961
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011962# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11963# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11965$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011966if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011967 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011968else
11969
Matthias Kloseb9621712010-04-24 17:59:49 +000011970if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011971 ac_cv_tanh_preserves_zero_sign=no
11972else
Matthias Kloseb9621712010-04-24 17:59:49 +000011973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011974/* end confdefs.h. */
11975
11976#include <math.h>
11977#include <stdlib.h>
11978int main() {
11979 /* return 0 if either negative zeros don't exist
11980 on this platform or if negative zeros exist
11981 and tanh(-0.) == -0. */
11982 if (atan2(0., -1.) == atan2(-0., -1.) ||
11983 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11984 else exit(1);
11985}
11986
11987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011988if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011989 ac_cv_tanh_preserves_zero_sign=yes
11990else
Matthias Kloseb9621712010-04-24 17:59:49 +000011991 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011992fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011993rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11994 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011995fi
11996
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011997fi
11998
Matthias Kloseb9621712010-04-24 17:59:49 +000011999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12000$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012001if test "$ac_cv_tanh_preserves_zero_sign" = yes
12002then
12003
Matthias Kloseb9621712010-04-24 17:59:49 +000012004$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012005
12006fi
12007
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012008if test "$ac_cv_func_log1p" = yes
12009then
12010 # On some versions of AIX, log1p(-0.) returns 0. instead of
12011 # -0. See issue #9920.
12012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12013$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012014 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012015 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012016else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012017
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012018 if test "$cross_compiling" = yes; then :
12019 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012020else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12022/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012023
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012024 #include <math.h>
12025 #include <stdlib.h>
12026 int main() {
12027 /* Fail if the signs of log1p(-0.) and -0. can be
12028 distinguished. */
12029 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12030 return 0;
12031 else
12032 return 1;
12033 }
12034
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012035_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012036if ac_fn_c_try_run "$LINENO"; then :
12037 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012038else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012039 ac_cv_log1p_drops_zero_sign=yes
12040fi
12041rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12042 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012043fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012044
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012045fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012046
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12048$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12049fi
12050if test "$ac_cv_log1p_drops_zero_sign" = yes
12051then
12052
12053$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12054
12055fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012056
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012057LIBS=$LIBS_SAVE
12058
Mark Dickinsona614f042009-11-28 12:48:43 +000012059# For multiprocessing module, check that sem_open
12060# actually works. For FreeBSD versions <= 7.2,
12061# the kernel module that provides POSIX semaphores
12062# isn't loaded by default, so an attempt to call
12063# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12065$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012066if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012067 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012068else
Matthias Kloseb9621712010-04-24 17:59:49 +000012069 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012070 ac_cv_posix_semaphores_enabled=yes
12071else
Matthias Kloseb9621712010-04-24 17:59:49 +000012072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012073/* end confdefs.h. */
12074
12075#include <unistd.h>
12076#include <fcntl.h>
12077#include <stdio.h>
12078#include <semaphore.h>
12079#include <sys/stat.h>
12080
12081int main(void) {
12082 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12083 if (a == SEM_FAILED) {
12084 perror("sem_open");
12085 return 1;
12086 }
12087 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012088 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012089 return 0;
12090}
12091
12092_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012093if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012094 ac_cv_posix_semaphores_enabled=yes
12095else
Matthias Kloseb9621712010-04-24 17:59:49 +000012096 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012097fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012098rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12099 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012100fi
12101
12102
Mark Dickinsona614f042009-11-28 12:48:43 +000012103fi
12104
Matthias Kloseb9621712010-04-24 17:59:49 +000012105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12106$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012107if test $ac_cv_posix_semaphores_enabled = no
12108then
12109
Matthias Kloseb9621712010-04-24 17:59:49 +000012110$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012111
12112fi
12113
Mark Dickinson10683072009-04-18 21:18:19 +000012114# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12116$as_echo_n "checking for broken sem_getvalue... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012117if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012118 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012119else
Matthias Kloseb9621712010-04-24 17:59:49 +000012120 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012121 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012122else
Matthias Kloseb9621712010-04-24 17:59:49 +000012123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012124/* end confdefs.h. */
12125
12126#include <unistd.h>
12127#include <fcntl.h>
12128#include <stdio.h>
12129#include <semaphore.h>
12130#include <sys/stat.h>
12131
12132int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012133 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012134 int count;
12135 int res;
12136 if(a==SEM_FAILED){
12137 perror("sem_open");
12138 return 1;
12139
12140 }
12141 res = sem_getvalue(a, &count);
12142 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012143 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012144 return res==-1 ? 1 : 0;
12145}
12146
Mark Dickinson10683072009-04-18 21:18:19 +000012147_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012148if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012149 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012150else
Matthias Kloseb9621712010-04-24 17:59:49 +000012151 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012152fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012153rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12154 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012155fi
12156
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012157
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012158fi
12159
Matthias Kloseb9621712010-04-24 17:59:49 +000012160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12161$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012162if test $ac_cv_broken_sem_getvalue = yes
12163then
12164
Matthias Kloseb9621712010-04-24 17:59:49 +000012165$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012166
12167fi
12168
Mark Dickinsonbd792642009-03-18 20:06:12 +000012169# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12171$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012172# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012173if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012174 enableval=$enable_big_digits; case $enable_big_digits in
12175yes)
12176 enable_big_digits=30 ;;
12177no)
12178 enable_big_digits=15 ;;
1217915|30)
12180 ;;
12181*)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012182 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 +000012183esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12185$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012186
12187cat >>confdefs.h <<_ACEOF
12188#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12189_ACEOF
12190
12191
12192else
Matthias Kloseb9621712010-04-24 17:59:49 +000012193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12194$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012195fi
12196
12197
Guido van Rossumef2255b2000-03-10 22:30:29 +000012198# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012199ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012200if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012201
12202
Matthias Kloseb9621712010-04-24 17:59:49 +000012203$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012204
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012205 wchar_h="yes"
12206
Guido van Rossumef2255b2000-03-10 22:30:29 +000012207else
Martin v. Löwis11437992002-04-12 09:54:03 +000012208 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012209
12210fi
12211
Michael W. Hudson54241132001-12-07 15:38:26 +000012212
Martin v. Löwis11437992002-04-12 09:54:03 +000012213
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012214# determine wchar_t size
12215if test "$wchar_h" = yes
12216then
Matthias Kloseb9621712010-04-24 17:59:49 +000012217 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012218# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12219# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12220# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12222$as_echo_n "checking size of wchar_t... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012223if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012224 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012225else
Matthias Kloseb9621712010-04-24 17:59:49 +000012226 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12227"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012228
Martin v. Löwis11437992002-04-12 09:54:03 +000012229else
Matthias Kloseb9621712010-04-24 17:59:49 +000012230 if test "$ac_cv_type_wchar_t" = yes; then
12231 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12232$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012233as_fn_error 77 "cannot compute sizeof (wchar_t)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012234See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012235 else
12236 ac_cv_sizeof_wchar_t=0
12237 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012239
Martin v. Löwis11437992002-04-12 09:54:03 +000012240fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12242$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012243
12244
12245
Martin v. Löwis11437992002-04-12 09:54:03 +000012246cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012247#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012248_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012249
Michael W. Hudson54241132001-12-07 15:38:26 +000012250
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012251fi
12252
Matthias Kloseb9621712010-04-24 17:59:49 +000012253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12254$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012255have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012257/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012258
12259#include <tcl.h>
12260#if TCL_UTF_MAX != 6
12261# error "NOT UCS4_TCL"
12262#endif
12263int
12264main ()
12265{
12266
12267 ;
12268 return 0;
12269}
12270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012271if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012272
12273
Matthias Kloseb9621712010-04-24 17:59:49 +000012274$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012275
12276 have_ucs4_tcl=yes
12277
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012278fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12281$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012282
Skip Montanaro6dead952003-09-25 14:50:04 +000012283# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012284if test "$wchar_h" = yes
12285then
12286 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12288$as_echo_n "checking whether wchar_t is signed... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012289 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012290 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012291else
12292
Matthias Kloseb9621712010-04-24 17:59:49 +000012293 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012294 ac_cv_wchar_t_signed=yes
12295else
Matthias Kloseb9621712010-04-24 17:59:49 +000012296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012297/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012298
12299 #include <wchar.h>
12300 int main()
12301 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012302 /* Success: exit code 0 */
12303 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012304 }
12305
12306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012307if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012308 ac_cv_wchar_t_signed=yes
12309else
Matthias Kloseb9621712010-04-24 17:59:49 +000012310 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012311fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012312rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12313 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012314fi
12315
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012316fi
12317
Matthias Kloseb9621712010-04-24 17:59:49 +000012318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12319$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012320fi
12321
Matthias Kloseb9621712010-04-24 17:59:49 +000012322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12323$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012324
12325# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012326if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012327 withval=$with_wide_unicode;
12328if test "$withval" != no
12329then unicode_size="4"
12330else unicode_size="2"
12331fi
12332
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012333else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012334
Georg Brandl52d168a2008-01-07 18:10:24 +000012335case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012336 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012337 *) unicode_size="2" ;;
12338esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012339
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012340fi
12341
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012342
12343
Georg Brandl52d168a2008-01-07 18:10:24 +000012344case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012345 4)
12346 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12347
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012348 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012349 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012350 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012351 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012352esac
12353
Michael W. Hudson54241132001-12-07 15:38:26 +000012354
Martin v. Löwis11437992002-04-12 09:54:03 +000012355
Georg Brandl52d168a2008-01-07 18:10:24 +000012356# wchar_t is only usable if it maps to an unsigned type
12357if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012358 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012359then
12360 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012361
Matthias Kloseb9621712010-04-24 17:59:49 +000012362$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012363
Matthias Kloseb9621712010-04-24 17:59:49 +000012364 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012365
Georg Brandl52d168a2008-01-07 18:10:24 +000012366elif test "$ac_cv_sizeof_short" = "$unicode_size"
12367then
12368 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012369 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012370
Georg Brandl52d168a2008-01-07 18:10:24 +000012371elif test "$ac_cv_sizeof_long" = "$unicode_size"
12372then
12373 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012374 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012375
Georg Brandl52d168a2008-01-07 18:10:24 +000012376else
12377 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012378fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12380$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012381
12382# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12384$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012385if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012386 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012387else
Matthias Kloseb9621712010-04-24 17:59:49 +000012388 ac_cv_c_bigendian=unknown
12389 # See if we're dealing with a universal compiler.
12390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12391/* end confdefs.h. */
12392#ifndef __APPLE_CC__
12393 not a universal capable compiler
12394 #endif
12395 typedef int dummy;
12396
Skip Montanaro6dead952003-09-25 14:50:04 +000012397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012398if ac_fn_c_try_compile "$LINENO"; then :
12399
12400 # Check for potential -arch flags. It is not universal unless
12401 # there are at least two -arch flags with different values.
12402 ac_arch=
12403 ac_prev=
12404 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12405 if test -n "$ac_prev"; then
12406 case $ac_word in
12407 i?86 | x86_64 | ppc | ppc64)
12408 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12409 ac_arch=$ac_word
12410 else
12411 ac_cv_c_bigendian=universal
12412 break
12413 fi
12414 ;;
12415 esac
12416 ac_prev=
12417 elif test "x$ac_word" = "x-arch"; then
12418 ac_prev=arch
12419 fi
12420 done
12421fi
12422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12423 if test $ac_cv_c_bigendian = unknown; then
12424 # See if sys/param.h defines the BYTE_ORDER macro.
12425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012426/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012427#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012428 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012429
Martin v. Löwis11437992002-04-12 09:54:03 +000012430int
12431main ()
12432{
Matthias Kloseb9621712010-04-24 17:59:49 +000012433#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12434 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12435 && LITTLE_ENDIAN)
12436 bogus endian macros
12437 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012438
12439 ;
12440 return 0;
12441}
12442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012443if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012444 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012446/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012447#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012448 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012449
Martin v. Löwis11437992002-04-12 09:54:03 +000012450int
12451main ()
12452{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012453#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012454 not big endian
12455 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012456
12457 ;
12458 return 0;
12459}
12460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012461if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012462 ac_cv_c_bigendian=yes
12463else
Matthias Kloseb9621712010-04-24 17:59:49 +000012464 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012465fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012467fi
12468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12469 fi
12470 if test $ac_cv_c_bigendian = unknown; then
12471 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012473/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012474#include <limits.h>
12475
Martin v. Löwis11437992002-04-12 09:54:03 +000012476int
12477main ()
12478{
Matthias Kloseb9621712010-04-24 17:59:49 +000012479#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12480 bogus endian macros
12481 #endif
12482
Martin v. Löwis11437992002-04-12 09:54:03 +000012483 ;
12484 return 0;
12485}
12486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012487if ac_fn_c_try_compile "$LINENO"; then :
12488 # It does; now see whether it defined to _BIG_ENDIAN or not.
12489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12490/* end confdefs.h. */
12491#include <limits.h>
12492
12493int
12494main ()
12495{
12496#ifndef _BIG_ENDIAN
12497 not big endian
12498 #endif
12499
12500 ;
12501 return 0;
12502}
12503_ACEOF
12504if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012505 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012506else
Matthias Kloseb9621712010-04-24 17:59:49 +000012507 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012508fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12510fi
12511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12512 fi
12513 if test $ac_cv_c_bigendian = unknown; then
12514 # Compile a test program.
12515 if test "$cross_compiling" = yes; then :
12516 # Try to guess by grepping values from an object file.
12517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12518/* end confdefs.h. */
12519short int ascii_mm[] =
12520 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12521 short int ascii_ii[] =
12522 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12523 int use_ascii (int i) {
12524 return ascii_mm[i] + ascii_ii[i];
12525 }
12526 short int ebcdic_ii[] =
12527 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12528 short int ebcdic_mm[] =
12529 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12530 int use_ebcdic (int i) {
12531 return ebcdic_mm[i] + ebcdic_ii[i];
12532 }
12533 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012534
Matthias Kloseb9621712010-04-24 17:59:49 +000012535int
12536main ()
12537{
12538return use_ascii (foo) == use_ebcdic (foo);
12539 ;
12540 return 0;
12541}
12542_ACEOF
12543if ac_fn_c_try_compile "$LINENO"; then :
12544 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12545 ac_cv_c_bigendian=yes
12546 fi
12547 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12548 if test "$ac_cv_c_bigendian" = unknown; then
12549 ac_cv_c_bigendian=no
12550 else
12551 # finding both strings is unlikely to happen, but who knows?
12552 ac_cv_c_bigendian=unknown
12553 fi
12554 fi
12555fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012557else
Matthias Kloseb9621712010-04-24 17:59:49 +000012558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012559/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012560$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012561int
12562main ()
12563{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012564
Matthias Kloseb9621712010-04-24 17:59:49 +000012565 /* Are we little or big endian? From Harbison&Steele. */
12566 union
12567 {
12568 long int l;
12569 char c[sizeof (long int)];
12570 } u;
12571 u.l = 1;
12572 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012573
12574 ;
12575 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012576}
Martin v. Löwis11437992002-04-12 09:54:03 +000012577_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012578if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012579 ac_cv_c_bigendian=no
12580else
Matthias Kloseb9621712010-04-24 17:59:49 +000012581 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012582fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012583rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12584 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012585fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012586
Matthias Kloseb9621712010-04-24 17:59:49 +000012587 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012588fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12590$as_echo "$ac_cv_c_bigendian" >&6; }
12591 case $ac_cv_c_bigendian in #(
12592 yes)
12593 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12594;; #(
12595 no)
12596 ;; #(
12597 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012598
Matthias Kloseb9621712010-04-24 17:59:49 +000012599$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012600
Matthias Kloseb9621712010-04-24 17:59:49 +000012601 ;; #(
12602 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012603 as_fn_error $? "unknown endianness
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012604 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012605 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012606
Michael W. Hudson54241132001-12-07 15:38:26 +000012607
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012608# ABI version string for Python extension modules. This appears between the
12609# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12610# from the following attributes which affect the ABI of this Python build (in
12611# this order):
12612#
12613# * The Python implementation (always 'cpython-' for us)
12614# * The major and minor version numbers
12615# * --with-pydebug (adds a 'd')
12616# * --with-pymalloc (adds a 'm')
12617# * --with-wide-unicode (adds a 'u')
12618#
12619# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012620# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12621# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012622
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12624$as_echo_n "checking ABIFLAGS... " >&6; }
12625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12626$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12628$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012629SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12631$as_echo "$SOABI" >&6; }
12632
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12634$as_echo_n "checking LDVERSION... " >&6; }
12635LDVERSION='$(VERSION)$(ABIFLAGS)'
12636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12637$as_echo "$LDVERSION" >&6; }
12638
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012639# SO is the extension of shared libraries `(including the dot!)
12640# -- usually .so, .sl on HP-UX, .dll on Cygwin
12641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12642$as_echo_n "checking SO... " >&6; }
12643if test -z "$SO"
12644then
12645 case $ac_sys_system in
12646 hp*|HP*)
12647 case `uname -m` in
12648 ia64) SO=.so;;
12649 *) SO=.sl;;
12650 esac
12651 ;;
12652 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012653 Linux*|GNU*)
12654 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012655 *) SO=.so;;
12656 esac
12657else
12658 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012659 echo
12660 echo '====================================================================='
12661 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012662 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012663 echo '+ Do you really mean to change the extension for shared libraries? +'
12664 echo '+ Continuing in 10 seconds to let you to ponder. +'
12665 echo '+ +'
12666 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012667 sleep 10
12668fi
12669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12670$as_echo "$SO" >&6; }
12671
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012672# Check whether right shifting a negative integer extends the sign bit
12673# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12675$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012676if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012677 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012678else
Martin v. Löwis11437992002-04-12 09:54:03 +000012679
Matthias Kloseb9621712010-04-24 17:59:49 +000012680if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012681 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012682else
Matthias Kloseb9621712010-04-24 17:59:49 +000012683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012684/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012685
12686int main()
12687{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012688 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012689}
12690
Martin v. Löwis11437992002-04-12 09:54:03 +000012691_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012692if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012693 ac_cv_rshift_extends_sign=yes
12694else
Matthias Kloseb9621712010-04-24 17:59:49 +000012695 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012696fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012697rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12698 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012699fi
12700
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012701fi
12702
Matthias Kloseb9621712010-04-24 17:59:49 +000012703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12704$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012705if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012706then
Martin v. Löwis11437992002-04-12 09:54:03 +000012707
Matthias Kloseb9621712010-04-24 17:59:49 +000012708$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012709
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012710fi
12711
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012712# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12714$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012715if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012716 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012717else
Martin v. Löwis11437992002-04-12 09:54:03 +000012718
Matthias Kloseb9621712010-04-24 17:59:49 +000012719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012720/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012721#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012722int
12723main ()
12724{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012725
12726 FILE *f = fopen("/dev/null", "r");
12727 flockfile(f);
12728 getc_unlocked(f);
12729 funlockfile(f);
12730
Martin v. Löwis11437992002-04-12 09:54:03 +000012731 ;
12732 return 0;
12733}
12734_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012735if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012736 ac_cv_have_getc_unlocked=yes
12737else
Matthias Kloseb9621712010-04-24 17:59:49 +000012738 ac_cv_have_getc_unlocked=no
12739fi
12740rm -f core conftest.err conftest.$ac_objext \
12741 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012742fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012743
Matthias Kloseb9621712010-04-24 17:59:49 +000012744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12745$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012746if test "$ac_cv_have_getc_unlocked" = yes
12747then
Martin v. Löwis11437992002-04-12 09:54:03 +000012748
Matthias Kloseb9621712010-04-24 17:59:49 +000012749$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012750
12751fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012752
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012753# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012754# save the value of LIBS so we don't actually link Python with readline
12755LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012756
Gregory P. Smith18820942008-09-07 06:24:49 +000012757# On some systems we need to link readline to a termcap compatible
12758# library. NOTE: Keep the precedence of listed libraries synchronised
12759# with setup.py.
12760py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12762$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012763for py_libtermcap in "" ncursesw ncurses curses termcap; do
12764 if test -z "$py_libtermcap"; then
12765 READLINE_LIBS="-lreadline"
12766 else
12767 READLINE_LIBS="-lreadline -l$py_libtermcap"
12768 fi
12769 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012771/* end confdefs.h. */
12772
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012773/* Override any GCC internal prototype to avoid an error.
12774 Use char because int might match the return type of a GCC
12775 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012776#ifdef __cplusplus
12777extern "C"
12778#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012779char readline ();
12780int
12781main ()
12782{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012783return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012784 ;
12785 return 0;
12786}
12787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012788if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012789 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012790fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012791rm -f core conftest.err conftest.$ac_objext \
12792 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012793 if test $py_cv_lib_readline = yes; then
12794 break
12795 fi
12796done
12797# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12798#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012799if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12801$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012802else
Matthias Kloseb9621712010-04-24 17:59:49 +000012803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12804$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012805
Matthias Kloseb9621712010-04-24 17:59:49 +000012806$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012807
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012808fi
12809
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012810# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12812$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012813if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012814 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012815else
12816 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012817LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012819/* end confdefs.h. */
12820
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012821/* Override any GCC internal prototype to avoid an error.
12822 Use char because int might match the return type of a GCC
12823 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012824#ifdef __cplusplus
12825extern "C"
12826#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012827char rl_callback_handler_install ();
12828int
12829main ()
12830{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012831return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012832 ;
12833 return 0;
12834}
12835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012836if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012837 ac_cv_lib_readline_rl_callback_handler_install=yes
12838else
Matthias Kloseb9621712010-04-24 17:59:49 +000012839 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012840fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012841rm -f core conftest.err conftest.$ac_objext \
12842 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012843LIBS=$ac_check_lib_save_LIBS
12844fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12846$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012847if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012848
Matthias Kloseb9621712010-04-24 17:59:49 +000012849$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012850
12851fi
12852
12853
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012854# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012856/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012857#include <readline/readline.h>
12858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012859if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012860 have_readline=yes
12861else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012862 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012863
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012864fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012865rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012866if test $have_readline = yes
12867then
Matthias Kloseb9621712010-04-24 17:59:49 +000012868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012869/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012870#include <readline/readline.h>
12871
12872_ACEOF
12873if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012874 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012875
Matthias Kloseb9621712010-04-24 17:59:49 +000012876$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012877
12878fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012879rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012880
Matthias Kloseb9621712010-04-24 17:59:49 +000012881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012882/* end confdefs.h. */
12883#include <readline/readline.h>
12884
12885_ACEOF
12886if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012887 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012888
Matthias Kloseb9621712010-04-24 17:59:49 +000012889$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012890
12891fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012892rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012893
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012894fi
12895
Martin v. Löwis0daad592001-09-30 21:09:59 +000012896# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12898$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012899if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012900 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012901else
Martin v. Löwis11437992002-04-12 09:54:03 +000012902 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012903LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012905/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012906
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012907/* Override any GCC internal prototype to avoid an error.
12908 Use char because int might match the return type of a GCC
12909 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012910#ifdef __cplusplus
12911extern "C"
12912#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012913char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012914int
12915main ()
12916{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012917return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012918 ;
12919 return 0;
12920}
12921_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012922if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012923 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012924else
Matthias Kloseb9621712010-04-24 17:59:49 +000012925 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012926fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012927rm -f core conftest.err conftest.$ac_objext \
12928 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012929LIBS=$ac_check_lib_save_LIBS
12930fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12932$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012933if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012934
Matthias Kloseb9621712010-04-24 17:59:49 +000012935$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012936
Martin v. Löwis0daad592001-09-30 21:09:59 +000012937fi
12938
Michael W. Hudson54241132001-12-07 15:38:26 +000012939
Thomas Wouters89d996e2007-09-08 17:39:28 +000012940# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12942$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012943if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012944 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012945else
12946 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012947LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012949/* end confdefs.h. */
12950
12951/* Override any GCC internal prototype to avoid an error.
12952 Use char because int might match the return type of a GCC
12953 builtin and then its argument prototype would still apply. */
12954#ifdef __cplusplus
12955extern "C"
12956#endif
12957char rl_completion_display_matches_hook ();
12958int
12959main ()
12960{
12961return rl_completion_display_matches_hook ();
12962 ;
12963 return 0;
12964}
12965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012966if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012967 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12968else
Matthias Kloseb9621712010-04-24 17:59:49 +000012969 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012970fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012971rm -f core conftest.err conftest.$ac_objext \
12972 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012973LIBS=$ac_check_lib_save_LIBS
12974fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12976$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012977if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012978
Matthias Kloseb9621712010-04-24 17:59:49 +000012979$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012980
12981fi
12982
12983
Martin v. Löwis0daad592001-09-30 21:09:59 +000012984# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12986$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012987if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012988 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012989else
Martin v. Löwis11437992002-04-12 09:54:03 +000012990 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012991LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012993/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012994
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012995/* Override any GCC internal prototype to avoid an error.
12996 Use char because int might match the return type of a GCC
12997 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012998#ifdef __cplusplus
12999extern "C"
13000#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013001char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013002int
13003main ()
13004{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013005return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013006 ;
13007 return 0;
13008}
13009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013010if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013011 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013012else
Matthias Kloseb9621712010-04-24 17:59:49 +000013013 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013014fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013015rm -f core conftest.err conftest.$ac_objext \
13016 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013017LIBS=$ac_check_lib_save_LIBS
13018fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13020$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013021if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013022
Matthias Kloseb9621712010-04-24 17:59:49 +000013023$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013024
Guido van Rossum353ae582001-07-10 16:45:32 +000013025fi
13026
Jack Jansendd19cf82001-12-06 22:36:17 +000013027
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013028# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013030/* end confdefs.h. */
13031#include <readline/readline.h>
13032_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013033if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013034 have_readline=yes
13035else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013036 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013037
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013038fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013039rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013040if test $have_readline = yes
13041then
Matthias Kloseb9621712010-04-24 17:59:49 +000013042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013043/* end confdefs.h. */
13044#include <readline/readline.h>
13045
13046_ACEOF
13047if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013048 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013049
Matthias Kloseb9621712010-04-24 17:59:49 +000013050$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013051
13052fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013053rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013054
13055fi
13056
Martin v. Löwis82bca632006-02-10 20:49:30 +000013057# End of readline checks: restore LIBS
13058LIBS=$LIBS_no_readline
13059
Matthias Kloseb9621712010-04-24 17:59:49 +000013060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13061$as_echo_n "checking for broken nice()... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013062if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013063 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013064else
Martin v. Löwis11437992002-04-12 09:54:03 +000013065
Matthias Kloseb9621712010-04-24 17:59:49 +000013066if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013067 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013068else
Matthias Kloseb9621712010-04-24 17:59:49 +000013069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013070/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013071
13072int main()
13073{
13074 int val1 = nice(1);
13075 if (val1 != -1 && val1 == nice(2))
13076 exit(0);
13077 exit(1);
13078}
13079
Martin v. Löwis11437992002-04-12 09:54:03 +000013080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013081if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013082 ac_cv_broken_nice=yes
13083else
Matthias Kloseb9621712010-04-24 17:59:49 +000013084 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013085fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013086rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13087 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013088fi
13089
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013090fi
13091
Matthias Kloseb9621712010-04-24 17:59:49 +000013092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13093$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013094if test "$ac_cv_broken_nice" = yes
13095then
Martin v. Löwis11437992002-04-12 09:54:03 +000013096
Matthias Kloseb9621712010-04-24 17:59:49 +000013097$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013098
13099fi
13100
Matthias Kloseb9621712010-04-24 17:59:49 +000013101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13102$as_echo_n "checking for broken poll()... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013103if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013104 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013105else
Matthias Kloseb9621712010-04-24 17:59:49 +000013106 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013107 ac_cv_broken_poll=no
13108else
Matthias Kloseb9621712010-04-24 17:59:49 +000013109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013110/* end confdefs.h. */
13111
13112#include <poll.h>
13113
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013114int main()
13115{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013116 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013117 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013118
13119 close (42);
13120
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013121 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013122 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013123 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013124 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013125 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013126 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013127 return 1;
13128}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013129
13130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013131if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013132 ac_cv_broken_poll=yes
13133else
Matthias Kloseb9621712010-04-24 17:59:49 +000013134 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013135fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013136rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13137 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013138fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013139
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013140fi
13141
Matthias Kloseb9621712010-04-24 17:59:49 +000013142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13143$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013144if test "$ac_cv_broken_poll" = yes
13145then
13146
Matthias Kloseb9621712010-04-24 17:59:49 +000013147$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013148
13149fi
13150
Brett Cannon43802422005-02-10 20:48:03 +000013151# 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 +000013152# (which is not required by ISO C or UNIX spec) and/or if we support
13153# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013154ac_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 +000013155#include <$ac_cv_struct_tm>
13156
Matthias Kloseb9621712010-04-24 17:59:49 +000013157"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013158if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013159
13160cat >>confdefs.h <<_ACEOF
13161#define HAVE_STRUCT_TM_TM_ZONE 1
13162_ACEOF
13163
13164
13165fi
13166
13167if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13168
Matthias Kloseb9621712010-04-24 17:59:49 +000013169$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013170
13171else
Matthias Kloseb9621712010-04-24 17:59:49 +000013172 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13173"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013174if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013175 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013176else
Matthias Kloseb9621712010-04-24 17:59:49 +000013177 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013178fi
13179
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013180cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013181#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013182_ACEOF
13183
Matthias Kloseb9621712010-04-24 17:59:49 +000013184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13185$as_echo_n "checking for tzname... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013186if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013187 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013188else
Matthias Kloseb9621712010-04-24 17:59:49 +000013189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013190/* end confdefs.h. */
13191#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013192#if !HAVE_DECL_TZNAME
13193extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013194#endif
13195
13196int
13197main ()
13198{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013199return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013200 ;
13201 return 0;
13202}
13203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013204if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013205 ac_cv_var_tzname=yes
13206else
Matthias Kloseb9621712010-04-24 17:59:49 +000013207 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013208fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013209rm -f core conftest.err conftest.$ac_objext \
13210 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013211fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13213$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013214 if test $ac_cv_var_tzname = yes; then
13215
Matthias Kloseb9621712010-04-24 17:59:49 +000013216$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013217
13218 fi
13219fi
13220
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013221
Martin v. Löwis1d459062005-03-14 21:23:33 +000013222# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13224$as_echo_n "checking for working tzset()... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013225if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013226 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013227else
13228
Matthias Kloseb9621712010-04-24 17:59:49 +000013229if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013230 ac_cv_working_tzset=no
13231else
Matthias Kloseb9621712010-04-24 17:59:49 +000013232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013233/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013234
13235#include <stdlib.h>
13236#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013237#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013238
13239#if HAVE_TZNAME
13240extern char *tzname[];
13241#endif
13242
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013243int main()
13244{
Brett Cannon18367812003-09-19 00:59:16 +000013245 /* Note that we need to ensure that not only does tzset(3)
13246 do 'something' with localtime, but it works as documented
13247 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013248 This includes making sure that tzname is set properly if
13249 tm->tm_zone does not exist since it is the alternative way
13250 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013251
13252 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013253 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013254 */
13255
Martin v. Löwis1d459062005-03-14 21:23:33 +000013256 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013257 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13258
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013259 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013260 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013261 if (localtime(&groundhogday)->tm_hour != 0)
13262 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013263#if HAVE_TZNAME
13264 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13265 if (strcmp(tzname[0], "UTC") ||
13266 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13267 exit(1);
13268#endif
Brett Cannon18367812003-09-19 00:59:16 +000013269
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013270 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013271 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013272 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013273 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013274#if HAVE_TZNAME
13275 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13276 exit(1);
13277#endif
Brett Cannon18367812003-09-19 00:59:16 +000013278
13279 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13280 tzset();
13281 if (localtime(&groundhogday)->tm_hour != 11)
13282 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013283#if HAVE_TZNAME
13284 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13285 exit(1);
13286#endif
13287
13288#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013289 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13290 exit(1);
13291 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13292 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013293#endif
Brett Cannon18367812003-09-19 00:59:16 +000013294
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013295 exit(0);
13296}
13297
13298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013299if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013300 ac_cv_working_tzset=yes
13301else
Matthias Kloseb9621712010-04-24 17:59:49 +000013302 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013303fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013304rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13305 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013306fi
13307
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013308fi
13309
Matthias Kloseb9621712010-04-24 17:59:49 +000013310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13311$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013312if test "$ac_cv_working_tzset" = yes
13313then
13314
Matthias Kloseb9621712010-04-24 17:59:49 +000013315$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013316
13317fi
13318
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013319# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13321$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013322if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013323 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013324else
Matthias Kloseb9621712010-04-24 17:59:49 +000013325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013326/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013327#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013328int
13329main ()
13330{
13331
13332struct stat st;
13333st.st_mtim.tv_nsec = 1;
13334
13335 ;
13336 return 0;
13337}
13338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013339if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013340 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013341else
Matthias Kloseb9621712010-04-24 17:59:49 +000013342 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13345fi
13346
Matthias Kloseb9621712010-04-24 17:59:49 +000013347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13348$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013349if test "$ac_cv_stat_tv_nsec" = yes
13350then
13351
Matthias Kloseb9621712010-04-24 17:59:49 +000013352$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013353
13354fi
13355
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013356# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13358$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013359if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013360 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013361else
Matthias Kloseb9621712010-04-24 17:59:49 +000013362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013363/* end confdefs.h. */
13364#include <sys/stat.h>
13365int
13366main ()
13367{
13368
13369struct stat st;
13370st.st_mtimespec.tv_nsec = 1;
13371
13372 ;
13373 return 0;
13374}
13375_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013376if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013377 ac_cv_stat_tv_nsec2=yes
13378else
Matthias Kloseb9621712010-04-24 17:59:49 +000013379 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13382fi
13383
Matthias Kloseb9621712010-04-24 17:59:49 +000013384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13385$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013386if test "$ac_cv_stat_tv_nsec2" = yes
13387then
13388
Matthias Kloseb9621712010-04-24 17:59:49 +000013389$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013390
13391fi
13392
Jack Jansen666b1e72001-10-31 12:11:48 +000013393# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13395$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013396if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013397 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013398else
Matthias Kloseb9621712010-04-24 17:59:49 +000013399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013400/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013401#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013402int
13403main ()
13404{
Jack Jansen666b1e72001-10-31 12:11:48 +000013405
13406 int rtn;
13407 rtn = mvwdelch(0,0,0);
13408
Martin v. Löwis11437992002-04-12 09:54:03 +000013409 ;
13410 return 0;
13411}
13412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013413if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013414 ac_cv_mvwdelch_is_expression=yes
13415else
Matthias Kloseb9621712010-04-24 17:59:49 +000013416 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13419fi
13420
Matthias Kloseb9621712010-04-24 17:59:49 +000013421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13422$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013423
13424if test "$ac_cv_mvwdelch_is_expression" = yes
13425then
Martin v. Löwis11437992002-04-12 09:54:03 +000013426
Matthias Kloseb9621712010-04-24 17:59:49 +000013427$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013428
13429fi
13430
Matthias Kloseb9621712010-04-24 17:59:49 +000013431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13432$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013433if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013434 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013435else
Matthias Kloseb9621712010-04-24 17:59:49 +000013436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013437/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013438#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013439int
13440main ()
13441{
Jack Jansen666b1e72001-10-31 12:11:48 +000013442
13443 WINDOW *w;
13444 w->_flags = 0;
13445
Martin v. Löwis11437992002-04-12 09:54:03 +000013446 ;
13447 return 0;
13448}
13449_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013450if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013451 ac_cv_window_has_flags=yes
13452else
Matthias Kloseb9621712010-04-24 17:59:49 +000013453 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013454fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13456fi
13457
Matthias Kloseb9621712010-04-24 17:59:49 +000013458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13459$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013460
Jack Jansen666b1e72001-10-31 12:11:48 +000013461
13462if test "$ac_cv_window_has_flags" = yes
13463then
Martin v. Löwis11437992002-04-12 09:54:03 +000013464
Matthias Kloseb9621712010-04-24 17:59:49 +000013465$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013466
13467fi
13468
Matthias Kloseb9621712010-04-24 17:59:49 +000013469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13470$as_echo_n "checking for is_term_resized... " >&6; }
13471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013472/* end confdefs.h. */
13473#include <curses.h>
13474int
13475main ()
13476{
13477void *x=is_term_resized
13478 ;
13479 return 0;
13480}
13481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013482if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013483
Matthias Kloseb9621712010-04-24 17:59:49 +000013484$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013485
Matthias Kloseb159a552010-04-25 21:00:44 +000013486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013487$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013488else
Matthias Kloseb9621712010-04-24 17:59:49 +000013489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13490$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013491
13492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13494
Matthias Kloseb9621712010-04-24 17:59:49 +000013495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13496$as_echo_n "checking for resize_term... " >&6; }
13497cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013498/* end confdefs.h. */
13499#include <curses.h>
13500int
13501main ()
13502{
13503void *x=resize_term
13504 ;
13505 return 0;
13506}
13507_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013508if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013509
Matthias Kloseb9621712010-04-24 17:59:49 +000013510$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013511
Matthias Kloseb159a552010-04-25 21:00:44 +000013512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013513$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013514else
Matthias Kloseb9621712010-04-24 17:59:49 +000013515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13516$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013517
13518fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13520
Matthias Kloseb9621712010-04-24 17:59:49 +000013521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13522$as_echo_n "checking for resizeterm... " >&6; }
13523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013524/* end confdefs.h. */
13525#include <curses.h>
13526int
13527main ()
13528{
13529void *x=resizeterm
13530 ;
13531 return 0;
13532}
13533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013534if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013535
Matthias Kloseb9621712010-04-24 17:59:49 +000013536$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013537
Matthias Kloseb159a552010-04-25 21:00:44 +000013538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013539$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013540else
Matthias Kloseb9621712010-04-24 17:59:49 +000013541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13542$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013543
13544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13546
Matthias Kloseb9621712010-04-24 17:59:49 +000013547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13548$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013549
13550if test -r /dev/ptmx
13551then
Matthias Kloseb9621712010-04-24 17:59:49 +000013552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13553$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013554
Matthias Kloseb9621712010-04-24 17:59:49 +000013555$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013556
Thomas Wouters89f507f2006-12-13 04:49:30 +000013557else
Matthias Kloseb9621712010-04-24 17:59:49 +000013558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13559$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013560fi
13561
Matthias Kloseb9621712010-04-24 17:59:49 +000013562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13563$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013564
13565if test -r /dev/ptc
13566then
Matthias Kloseb9621712010-04-24 17:59:49 +000013567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13568$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013569
Matthias Kloseb9621712010-04-24 17:59:49 +000013570$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013571
Thomas Wouters89f507f2006-12-13 04:49:30 +000013572else
Matthias Kloseb9621712010-04-24 17:59:49 +000013573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13574$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013575fi
13576
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013577if test "$have_long_long" = yes
13578then
Matthias Kloseb9621712010-04-24 17:59:49 +000013579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13580$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013581 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013582 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013583else
Matthias Kloseb9621712010-04-24 17:59:49 +000013584 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013585 ac_cv_have_long_long_format=no
13586else
Matthias Kloseb9621712010-04-24 17:59:49 +000013587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013588/* end confdefs.h. */
13589
13590 #include <stdio.h>
13591 #include <stddef.h>
13592 #include <string.h>
13593
13594 #ifdef HAVE_SYS_TYPES_H
13595 #include <sys/types.h>
13596 #endif
13597
13598 int main()
13599 {
13600 char buffer[256];
13601
13602 if (sprintf(buffer, "%lld", (long long)123) < 0)
13603 return 1;
13604 if (strcmp(buffer, "123"))
13605 return 1;
13606
13607 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13608 return 1;
13609 if (strcmp(buffer, "-123"))
13610 return 1;
13611
13612 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13613 return 1;
13614 if (strcmp(buffer, "123"))
13615 return 1;
13616
13617 return 0;
13618 }
13619
13620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013621if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013622 ac_cv_have_long_long_format=yes
13623else
Matthias Kloseb9621712010-04-24 17:59:49 +000013624 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013625fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013626rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13627 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013628fi
13629
13630
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013631fi
13632
Matthias Kloseb9621712010-04-24 17:59:49 +000013633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13634$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013635fi
13636
Mark Dickinson89d7d412009-12-31 20:50:59 +000013637if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013638then
13639
Matthias Kloseb9621712010-04-24 17:59:49 +000013640$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013641
13642fi
13643
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013644if test $ac_sys_system = Darwin
13645then
13646 LIBS="$LIBS -framework CoreFoundation"
13647fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013648
Matthias Kloseb9621712010-04-24 17:59:49 +000013649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13650$as_echo_n "checking for %zd printf() format support... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013651if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013652 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013653else
Matthias Kloseb9621712010-04-24 17:59:49 +000013654 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013655 ac_cv_have_size_t_format="cross -- assuming yes"
13656
Thomas Wouters477c8d52006-05-27 19:21:47 +000013657else
Matthias Kloseb9621712010-04-24 17:59:49 +000013658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013659/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013660
Thomas Wouters477c8d52006-05-27 19:21:47 +000013661#include <stdio.h>
13662#include <stddef.h>
13663#include <string.h>
13664
Christian Heimes2c181612007-12-17 20:04:13 +000013665#ifdef HAVE_SYS_TYPES_H
13666#include <sys/types.h>
13667#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013668
13669#ifdef HAVE_SSIZE_T
13670typedef ssize_t Py_ssize_t;
13671#elif SIZEOF_VOID_P == SIZEOF_LONG
13672typedef long Py_ssize_t;
13673#else
13674typedef int Py_ssize_t;
13675#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013676
Christian Heimes2c181612007-12-17 20:04:13 +000013677int main()
13678{
13679 char buffer[256];
13680
Thomas Wouters477c8d52006-05-27 19:21:47 +000013681 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13682 return 1;
13683
Thomas Wouters89f507f2006-12-13 04:49:30 +000013684 if (strcmp(buffer, "123"))
13685 return 1;
13686
13687 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13688 return 1;
13689
13690 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013691 return 1;
13692
13693 return 0;
13694}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013695
Thomas Wouters477c8d52006-05-27 19:21:47 +000013696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013697if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013698 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013699else
Matthias Kloseb9621712010-04-24 17:59:49 +000013700 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013701fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013702rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13703 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013704fi
13705
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013706fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13708$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013709if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013710
Matthias Kloseb9621712010-04-24 17:59:49 +000013711$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013712
13713fi
13714
Matthias Kloseb9621712010-04-24 17:59:49 +000013715ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013716#ifdef HAVE_SYS_TYPES_H
13717#include <sys/types.h>
13718#endif
13719#ifdef HAVE_SYS_SOCKET_H
13720#include <sys/socket.h>
13721#endif
13722
Matthias Kloseb9621712010-04-24 17:59:49 +000013723"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013724if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013725
Martin v. Löwis11437992002-04-12 09:54:03 +000013726else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013727
Matthias Kloseb9621712010-04-24 17:59:49 +000013728$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013729
13730fi
13731
Michael W. Hudson54241132001-12-07 15:38:26 +000013732
Matthias Kloseb9621712010-04-24 17:59:49 +000013733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13734$as_echo_n "checking for broken mbstowcs... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013735if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013736 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013737else
Matthias Kloseb9621712010-04-24 17:59:49 +000013738 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013739 ac_cv_broken_mbstowcs=no
13740else
Matthias Kloseb9621712010-04-24 17:59:49 +000013741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013742/* end confdefs.h. */
13743
13744#include<stdlib.h>
13745int main() {
13746 size_t len = -1;
13747 const char *str = "text";
13748 len = mbstowcs(NULL, str, 0);
13749 return (len != 4);
13750}
13751
13752_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013753if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013754 ac_cv_broken_mbstowcs=no
13755else
Matthias Kloseb9621712010-04-24 17:59:49 +000013756 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013757fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013758rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13759 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013760fi
13761
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013762fi
13763
Matthias Kloseb9621712010-04-24 17:59:49 +000013764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13765$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013766if test "$ac_cv_broken_mbstowcs" = yes
13767then
13768
Matthias Kloseb9621712010-04-24 17:59:49 +000013769$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013770
13771fi
13772
Antoine Pitrou042b1282010-08-13 21:15:58 +000013773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13774$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013775if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013776 $as_echo_n "(cached) " >&6
13777else
13778 if test "$cross_compiling" = yes; then :
13779 ac_cv_computed_gotos=no
13780else
13781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13782/* end confdefs.h. */
13783
13784int main(int argc, char **argv)
13785{
13786 static void *targets[1] = { &&LABEL1 };
13787 goto LABEL2;
13788LABEL1:
13789 return 0;
13790LABEL2:
13791 goto *targets[0];
13792 return 1;
13793}
13794
13795_ACEOF
13796if ac_fn_c_try_run "$LINENO"; then :
13797 ac_cv_computed_gotos=yes
13798else
13799 ac_cv_computed_gotos=no
13800fi
13801rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13802 conftest.$ac_objext conftest.beam conftest.$ac_ext
13803fi
13804
13805fi
13806
13807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13808$as_echo "$ac_cv_computed_gotos" >&6; }
13809if test "$ac_cv_computed_gotos" = yes
13810then
13811
13812$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13813
13814fi
13815
Antoine Pitroub52ec782009-01-25 16:34:23 +000013816# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13818$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013819
13820# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013821if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013822 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013823if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013824then
13825
Matthias Kloseb9621712010-04-24 17:59:49 +000013826$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013827
Matthias Kloseb9621712010-04-24 17:59:49 +000013828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13829$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013830fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013831if test "$withval" = no
13832then
13833
13834$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13835
Matthias Kloseb9621712010-04-24 17:59:49 +000013836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13837$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013838fi
13839
Antoine Pitrou042b1282010-08-13 21:15:58 +000013840else
13841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13842$as_echo "no value specified" >&6; }
13843fi
13844
Antoine Pitroub52ec782009-01-25 16:34:23 +000013845
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013846case $ac_sys_system in
13847AIX*)
13848
13849$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13850 ;;
13851esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013852
Michael W. Hudson54241132001-12-07 15:38:26 +000013853
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013854
13855
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013856for h in `(cd $srcdir;echo Python/thread_*.h)`
13857do
13858 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13859done
13860
Michael W. Hudson54241132001-12-07 15:38:26 +000013861
Neal Norwitzd24499d2005-12-18 21:36:39 +000013862SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13864$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013865for dir in $SRCDIRS; do
13866 if test ! -d $dir; then
13867 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013868 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013869done
Matthias Kloseb9621712010-04-24 17:59:49 +000013870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13871$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013872
Guido van Rossum627b2d71993-12-24 10:39:16 +000013873# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013874ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013875
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013876ac_config_files="$ac_config_files Modules/ld_so_aix"
13877
Martin v. Löwis11437992002-04-12 09:54:03 +000013878cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013879# This file is a shell script that caches the results of configure
13880# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013881# scripts and configure runs, see configure's option --config-cache.
13882# It is not useful on other systems. If it contains results you don't
13883# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013884#
Martin v. Löwis11437992002-04-12 09:54:03 +000013885# config.status only pays attention to the cache file if you give it
13886# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013887#
Skip Montanaro6dead952003-09-25 14:50:04 +000013888# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013889# loading this file, other *unset* `ac_cv_foo' will be assigned the
13890# following values.
13891
13892_ACEOF
13893
Guido van Rossumf78abae1997-01-21 22:02:36 +000013894# The following way of writing the cache mishandles newlines in values,
13895# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013896# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013897# Ultrix sh set writes to stderr and can't be redirected directly,
13898# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013899(
13900 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13901 eval ac_val=\$$ac_var
13902 case $ac_val in #(
13903 *${as_nl}*)
13904 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013905 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13906$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013907 esac
13908 case $ac_var in #(
13909 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013910 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13911 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013912 esac ;;
13913 esac
13914 done
13915
Martin v. Löwis11437992002-04-12 09:54:03 +000013916 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013917 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13918 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013919 # `set' does not quote correctly, so add quotes: double-quote
13920 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013921 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013922 "s/'/'\\\\''/g;
13923 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013924 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013925 *)
13926 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013927 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013928 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013929 esac |
13930 sort
13931) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013932 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013933 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013934 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013935 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013936 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13937 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013938 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13939 :end' >>confcache
13940if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13941 if test -w "$cache_file"; then
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013942 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013943 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13944$as_echo "$as_me: updating cache $cache_file" >&6;}
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013945 if test ! -f "$cache_file" || test -h "$cache_file"; then
13946 cat confcache >"$cache_file"
13947 else
13948 case $cache_file in #(
13949 */* | ?:*)
13950 mv -f confcache "$cache_file"$$ &&
13951 mv -f "$cache_file"$$ "$cache_file" ;; #(
13952 *)
13953 mv -f confcache "$cache_file" ;;
13954 esac
13955 fi
13956 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013957 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013958 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13959$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013960 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013961fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013962rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013963
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013964test "x$prefix" = xNONE && prefix=$ac_default_prefix
13965# Let make expand exec_prefix.
13966test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013967
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013968DEFS=-DHAVE_CONFIG_H
13969
Skip Montanaro6dead952003-09-25 14:50:04 +000013970ac_libobjs=
13971ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013972U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013973for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13974 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013975 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013976 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013977 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13978 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013979 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13980 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013981done
13982LIBOBJS=$ac_libobjs
13983
13984LTLIBOBJS=$ac_ltlibobjs
13985
13986
Martin v. Löwis11437992002-04-12 09:54:03 +000013987
Matthias Kloseb9621712010-04-24 17:59:49 +000013988
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013989: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000013990ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013991ac_clean_files_save=$ac_clean_files
13992ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013993{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13994$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13995as_write_fail=0
13996cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013997#! $SHELL
13998# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013999# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014000# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014001# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014002
Martin v. Löwis11437992002-04-12 09:54:03 +000014003debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014004ac_cs_recheck=false
14005ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014006
Matthias Kloseb9621712010-04-24 17:59:49 +000014007SHELL=\${CONFIG_SHELL-$SHELL}
14008export SHELL
14009_ASEOF
14010cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14011## -------------------- ##
14012## M4sh Initialization. ##
14013## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014014
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014015# Be more Bourne compatible
14016DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014017if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014018 emulate sh
14019 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014020 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014021 # is contrary to our usage. Disable this feature.
14022 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014023 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014024else
Matthias Kloseb9621712010-04-24 17:59:49 +000014025 case `(set -o) 2>/dev/null` in #(
14026 *posix*) :
14027 set -o posix ;; #(
14028 *) :
14029 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014030esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014031fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014032
14033
Matthias Kloseb9621712010-04-24 17:59:49 +000014034as_nl='
14035'
14036export as_nl
14037# Printing a long string crashes Solaris 7 /usr/bin/printf.
14038as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14039as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14040as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14041# Prefer a ksh shell builtin over an external printf program on Solaris,
14042# but without wasting forks for bash or zsh.
14043if test -z "$BASH_VERSION$ZSH_VERSION" \
14044 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14045 as_echo='print -r --'
14046 as_echo_n='print -rn --'
14047elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14048 as_echo='printf %s\n'
14049 as_echo_n='printf %s'
14050else
14051 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14052 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14053 as_echo_n='/usr/ucb/echo -n'
14054 else
14055 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14056 as_echo_n_body='eval
14057 arg=$1;
14058 case $arg in #(
14059 *"$as_nl"*)
14060 expr "X$arg" : "X\\(.*\\)$as_nl";
14061 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14062 esac;
14063 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14064 '
14065 export as_echo_n_body
14066 as_echo_n='sh -c $as_echo_n_body as_echo'
14067 fi
14068 export as_echo_body
14069 as_echo='sh -c $as_echo_body as_echo'
14070fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014071
14072# The user is always right.
14073if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014074 PATH_SEPARATOR=:
14075 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14076 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14077 PATH_SEPARATOR=';'
14078 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014079fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014080
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014081
14082# IFS
14083# We need space, tab and new line, in precisely that order. Quoting is
14084# there to prevent editors from complaining about space-tab.
14085# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14086# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014087IFS=" "" $as_nl"
14088
14089# Find who we are. Look in the path if we contain no directory separator.
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014090as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014091case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014092 *[\\/]* ) as_myself=$0 ;;
14093 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014094for as_dir in $PATH
14095do
14096 IFS=$as_save_IFS
14097 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014098 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14099 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014100IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014101
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014102 ;;
14103esac
14104# We did not find ourselves, most probably we were run as `sh COMMAND'
14105# in which case we are not to be found in the path.
14106if test "x$as_myself" = x; then
14107 as_myself=$0
14108fi
14109if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14111 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014112fi
14113
Matthias Kloseb9621712010-04-24 17:59:49 +000014114# Unset variables that we do not need and which cause bugs (e.g. in
14115# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14116# suppresses any "Segmentation fault" message there. '((' could
14117# trigger a bug in pdksh 5.2.14.
14118for as_var in BASH_ENV ENV MAIL MAILPATH
14119do eval test x\${$as_var+set} = xset \
14120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014121done
14122PS1='$ '
14123PS2='> '
14124PS4='+ '
14125
14126# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014127LC_ALL=C
14128export LC_ALL
14129LANGUAGE=C
14130export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014131
Matthias Kloseb9621712010-04-24 17:59:49 +000014132# CDPATH.
14133(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14134
14135
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014136# as_fn_error STATUS ERROR [LINENO LOG_FD]
14137# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014138# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14139# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014140# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014141as_fn_error ()
14142{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014143 as_status=$1; test $as_status -eq 0 && as_status=1
14144 if test "$4"; then
14145 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14146 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014147 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014148 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014149 as_fn_exit $as_status
14150} # as_fn_error
14151
14152
14153# as_fn_set_status STATUS
14154# -----------------------
14155# Set $? to STATUS, without forking.
14156as_fn_set_status ()
14157{
14158 return $1
14159} # as_fn_set_status
14160
14161# as_fn_exit STATUS
14162# -----------------
14163# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14164as_fn_exit ()
14165{
14166 set +e
14167 as_fn_set_status $1
14168 exit $1
14169} # as_fn_exit
14170
14171# as_fn_unset VAR
14172# ---------------
14173# Portably unset VAR.
14174as_fn_unset ()
14175{
14176 { eval $1=; unset $1;}
14177}
14178as_unset=as_fn_unset
14179# as_fn_append VAR VALUE
14180# ----------------------
14181# Append the text in VALUE to the end of the definition contained in VAR. Take
14182# advantage of any shell optimizations that allow amortized linear growth over
14183# repeated appends, instead of the typical quadratic growth present in naive
14184# implementations.
14185if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14186 eval 'as_fn_append ()
14187 {
14188 eval $1+=\$2
14189 }'
14190else
14191 as_fn_append ()
14192 {
14193 eval $1=\$$1\$2
14194 }
14195fi # as_fn_append
14196
14197# as_fn_arith ARG...
14198# ------------------
14199# Perform arithmetic evaluation on the ARGs, and store the result in the
14200# global $as_val. Take advantage of shells that can avoid forks. The arguments
14201# must be portable across $(()) and expr.
14202if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14203 eval 'as_fn_arith ()
14204 {
14205 as_val=$(( $* ))
14206 }'
14207else
14208 as_fn_arith ()
14209 {
14210 as_val=`expr "$@" || test $? -eq 1`
14211 }
14212fi # as_fn_arith
14213
14214
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014215if expr a : '\(a\)' >/dev/null 2>&1 &&
14216 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14217 as_expr=expr
14218else
14219 as_expr=false
14220fi
14221
14222if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14223 as_basename=basename
14224else
14225 as_basename=false
14226fi
14227
Matthias Kloseb9621712010-04-24 17:59:49 +000014228if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14229 as_dirname=dirname
14230else
14231 as_dirname=false
14232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014233
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014234as_me=`$as_basename -- "$0" ||
14235$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14236 X"$0" : 'X\(//\)$' \| \
14237 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014238$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014239 sed '/^.*\/\([^/][^/]*\)\/*$/{
14240 s//\1/
14241 q
14242 }
14243 /^X\/\(\/\/\)$/{
14244 s//\1/
14245 q
14246 }
14247 /^X\/\(\/\).*/{
14248 s//\1/
14249 q
14250 }
14251 s/.*/./; q'`
14252
Matthias Kloseb9621712010-04-24 17:59:49 +000014253# Avoid depending upon Character Ranges.
14254as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14255as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14256as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14257as_cr_digits='0123456789'
14258as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014259
14260ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014261case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014262-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014263 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014264 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014265 xy) ECHO_C='\c';;
14266 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14267 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014268 esac;;
14269*)
14270 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014271esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014272
Martin v. Löwis11437992002-04-12 09:54:03 +000014273rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014274if test -d conf$$.dir; then
14275 rm -f conf$$.dir/conf$$.file
14276else
14277 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014278 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014279fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014280if (echo >conf$$.file) 2>/dev/null; then
14281 if ln -s conf$$.file conf$$ 2>/dev/null; then
14282 as_ln_s='ln -s'
14283 # ... but there are two gotchas:
14284 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14285 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14286 # In both cases, we have to default to `cp -p'.
14287 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14288 as_ln_s='cp -p'
14289 elif ln conf$$.file conf$$ 2>/dev/null; then
14290 as_ln_s=ln
14291 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014292 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014293 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014294else
14295 as_ln_s='cp -p'
14296fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014297rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14298rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014299
Matthias Kloseb9621712010-04-24 17:59:49 +000014300
14301# as_fn_mkdir_p
14302# -------------
14303# Create "$as_dir" as a directory, including parents if necessary.
14304as_fn_mkdir_p ()
14305{
14306
14307 case $as_dir in #(
14308 -*) as_dir=./$as_dir;;
14309 esac
14310 test -d "$as_dir" || eval $as_mkdir_p || {
14311 as_dirs=
14312 while :; do
14313 case $as_dir in #(
14314 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14315 *) as_qdir=$as_dir;;
14316 esac
14317 as_dirs="'$as_qdir' $as_dirs"
14318 as_dir=`$as_dirname -- "$as_dir" ||
14319$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14320 X"$as_dir" : 'X\(//\)[^/]' \| \
14321 X"$as_dir" : 'X\(//\)$' \| \
14322 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14323$as_echo X"$as_dir" |
14324 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14325 s//\1/
14326 q
14327 }
14328 /^X\(\/\/\)[^/].*/{
14329 s//\1/
14330 q
14331 }
14332 /^X\(\/\/\)$/{
14333 s//\1/
14334 q
14335 }
14336 /^X\(\/\).*/{
14337 s//\1/
14338 q
14339 }
14340 s/.*/./; q'`
14341 test -d "$as_dir" && break
14342 done
14343 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014344 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014345
14346
14347} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014348if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014349 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014350else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014351 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014352 as_mkdir_p=false
14353fi
14354
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014355if test -x / >/dev/null 2>&1; then
14356 as_test_x='test -x'
14357else
14358 if ls -dL / >/dev/null 2>&1; then
14359 as_ls_L_option=L
14360 else
14361 as_ls_L_option=
14362 fi
14363 as_test_x='
14364 eval sh -c '\''
14365 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014366 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014367 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014368 case $1 in #(
14369 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014370 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014371 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014372 ???[sx]*):;;*)false;;esac;fi
14373 '\'' sh
14374 '
14375fi
14376as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014377
14378# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014379as_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 +000014380
14381# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014382as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014383
14384
Martin v. Löwis11437992002-04-12 09:54:03 +000014385exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014386## ----------------------------------- ##
14387## Main body of $CONFIG_STATUS script. ##
14388## ----------------------------------- ##
14389_ASEOF
14390test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014391
Matthias Kloseb9621712010-04-24 17:59:49 +000014392cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14393# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014394# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014395# values after options handling.
14396ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014397This file was extended by python $as_me 3.3, which was
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014398generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014399
14400 CONFIG_FILES = $CONFIG_FILES
14401 CONFIG_HEADERS = $CONFIG_HEADERS
14402 CONFIG_LINKS = $CONFIG_LINKS
14403 CONFIG_COMMANDS = $CONFIG_COMMANDS
14404 $ $0 $@
14405
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014406on `(hostname || uname -n) 2>/dev/null | sed 1q`
14407"
14408
Martin v. Löwis11437992002-04-12 09:54:03 +000014409_ACEOF
14410
Matthias Kloseb9621712010-04-24 17:59:49 +000014411case $ac_config_files in *"
14412"*) set x $ac_config_files; shift; ac_config_files=$*;;
14413esac
14414
14415case $ac_config_headers in *"
14416"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14417esac
14418
14419
14420cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014421# Files that config.status was made for.
Benjamin Peterson94b580d2011-08-02 17:30:04 -050014422config_files="$ac_config_files"
14423config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014424
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014425_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014426
Matthias Kloseb9621712010-04-24 17:59:49 +000014427cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014428ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014429\`$as_me' instantiates files and other configuration actions
14430from templates according to the current configuration. Unless the files
14431and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014432
Matthias Kloseb9621712010-04-24 17:59:49 +000014433Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014434
14435 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014436 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014437 --config print configuration, then exit
14438 -q, --quiet, --silent
14439 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014440 -d, --debug don't remove temporary files
14441 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014442 --file=FILE[:TEMPLATE]
14443 instantiate the configuration file FILE
14444 --header=FILE[:TEMPLATE]
14445 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014446
14447Configuration files:
14448$config_files
14449
14450Configuration headers:
14451$config_headers
14452
Matthias Kloseb9621712010-04-24 17:59:49 +000014453Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014454
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014456cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14457ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014458ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014459python config.status 3.3
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014460configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000014461 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014462
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014463Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014464This config.status script is free software; the Free Software Foundation
14465gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014466
14467ac_pwd='$ac_pwd'
14468srcdir='$srcdir'
14469INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014470test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014471_ACEOF
14472
Matthias Kloseb9621712010-04-24 17:59:49 +000014473cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14474# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014475ac_need_defaults=:
14476while test $# != 0
14477do
14478 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014479 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014480 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14481 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014482 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014483 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014484 --*=)
14485 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14486 ac_optarg=
14487 ac_shift=:
14488 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014489 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014490 ac_option=$1
14491 ac_optarg=$2
14492 ac_shift=shift
14493 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014494 esac
14495
Skip Montanaro6dead952003-09-25 14:50:04 +000014496 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014497 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014498 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14499 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014500 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014501 $as_echo "$ac_cs_version"; exit ;;
14502 --config | --confi | --conf | --con | --co | --c )
14503 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014504 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014505 debug=: ;;
14506 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014507 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014508 case $ac_optarg in
14509 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014510 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014511 esac
14512 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014513 ac_need_defaults=false;;
14514 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014515 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014516 case $ac_optarg in
14517 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14518 esac
14519 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014520 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014521 --he | --h)
14522 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014523 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014524Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014525 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014526 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014527 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14528 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14529 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014530
14531 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014532 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014533Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014534
Matthias Kloseb9621712010-04-24 17:59:49 +000014535 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014536 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014537
14538 esac
14539 shift
14540done
14541
Skip Montanaro6dead952003-09-25 14:50:04 +000014542ac_configure_extra_args=
14543
14544if $ac_cs_silent; then
14545 exec 6>/dev/null
14546 ac_configure_extra_args="$ac_configure_extra_args --silent"
14547fi
14548
14549_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014550cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014551if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014552 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14553 shift
14554 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14555 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014556 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014557 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014558fi
14559
Martin v. Löwis11437992002-04-12 09:54:03 +000014560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014561cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014562exec 5>>config.log
14563{
14564 echo
14565 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14566## Running $as_me. ##
14567_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014568 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014569} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014570
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014572cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014573_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014574
Matthias Kloseb9621712010-04-24 17:59:49 +000014575cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014576
14577# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014578for ac_config_target in $ac_config_targets
14579do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014580 case $ac_config_target in
14581 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14582 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14583 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014584 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14585 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014586 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14587 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014588 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014589 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014590
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014591 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014592 esac
14593done
14594
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014595
Martin v. Löwis11437992002-04-12 09:54:03 +000014596# If the user did not use the arguments to specify the items to instantiate,
14597# then the envvar interface is used. Set only those that are not.
14598# We use the long form for the default assignment because of an extremely
14599# bizarre bug on SunOS 4.1.3.
14600if $ac_need_defaults; then
14601 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14602 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14603fi
14604
Skip Montanaro6dead952003-09-25 14:50:04 +000014605# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014606# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014607# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014608# Hook for its removal unless debugging.
14609# Note that there is a small window in which the directory will not be cleaned:
14610# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014611$debug ||
14612{
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014613 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014614 trap 'exit_status=$?
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014615 : "${ac_tmp:=$tmp}"
14616 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014617' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014618 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014619}
Martin v. Löwis11437992002-04-12 09:54:03 +000014620# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014621
Martin v. Löwis11437992002-04-12 09:54:03 +000014622{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014623 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014624 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014625} ||
14626{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014627 tmp=./conf$$-$RANDOM
14628 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014629} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014630ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014631
Matthias Kloseb9621712010-04-24 17:59:49 +000014632# Set up the scripts for CONFIG_FILES section.
14633# No need to generate them if there are no CONFIG_FILES.
14634# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014635if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014636
Matthias Kloseb9621712010-04-24 17:59:49 +000014637
14638ac_cr=`echo X | tr X '\015'`
14639# On cygwin, bash can eat \r inside `` if the user requested igncr.
14640# But we know of no other shell where ac_cr would be empty at this
14641# point, so we can use a bashism as a fallback.
14642if test "x$ac_cr" = x; then
14643 eval ac_cr=\$\'\\r\'
14644fi
14645ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14646if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014647 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014648else
14649 ac_cs_awk_cr=$ac_cr
14650fi
14651
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014652echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014653_ACEOF
14654
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014655
Matthias Kloseb9621712010-04-24 17:59:49 +000014656{
14657 echo "cat >conf$$subs.awk <<_ACEOF" &&
14658 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14659 echo "_ACEOF"
14660} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014661 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14662ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014663ac_delim='%!_!# '
14664for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014665 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014666 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014667
Matthias Kloseb9621712010-04-24 17:59:49 +000014668 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14669 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014670 break
14671 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014672 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014673 else
14674 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014675 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014676done
Matthias Kloseb9621712010-04-24 17:59:49 +000014677rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014678
Matthias Kloseb9621712010-04-24 17:59:49 +000014679cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014680cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014682sed -n '
14683h
14684s/^/S["/; s/!.*/"]=/
14685p
14686g
14687s/^[^!]*!//
14688:repl
14689t repl
14690s/'"$ac_delim"'$//
14691t delim
14692:nl
14693h
14694s/\(.\{148\}\)..*/\1/
14695t more1
14696s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14697p
14698n
14699b repl
14700:more1
14701s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14702p
14703g
14704s/.\{148\}//
14705t nl
14706:delim
14707h
14708s/\(.\{148\}\)..*/\1/
14709t more2
14710s/["\\]/\\&/g; s/^/"/; s/$/"/
14711p
14712b
14713:more2
14714s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14715p
14716g
14717s/.\{148\}//
14718t delim
14719' <conf$$subs.awk | sed '
14720/^[^""]/{
14721 N
14722 s/\n//
14723}
14724' >>$CONFIG_STATUS || ac_write_fail=1
14725rm -f conf$$subs.awk
14726cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14727_ACAWK
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014728cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014729 for (key in S) S_is_set[key] = 1
14730 FS = ""
14731
14732}
14733{
14734 line = $ 0
14735 nfields = split(line, field, "@")
14736 substed = 0
14737 len = length(field[1])
14738 for (i = 2; i < nfields; i++) {
14739 key = field[i]
14740 keylen = length(key)
14741 if (S_is_set[key]) {
14742 value = S[key]
14743 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14744 len += length(value) + length(field[++i])
14745 substed = 1
14746 } else
14747 len += 1 + keylen
14748 }
14749
14750 print line
14751}
14752
14753_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014754_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014755cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14756if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14757 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14758else
14759 cat
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014760fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014761 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014762_ACEOF
14763
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014764# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14765# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014766# trailing colons and then remove the whole line if VPATH becomes empty
14767# (actually we leave an empty line to preserve line numbers).
14768if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014769 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14770h
14771s///
14772s/^/:/
14773s/[ ]*$/:/
14774s/:\$(srcdir):/:/g
14775s/:\${srcdir}:/:/g
14776s/:@srcdir@:/:/g
14777s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014778s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014779x
14780s/\(=[ ]*\).*/\1/
14781G
14782s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014783s/^[^=]*=[ ]*$//
14784}'
14785fi
14786
Matthias Kloseb9621712010-04-24 17:59:49 +000014787cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014788fi # test -n "$CONFIG_FILES"
14789
Matthias Kloseb9621712010-04-24 17:59:49 +000014790# Set up the scripts for CONFIG_HEADERS section.
14791# No need to generate them if there are no CONFIG_HEADERS.
14792# This happens for instance with `./config.status Makefile'.
14793if test -n "$CONFIG_HEADERS"; then
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014794cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014795BEGIN {
14796_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014797
Matthias Kloseb9621712010-04-24 17:59:49 +000014798# Transform confdefs.h into an awk script `defines.awk', embedded as
14799# here-document in config.status, that substitutes the proper values into
14800# config.h.in to produce config.h.
14801
14802# Create a delimiter string that does not exist in confdefs.h, to ease
14803# handling of long lines.
14804ac_delim='%!_!# '
14805for ac_last_try in false false :; do
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014806 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14807 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014808 break
14809 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014810 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014811 else
14812 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14813 fi
14814done
14815
14816# For the awk script, D is an array of macro values keyed by name,
14817# likewise P contains macro parameters if any. Preserve backslash
14818# newline sequences.
14819
14820ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14821sed -n '
14822s/.\{148\}/&'"$ac_delim"'/g
14823t rset
14824:rset
14825s/^[ ]*#[ ]*define[ ][ ]*/ /
14826t def
14827d
14828:def
14829s/\\$//
14830t bsnl
14831s/["\\]/\\&/g
14832s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14833D["\1"]=" \3"/p
14834s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14835d
14836:bsnl
14837s/["\\]/\\&/g
14838s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14839D["\1"]=" \3\\\\\\n"\\/p
14840t cont
14841s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14842t cont
14843d
14844:cont
14845n
14846s/.\{148\}/&'"$ac_delim"'/g
14847t clear
14848:clear
14849s/\\$//
14850t bsnlc
14851s/["\\]/\\&/g; s/^/"/; s/$/"/p
14852d
14853:bsnlc
14854s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14855b cont
14856' <confdefs.h | sed '
14857s/'"$ac_delim"'/"\\\
14858"/g' >>$CONFIG_STATUS || ac_write_fail=1
14859
14860cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14861 for (key in D) D_is_set[key] = 1
14862 FS = ""
14863}
14864/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14865 line = \$ 0
14866 split(line, arg, " ")
14867 if (arg[1] == "#") {
14868 defundef = arg[2]
14869 mac1 = arg[3]
14870 } else {
14871 defundef = substr(arg[1], 2)
14872 mac1 = arg[2]
14873 }
14874 split(mac1, mac2, "(") #)
14875 macro = mac2[1]
14876 prefix = substr(line, 1, index(line, defundef) - 1)
14877 if (D_is_set[macro]) {
14878 # Preserve the white space surrounding the "#".
14879 print prefix "define", macro P[macro] D[macro]
14880 next
14881 } else {
14882 # Replace #undef with comments. This is necessary, for example,
14883 # in the case of _POSIX_SOURCE, which is predefined and required
14884 # on some systems where configure will not decide to define it.
14885 if (defundef == "undef") {
14886 print "/*", prefix defundef, macro, "*/"
14887 next
14888 }
14889 }
14890}
14891{ print }
14892_ACAWK
14893_ACEOF
14894cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014895 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014896fi # test -n "$CONFIG_HEADERS"
14897
14898
14899eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14900shift
14901for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014902do
14903 case $ac_tag in
14904 :[FHLC]) ac_mode=$ac_tag; continue;;
14905 esac
14906 case $ac_mode$ac_tag in
14907 :[FHL]*:*);;
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014908 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014909 :[FH]-) ac_tag=-:-;;
14910 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14911 esac
14912 ac_save_IFS=$IFS
14913 IFS=:
14914 set x $ac_tag
14915 IFS=$ac_save_IFS
14916 shift
14917 ac_file=$1
14918 shift
14919
14920 case $ac_mode in
14921 :L) ac_source=$1;;
14922 :[FH])
14923 ac_file_inputs=
14924 for ac_f
14925 do
14926 case $ac_f in
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014927 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014928 *) # Look for the file first in the build tree, then in the source tree
14929 # (if the path is not absolute). The absolute path cannot be DOS-style,
14930 # because $ac_f cannot contain `:'.
14931 test -f "$ac_f" ||
14932 case $ac_f in
14933 [\\/$]*) false;;
14934 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14935 esac ||
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014936 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014937 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014938 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14939 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014940 done
14941
14942 # Let's still pretend it is `configure' which instantiates (i.e., don't
14943 # use $as_me), people would be surprised to read:
14944 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014945 configure_input='Generated from '`
14946 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14947 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014948 if test x"$ac_file" != x-; then
14949 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014950 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14951$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014952 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014953 # Neutralize special characters interpreted by sed in replacement strings.
14954 case $configure_input in #(
14955 *\&* | *\|* | *\\* )
14956 ac_sed_conf_input=`$as_echo "$configure_input" |
14957 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14958 *) ac_sed_conf_input=$configure_input;;
14959 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014960
14961 case $ac_tag in
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014962 *:-:* | *:-) cat >"$ac_tmp/stdin" \
14963 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014964 esac
14965 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014966 esac
14967
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014968 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014969$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014970 X"$ac_file" : 'X\(//\)[^/]' \| \
14971 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014972 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014973$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014974 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14975 s//\1/
14976 q
14977 }
14978 /^X\(\/\/\)[^/].*/{
14979 s//\1/
14980 q
14981 }
14982 /^X\(\/\/\)$/{
14983 s//\1/
14984 q
14985 }
14986 /^X\(\/\).*/{
14987 s//\1/
14988 q
14989 }
14990 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014991 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014992 ac_builddir=.
14993
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014994case "$ac_dir" in
14995.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14996*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014997 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014998 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014999 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015000 case $ac_top_builddir_sub in
15001 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15002 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15003 esac ;;
15004esac
15005ac_abs_top_builddir=$ac_pwd
15006ac_abs_builddir=$ac_pwd$ac_dir_suffix
15007# for backward compatibility:
15008ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015009
15010case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015011 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015012 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015013 ac_top_srcdir=$ac_top_builddir_sub
15014 ac_abs_top_srcdir=$ac_pwd ;;
15015 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015016 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015017 ac_top_srcdir=$srcdir
15018 ac_abs_top_srcdir=$srcdir ;;
15019 *) # Relative name.
15020 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15021 ac_top_srcdir=$ac_top_build_prefix$srcdir
15022 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015023esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015024ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015025
Martin v. Löwis11437992002-04-12 09:54:03 +000015026
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015027 case $ac_mode in
15028 :F)
15029 #
15030 # CONFIG_FILE
15031 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015032
15033 case $INSTALL in
15034 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015035 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015036 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015037_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015038
Matthias Kloseb9621712010-04-24 17:59:49 +000015039cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015040# If the template does not know about datarootdir, expand it.
15041# FIXME: This hack should be removed a few years after 2.60.
15042ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015043ac_sed_dataroot='
15044/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015045 p
15046 q
15047}
15048/@datadir@/p
15049/@docdir@/p
15050/@infodir@/p
15051/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015052/@mandir@/p'
15053case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015054*datarootdir*) ac_datarootdir_seen=yes;;
15055*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015056 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15057$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015058_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015059cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015060 ac_datarootdir_hack='
15061 s&@datadir@&$datadir&g
15062 s&@docdir@&$docdir&g
15063 s&@infodir@&$infodir&g
15064 s&@localedir@&$localedir&g
15065 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015066 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015067esac
15068_ACEOF
15069
15070# Neutralize VPATH when `$srcdir' = `.'.
15071# Shell code in configure.ac might set extrasub.
15072# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015073cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15074ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015075$extrasub
15076_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015077cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015078:t
15079/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015080s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015081s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015082s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015083s&@srcdir@&$ac_srcdir&;t t
15084s&@abs_srcdir@&$ac_abs_srcdir&;t t
15085s&@top_srcdir@&$ac_top_srcdir&;t t
15086s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15087s&@builddir@&$ac_builddir&;t t
15088s&@abs_builddir@&$ac_abs_builddir&;t t
15089s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15090s&@INSTALL@&$ac_INSTALL&;t t
15091$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015092"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020015093eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15094 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015095
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015096test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020015097 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15098 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15099 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015100 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015101which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015102$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015103which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015104
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020015105 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015106 case $ac_file in
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020015107 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15108 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015109 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015110 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015111 ;;
15112 :H)
15113 #
15114 # CONFIG_HEADER
15115 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015116 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015117 {
15118 $as_echo "/* $configure_input */" \
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020015119 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15120 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015121 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020015122 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015123 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15124$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015125 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015126 rm -f "$ac_file"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020015127 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015128 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015129 fi
15130 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015131 $as_echo "/* $configure_input */" \
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020015132 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015133 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015134 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015135 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015136
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015137
15138 esac
15139
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015140
15141 case $ac_file$ac_mode in
15142 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15143
15144 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015145done # for ac_tag
15146
Guido van Rossum627b2d71993-12-24 10:39:16 +000015147
Matthias Kloseb9621712010-04-24 17:59:49 +000015148as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015149_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015150ac_clean_files=$ac_clean_files_save
15151
Matthias Kloseb9621712010-04-24 17:59:49 +000015152test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015153 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015154
Martin v. Löwis11437992002-04-12 09:54:03 +000015155
15156# configure is writing to config.log, and then calls config.status.
15157# config.status does its own redirection, appending to config.log.
15158# Unfortunately, on DOS this fails, as config.log is still kept open
15159# by configure, so config.status won't be able to write to it; its
15160# output is simply discarded. So we exec the FD to /dev/null,
15161# effectively closing config.log, so it can be properly (re)opened and
15162# appended to by config.status. When coming back to configure, we
15163# need to make the FD available again.
15164if test "$no_create" != yes; then
15165 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015166 ac_config_status_args=
15167 test "$silent" = yes &&
15168 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015169 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015170 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015171 exec 5>>config.log
15172 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15173 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015174 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015175fi
15176if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15177 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15178$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015179fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015180
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015181
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015182echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015183if test ! -f Modules/Setup
15184then
15185 cp $srcdir/Modules/Setup.dist Modules/Setup
15186fi
15187
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015188echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015189if test ! -f Modules/Setup.local
15190then
15191 echo "# Edit this file for local setup changes" >Modules/Setup.local
15192fi
15193
15194echo "creating Makefile"
15195$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15196 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015197 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015198mv config.c Modules