blob: 17fecec39428e5775459065e384704afd941bf50 [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 \
Antoine Pitrou37009202011-07-08 23:47:50 +02006095shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006096unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006097sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6098sys/lock.h sys/mkdev.h sys/modem.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006099sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
6100sys/stat.h sys/termio.h sys/time.h \
6101sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006102libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006103bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006104do :
6105 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6106ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006107if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006108 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006109#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006110_ACEOF
6111
6112fi
6113
Guido van Rossum627b2d71993-12-24 10:39:16 +00006114done
6115
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006116ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006117for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006118 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6120$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Antoine 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 \
Ross Lagerwallbc808222011-06-25 12:13:40 +02009342 sigaction sigaltstack siginterrupt sigpending sigrelse \
9343 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009344 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009345 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
9346 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009347do :
9348 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9349ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009350if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009351 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009352#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009353_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009354
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009355fi
9356done
9357
Michael W. Hudson54241132001-12-07 15:38:26 +00009358
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009359# For some functions, having a definition is not sufficient, since
9360# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9362$as_echo_n "checking for chroot... " >&6; }
9363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009364/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009365#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009366int
9367main ()
9368{
9369void *x=chroot
9370 ;
9371 return 0;
9372}
9373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009374if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009375
Matthias Kloseb9621712010-04-24 17:59:49 +00009376$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009377
Matthias Kloseb159a552010-04-25 21:00:44 +00009378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009379$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009380else
Matthias Kloseb9621712010-04-24 17:59:49 +00009381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9382$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009383
9384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9387$as_echo_n "checking for link... " >&6; }
9388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009389/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009390#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009391int
9392main ()
9393{
9394void *x=link
9395 ;
9396 return 0;
9397}
9398_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009399if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009400
Matthias Kloseb9621712010-04-24 17:59:49 +00009401$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009402
Matthias Kloseb159a552010-04-25 21:00:44 +00009403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009404$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009405else
Matthias Kloseb9621712010-04-24 17:59:49 +00009406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9407$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009408
9409fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9412$as_echo_n "checking for symlink... " >&6; }
9413cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009414/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009415#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009416int
9417main ()
9418{
9419void *x=symlink
9420 ;
9421 return 0;
9422}
9423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009424if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009425
Matthias Kloseb9621712010-04-24 17:59:49 +00009426$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009427
Matthias Kloseb159a552010-04-25 21:00:44 +00009428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009429$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009430else
Matthias Kloseb9621712010-04-24 17:59:49 +00009431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9432$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009433
9434fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9437$as_echo_n "checking for fchdir... " >&6; }
9438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009439/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009440#include <unistd.h>
9441int
9442main ()
9443{
9444void *x=fchdir
9445 ;
9446 return 0;
9447}
9448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009449if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009450
Matthias Kloseb9621712010-04-24 17:59:49 +00009451$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009452
Matthias Kloseb159a552010-04-25 21:00:44 +00009453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009454$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009455else
Matthias Kloseb9621712010-04-24 17:59:49 +00009456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9457$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009458
9459fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9462$as_echo_n "checking for fsync... " >&6; }
9463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009464/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009465#include <unistd.h>
9466int
9467main ()
9468{
9469void *x=fsync
9470 ;
9471 return 0;
9472}
9473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009474if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009475
Matthias Kloseb9621712010-04-24 17:59:49 +00009476$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009477
Matthias Kloseb159a552010-04-25 21:00:44 +00009478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009479$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009480else
Matthias Kloseb9621712010-04-24 17:59:49 +00009481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9482$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009483
9484fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9487$as_echo_n "checking for fdatasync... " >&6; }
9488cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009489/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009490#include <unistd.h>
9491int
9492main ()
9493{
9494void *x=fdatasync
9495 ;
9496 return 0;
9497}
9498_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009499if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009500
Matthias Kloseb9621712010-04-24 17:59:49 +00009501$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009502
Matthias Kloseb159a552010-04-25 21:00:44 +00009503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009504$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009505else
Matthias Kloseb9621712010-04-24 17:59:49 +00009506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9507$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009508
9509fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9512$as_echo_n "checking for epoll... " >&6; }
9513cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009514/* end confdefs.h. */
9515#include <sys/epoll.h>
9516int
9517main ()
9518{
9519void *x=epoll_create
9520 ;
9521 return 0;
9522}
9523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009524if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009525
Matthias Kloseb9621712010-04-24 17:59:49 +00009526$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009527
Matthias Kloseb159a552010-04-25 21:00:44 +00009528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009529$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009530else
Matthias Kloseb9621712010-04-24 17:59:49 +00009531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9532$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009533
9534fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9537$as_echo_n "checking for kqueue... " >&6; }
9538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009539/* end confdefs.h. */
9540
9541#include <sys/types.h>
9542#include <sys/event.h>
9543
9544int
9545main ()
9546{
9547int x=kqueue()
9548 ;
9549 return 0;
9550}
9551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009552if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009553
Matthias Kloseb9621712010-04-24 17:59:49 +00009554$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009555
Matthias Kloseb159a552010-04-25 21:00:44 +00009556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009557$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009558else
Matthias Kloseb9621712010-04-24 17:59:49 +00009559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9560$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009561
9562fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009564# On some systems (eg. FreeBSD 5), we would find a definition of the
9565# functions ctermid_r, setgroups in the library, but no prototype
9566# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9567# address to avoid compiler warnings and potential miscompilations
9568# because of the missing prototypes.
9569
Matthias Kloseb9621712010-04-24 17:59:49 +00009570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9571$as_echo_n "checking for ctermid_r... " >&6; }
9572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009573/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009574
Martin v. Löwisd5843682002-11-21 20:41:28 +00009575#include <stdio.h>
9576
Martin v. Löwisd5843682002-11-21 20:41:28 +00009577int
9578main ()
9579{
9580void* p = ctermid_r
9581 ;
9582 return 0;
9583}
9584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009585if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009586
Matthias Kloseb9621712010-04-24 17:59:49 +00009587$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009588
Matthias Kloseb159a552010-04-25 21:00:44 +00009589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009590$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009591else
Matthias Kloseb9621712010-04-24 17:59:49 +00009592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9593$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009594
9595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9597
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9599$as_echo_n "checking for flock declaration... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009600if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009601 $as_echo_n "(cached) " >&6
9602else
9603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009604/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009605#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009606int
9607main ()
9608{
9609void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009610
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009611 ;
9612 return 0;
9613}
9614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009615if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009616 ac_cv_flock_decl=yes
9617else
9618 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009619
9620fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009622
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009623fi
9624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9625$as_echo "$ac_cv_flock_decl" >&6; }
9626if test "x${ac_cv_flock_decl}" = xyes; then
9627 for ac_func in flock
9628do :
9629 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009630if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009631 cat >>confdefs.h <<_ACEOF
9632#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009633_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009634
Antoine Pitroua3000072010-09-07 14:52:42 +00009635else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009637$as_echo_n "checking for flock in -lbsd... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009638if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009639 $as_echo_n "(cached) " >&6
9640else
9641 ac_check_lib_save_LIBS=$LIBS
9642LIBS="-lbsd $LIBS"
9643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9644/* end confdefs.h. */
9645
9646/* Override any GCC internal prototype to avoid an error.
9647 Use char because int might match the return type of a GCC
9648 builtin and then its argument prototype would still apply. */
9649#ifdef __cplusplus
9650extern "C"
9651#endif
9652char flock ();
9653int
9654main ()
9655{
9656return flock ();
9657 ;
9658 return 0;
9659}
9660_ACEOF
9661if ac_fn_c_try_link "$LINENO"; then :
9662 ac_cv_lib_bsd_flock=yes
9663else
9664 ac_cv_lib_bsd_flock=no
9665fi
9666rm -f core conftest.err conftest.$ac_objext \
9667 conftest$ac_exeext conftest.$ac_ext
9668LIBS=$ac_check_lib_save_LIBS
9669fi
9670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9671$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009672if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009673 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009674
9675
9676$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9677
9678
9679fi
9680
9681
9682fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009683done
9684
Antoine Pitroua3000072010-09-07 14:52:42 +00009685fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009686
Matthias Kloseb9621712010-04-24 17:59:49 +00009687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9688$as_echo_n "checking for getpagesize... " >&6; }
9689cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009690/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009691
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009692#include <unistd.h>
9693
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009694int
9695main ()
9696{
9697void* p = getpagesize
9698 ;
9699 return 0;
9700}
9701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009702if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009703
Matthias Kloseb9621712010-04-24 17:59:49 +00009704$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009705
Matthias Kloseb159a552010-04-25 21:00:44 +00009706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009707$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009708else
Matthias Kloseb9621712010-04-24 17:59:49 +00009709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9710$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009711
9712fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009714
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mallopt can set malloc mmap threshold" >&5
9716$as_echo_n "checking whether mallopt can set malloc mmap threshold... " >&6; }
9717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9718/* end confdefs.h. */
9719
9720#include <malloc.h>
9721
9722int
9723main ()
9724{
9725mallopt(M_MMAP_THRESHOLD, 256 * 1024)
9726 ;
9727 return 0;
9728}
9729_ACEOF
9730if ac_fn_c_try_compile "$LINENO"; then :
9731
9732$as_echo "#define HAVE_MALLOPT_MMAP_THRESHOLD 1" >>confdefs.h
9733
9734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9735$as_echo "yes" >&6; }
9736else
9737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9738$as_echo "no" >&6; }
9739
9740fi
9741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9742
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009743for ac_prog in true
9744do
9745 # Extract the first word of "$ac_prog", so it can be a program name with args.
9746set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9748$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009749if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009750 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009751else
9752 if test -n "$TRUE"; then
9753 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9754else
9755as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9756for as_dir in $PATH
9757do
9758 IFS=$as_save_IFS
9759 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009760 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009761 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 +00009762 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009763 $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 +00009764 break 2
9765 fi
9766done
Matthias Kloseb9621712010-04-24 17:59:49 +00009767 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009768IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009769
9770fi
9771fi
9772TRUE=$ac_cv_prog_TRUE
9773if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9775$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009776else
Matthias Kloseb9621712010-04-24 17:59:49 +00009777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9778$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009779fi
9780
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009781
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009782 test -n "$TRUE" && break
9783done
9784test -n "$TRUE" || TRUE="/bin/true"
9785
9786
Matthias Kloseb9621712010-04-24 17:59:49 +00009787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9788$as_echo_n "checking for inet_aton in -lc... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009789if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009790 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009791else
9792 ac_check_lib_save_LIBS=$LIBS
9793LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009795/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009796
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009797/* Override any GCC internal prototype to avoid an error.
9798 Use char because int might match the return type of a GCC
9799 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009800#ifdef __cplusplus
9801extern "C"
9802#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009803char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009804int
9805main ()
9806{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009807return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009808 ;
9809 return 0;
9810}
9811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009812if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009813 ac_cv_lib_c_inet_aton=yes
9814else
Matthias Kloseb9621712010-04-24 17:59:49 +00009815 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009816fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009817rm -f core conftest.err conftest.$ac_objext \
9818 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009819LIBS=$ac_check_lib_save_LIBS
9820fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9822$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009823if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009824 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009825else
Matthias Kloseb9621712010-04-24 17:59:49 +00009826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9827$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009828if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009829 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009830else
9831 ac_check_lib_save_LIBS=$LIBS
9832LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009833cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009834/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009835
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009836/* Override any GCC internal prototype to avoid an error.
9837 Use char because int might match the return type of a GCC
9838 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009839#ifdef __cplusplus
9840extern "C"
9841#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009842char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009843int
9844main ()
9845{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009846return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009847 ;
9848 return 0;
9849}
9850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009851if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009852 ac_cv_lib_resolv_inet_aton=yes
9853else
Matthias Kloseb9621712010-04-24 17:59:49 +00009854 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009856rm -f core conftest.err conftest.$ac_objext \
9857 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009858LIBS=$ac_check_lib_save_LIBS
9859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9861$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009862if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009863 cat >>confdefs.h <<_ACEOF
9864#define HAVE_LIBRESOLV 1
9865_ACEOF
9866
9867 LIBS="-lresolv $LIBS"
9868
9869fi
9870
9871
9872fi
9873
9874
Christian Heimesd0764e22007-12-04 15:00:33 +00009875# On Tru64, chflags seems to be present, but calling it will
9876# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9878$as_echo_n "checking for chflags... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009879if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009880 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009881else
Matthias Kloseb9621712010-04-24 17:59:49 +00009882 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009883 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009884else
Matthias Kloseb9621712010-04-24 17:59:49 +00009885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009886/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009887
Christian Heimesd0764e22007-12-04 15:00:33 +00009888#include <sys/stat.h>
9889#include <unistd.h>
9890int main(int argc, char*argv[])
9891{
9892 if(chflags(argv[0], 0) != 0)
9893 return 1;
9894 return 0;
9895}
Ned Deily3eb67d52011-06-28 00:00:28 -07009896
Christian Heimesd0764e22007-12-04 15:00:33 +00009897_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009898if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009899 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009900else
Matthias Kloseb9621712010-04-24 17:59:49 +00009901 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009903rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9904 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009905fi
9906
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009907
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009908fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9910$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009911if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009912 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009913if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009914 ac_cv_have_chflags="yes"
9915else
9916 ac_cv_have_chflags="no"
9917fi
9918
9919fi
9920if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009921
Matthias Kloseb9621712010-04-24 17:59:49 +00009922$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009923
9924fi
9925
Matthias Kloseb9621712010-04-24 17:59:49 +00009926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9927$as_echo_n "checking for lchflags... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009928if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009929 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009930else
Matthias Kloseb9621712010-04-24 17:59:49 +00009931 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009932 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009933else
Matthias Kloseb9621712010-04-24 17:59:49 +00009934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009935/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009936
Christian Heimesd0764e22007-12-04 15:00:33 +00009937#include <sys/stat.h>
9938#include <unistd.h>
9939int main(int argc, char*argv[])
9940{
9941 if(lchflags(argv[0], 0) != 0)
9942 return 1;
9943 return 0;
9944}
Ned Deily3eb67d52011-06-28 00:00:28 -07009945
Christian Heimesd0764e22007-12-04 15:00:33 +00009946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009947if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009948 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009949else
Matthias Kloseb9621712010-04-24 17:59:49 +00009950 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009951fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009952rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9953 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009954fi
9955
9956
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009957fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9959$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009960if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009961 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009962if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009963 ac_cv_have_lchflags="yes"
9964else
9965 ac_cv_have_lchflags="no"
9966fi
9967
9968fi
9969if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009970
Matthias Kloseb9621712010-04-24 17:59:49 +00009971$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009972
9973fi
9974
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009975case $ac_sys_system/$ac_sys_release in
9976Darwin/*)
9977 _CUR_CFLAGS="${CFLAGS}"
9978 _CUR_LDFLAGS="${LDFLAGS}"
9979 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9980 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9981 ;;
9982esac
9983
Matthias Kloseb9621712010-04-24 17:59:49 +00009984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9985$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009986if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009987 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009988else
9989 ac_check_lib_save_LIBS=$LIBS
9990LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009992/* end confdefs.h. */
9993
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009994/* Override any GCC internal prototype to avoid an error.
9995 Use char because int might match the return type of a GCC
9996 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009997#ifdef __cplusplus
9998extern "C"
9999#endif
10000char inflateCopy ();
10001int
10002main ()
10003{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010004return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010005 ;
10006 return 0;
10007}
10008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010009if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010010 ac_cv_lib_z_inflateCopy=yes
10011else
Matthias Kloseb9621712010-04-24 17:59:49 +000010012 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010013fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010014rm -f core conftest.err conftest.$ac_objext \
10015 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010016LIBS=$ac_check_lib_save_LIBS
10017fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10019$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010020if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010021
Matthias Kloseb9621712010-04-24 17:59:49 +000010022$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010023
10024fi
10025
10026
10027case $ac_sys_system/$ac_sys_release in
10028Darwin/*)
10029 CFLAGS="${_CUR_CFLAGS}"
10030 LDFLAGS="${_CUR_LDFLAGS}"
10031 ;;
10032esac
10033
Matthias Kloseb9621712010-04-24 17:59:49 +000010034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10035$as_echo_n "checking for hstrerror... " >&6; }
10036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010037/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010038
Martin v. Löwise9416172003-05-03 10:12:45 +000010039#include <netdb.h>
10040
Martin v. Löwise9416172003-05-03 10:12:45 +000010041int
10042main ()
10043{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010044void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010045 ;
10046 return 0;
10047}
10048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010049if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010050
Matthias Kloseb9621712010-04-24 17:59:49 +000010051$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010052
Matthias Kloseb159a552010-04-25 21:00:44 +000010053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010054$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010055else
Matthias Kloseb9621712010-04-24 17:59:49 +000010056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10057$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010058
10059fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010060rm -f core conftest.err conftest.$ac_objext \
10061 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010062
Matthias Kloseb9621712010-04-24 17:59:49 +000010063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10064$as_echo_n "checking for inet_aton... " >&6; }
10065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010066/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010067
Martin v. Löwis86d66262006-02-17 08:40:11 +000010068#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010069#include <sys/socket.h>
10070#include <netinet/in.h>
10071#include <arpa/inet.h>
10072
Martin v. Löwise9416172003-05-03 10:12:45 +000010073int
10074main ()
10075{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010076void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010077 ;
10078 return 0;
10079}
10080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010081if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010082
Matthias Kloseb9621712010-04-24 17:59:49 +000010083$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010084
Matthias Kloseb159a552010-04-25 21:00:44 +000010085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010086$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010087else
Matthias Kloseb9621712010-04-24 17:59:49 +000010088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10089$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010090
10091fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010092rm -f core conftest.err conftest.$ac_objext \
10093 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010094
Matthias Kloseb9621712010-04-24 17:59:49 +000010095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10096$as_echo_n "checking for inet_pton... " >&6; }
10097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010098/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010099
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010100#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010101#include <sys/socket.h>
10102#include <netinet/in.h>
10103#include <arpa/inet.h>
10104
Martin v. Löwise9416172003-05-03 10:12:45 +000010105int
10106main ()
10107{
10108void* p = inet_pton
10109 ;
10110 return 0;
10111}
10112_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010113if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010114
Matthias Kloseb9621712010-04-24 17:59:49 +000010115$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010116
Matthias Kloseb159a552010-04-25 21:00:44 +000010117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010118$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010119else
Matthias Kloseb9621712010-04-24 17:59:49 +000010120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10121$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010122
10123fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010125
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010126# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10128$as_echo_n "checking for setgroups... " >&6; }
10129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010130/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010131
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010132#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010133#ifdef HAVE_GRP_H
10134#include <grp.h>
10135#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010136
Martin v. Löwisd5843682002-11-21 20:41:28 +000010137int
10138main ()
10139{
10140void* p = setgroups
10141 ;
10142 return 0;
10143}
10144_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010145if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010146
Matthias Kloseb9621712010-04-24 17:59:49 +000010147$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010148
Matthias Kloseb159a552010-04-25 21:00:44 +000010149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010150$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010151else
Matthias Kloseb9621712010-04-24 17:59:49 +000010152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10153$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010154
10155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010157
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010158# check for openpty and forkpty
10159
10160for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010161do :
10162 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010163if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010164 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010165#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010166_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010167
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010168else
Matthias Kloseb9621712010-04-24 17:59:49 +000010169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10170$as_echo_n "checking for openpty in -lutil... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010171if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010172 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010173else
Martin v. Löwis11437992002-04-12 09:54:03 +000010174 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010175LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010177/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010178
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010179/* Override any GCC internal prototype to avoid an error.
10180 Use char because int might match the return type of a GCC
10181 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010182#ifdef __cplusplus
10183extern "C"
10184#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010185char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010186int
10187main ()
10188{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010189return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010190 ;
10191 return 0;
10192}
10193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010194if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010195 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010196else
Matthias Kloseb9621712010-04-24 17:59:49 +000010197 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010198fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010199rm -f core conftest.err conftest.$ac_objext \
10200 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010201LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010202fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10204$as_echo "$ac_cv_lib_util_openpty" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010205if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010206 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010207 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010208else
Matthias Kloseb9621712010-04-24 17:59:49 +000010209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10210$as_echo_n "checking for openpty in -lbsd... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010211if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010212 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010213else
10214 ac_check_lib_save_LIBS=$LIBS
10215LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010217/* end confdefs.h. */
10218
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010219/* Override any GCC internal prototype to avoid an error.
10220 Use char because int might match the return type of a GCC
10221 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010222#ifdef __cplusplus
10223extern "C"
10224#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010225char openpty ();
10226int
10227main ()
10228{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010229return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010230 ;
10231 return 0;
10232}
10233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010234if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010235 ac_cv_lib_bsd_openpty=yes
10236else
Matthias Kloseb9621712010-04-24 17:59:49 +000010237 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010239rm -f core conftest.err conftest.$ac_objext \
10240 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010241LIBS=$ac_check_lib_save_LIBS
10242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10244$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010245if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010246 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010247 LIBS="$LIBS -lbsd"
10248fi
10249
10250
10251fi
10252
Fred Drake8cef4cf2000-06-28 16:40:38 +000010253
10254fi
10255done
10256
10257for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010258do :
10259 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010260if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010261 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010262#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010263_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010264
Fred Drake8cef4cf2000-06-28 16:40:38 +000010265else
Matthias Kloseb9621712010-04-24 17:59:49 +000010266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10267$as_echo_n "checking for forkpty in -lutil... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010268if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010269 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010270else
Martin v. Löwis11437992002-04-12 09:54:03 +000010271 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010272LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010274/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010275
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010276/* Override any GCC internal prototype to avoid an error.
10277 Use char because int might match the return type of a GCC
10278 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010279#ifdef __cplusplus
10280extern "C"
10281#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010282char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010283int
10284main ()
10285{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010286return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010287 ;
10288 return 0;
10289}
10290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010291if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010292 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010293else
Matthias Kloseb9621712010-04-24 17:59:49 +000010294 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010295fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010296rm -f core conftest.err conftest.$ac_objext \
10297 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010298LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010299fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10301$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010302if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010303 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010304 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010305else
Matthias Kloseb9621712010-04-24 17:59:49 +000010306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10307$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010308if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010309 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010310else
10311 ac_check_lib_save_LIBS=$LIBS
10312LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010314/* end confdefs.h. */
10315
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010316/* Override any GCC internal prototype to avoid an error.
10317 Use char because int might match the return type of a GCC
10318 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010319#ifdef __cplusplus
10320extern "C"
10321#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010322char forkpty ();
10323int
10324main ()
10325{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010326return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010327 ;
10328 return 0;
10329}
10330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010331if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010332 ac_cv_lib_bsd_forkpty=yes
10333else
Matthias Kloseb9621712010-04-24 17:59:49 +000010334 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010335fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010336rm -f core conftest.err conftest.$ac_objext \
10337 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010338LIBS=$ac_check_lib_save_LIBS
10339fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10341$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010342if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010343 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010344 LIBS="$LIBS -lbsd"
10345fi
10346
10347
10348fi
10349
Fred Drake8cef4cf2000-06-28 16:40:38 +000010350
10351fi
10352done
10353
Jack Jansendd19cf82001-12-06 22:36:17 +000010354
Christian Heimesb186d002008-03-18 15:15:01 +000010355# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010356for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010357do :
10358 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010359if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010360 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010361#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010362_ACEOF
10363
10364fi
10365done
10366
10367
Michael W. Hudson54241132001-12-07 15:38:26 +000010368# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010369for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010370do :
10371 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10372ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010373if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010374 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010375#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010376_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010377
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010378fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010379done
10380
Michael W. Hudson54241132001-12-07 15:38:26 +000010381
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010382ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010383if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010384 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010385
Martin v. Löwis1142de32002-03-29 16:28:31 +000010386else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010387 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010388 *" dup2.$ac_objext "* ) ;;
10389 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010390 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010391esac
10392
Martin v. Löwis1142de32002-03-29 16:28:31 +000010393fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010394
10395ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010396if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010397 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10398
10399else
10400 case " $LIBOBJS " in
10401 *" getcwd.$ac_objext "* ) ;;
10402 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10403 ;;
10404esac
10405
10406fi
10407
10408ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010409if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010410 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10411
10412else
10413 case " $LIBOBJS " in
10414 *" strdup.$ac_objext "* ) ;;
10415 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10416 ;;
10417esac
10418
10419fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010420
10421
10422for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010423do :
10424 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010425if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010426 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010427#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010430/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010431#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010432int
10433main ()
10434{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010435getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010436 ;
10437 return 0;
10438}
10439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010440if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010441
Matthias Kloseb9621712010-04-24 17:59:49 +000010442$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010443
Guido van Rossum627b2d71993-12-24 10:39:16 +000010444fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010446
Guido van Rossum627b2d71993-12-24 10:39:16 +000010447fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010448done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010449
Jack Jansen150753c2003-03-29 22:07:47 +000010450for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010451do :
10452 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010453if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010454 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010455#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010458/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010459#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010460int
10461main ()
10462{
10463setpgrp(0,0);
10464 ;
10465 return 0;
10466}
10467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010468if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010469
Matthias Kloseb9621712010-04-24 17:59:49 +000010470$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010471
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010472fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010474
10475fi
10476done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010477
Thomas Wouters3a584202000-08-05 23:28:51 +000010478for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010479do :
10480 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010481if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010482 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010483#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010486/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010487#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010488int
10489main ()
10490{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010491gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010492 ;
10493 return 0;
10494}
10495_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010496if ac_fn_c_try_compile "$LINENO"; then :
10497
Guido van Rossum627b2d71993-12-24 10:39:16 +000010498else
Skip Montanaro6dead952003-09-25 14:50:04 +000010499
Matthias Kloseb9621712010-04-24 17:59:49 +000010500$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010501
Martin v. Löwis11437992002-04-12 09:54:03 +000010502
Guido van Rossum627b2d71993-12-24 10:39:16 +000010503fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010505
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010506fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010507done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010508
Michael W. Hudson54241132001-12-07 15:38:26 +000010509
Matthias Kloseb9621712010-04-24 17:59:49 +000010510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10511$as_echo_n "checking for major... " >&6; }
10512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010513/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010514
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010515#if defined(MAJOR_IN_MKDEV)
10516#include <sys/mkdev.h>
10517#elif defined(MAJOR_IN_SYSMACROS)
10518#include <sys/sysmacros.h>
10519#else
10520#include <sys/types.h>
10521#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010522
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010523int
10524main ()
10525{
10526
10527 makedev(major(0),minor(0));
10528
10529 ;
10530 return 0;
10531}
10532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010533if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010534
10535
Matthias Kloseb9621712010-04-24 17:59:49 +000010536$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010537
Matthias Kloseb9621712010-04-24 17:59:49 +000010538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10539$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010540
10541else
Skip Montanaro6dead952003-09-25 14:50:04 +000010542
Matthias Kloseb9621712010-04-24 17:59:49 +000010543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10544$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010545
10546fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010547rm -f core conftest.err conftest.$ac_objext \
10548 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010549
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010550# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010551# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10553$as_echo_n "checking for getaddrinfo... " >&6; }
10554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010555/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010556
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010557#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010558#include <sys/socket.h>
10559#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010560#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010561
Martin v. Löwis11437992002-04-12 09:54:03 +000010562int
10563main ()
10564{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010565getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010566 ;
10567 return 0;
10568}
10569_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010570if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010571 have_getaddrinfo=yes
10572else
Matthias Kloseb9621712010-04-24 17:59:49 +000010573 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010574fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010575rm -f core conftest.err conftest.$ac_objext \
10576 conftest$ac_exeext conftest.$ac_ext
10577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10578$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010579if test $have_getaddrinfo = yes
10580then
Matthias Kloseb9621712010-04-24 17:59:49 +000010581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10582$as_echo_n "checking getaddrinfo bug... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010583 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010584 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010585else
Matthias Kloseb9621712010-04-24 17:59:49 +000010586 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010587 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010588else
Matthias Kloseb9621712010-04-24 17:59:49 +000010589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010590/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010591
10592#include <sys/types.h>
10593#include <netdb.h>
10594#include <string.h>
10595#include <sys/socket.h>
10596#include <netinet/in.h>
10597
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010598int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010599{
10600 int passive, gaierr, inet4 = 0, inet6 = 0;
10601 struct addrinfo hints, *ai, *aitop;
10602 char straddr[INET6_ADDRSTRLEN], strport[16];
10603
10604 for (passive = 0; passive <= 1; passive++) {
10605 memset(&hints, 0, sizeof(hints));
10606 hints.ai_family = AF_UNSPEC;
10607 hints.ai_flags = passive ? AI_PASSIVE : 0;
10608 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010609 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010610 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10611 (void)gai_strerror(gaierr);
10612 goto bad;
10613 }
10614 for (ai = aitop; ai; ai = ai->ai_next) {
10615 if (ai->ai_addr == NULL ||
10616 ai->ai_addrlen == 0 ||
10617 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10618 straddr, sizeof(straddr), strport, sizeof(strport),
10619 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10620 goto bad;
10621 }
10622 switch (ai->ai_family) {
10623 case AF_INET:
10624 if (strcmp(strport, "54321") != 0) {
10625 goto bad;
10626 }
10627 if (passive) {
10628 if (strcmp(straddr, "0.0.0.0") != 0) {
10629 goto bad;
10630 }
10631 } else {
10632 if (strcmp(straddr, "127.0.0.1") != 0) {
10633 goto bad;
10634 }
10635 }
10636 inet4++;
10637 break;
10638 case AF_INET6:
10639 if (strcmp(strport, "54321") != 0) {
10640 goto bad;
10641 }
10642 if (passive) {
10643 if (strcmp(straddr, "::") != 0) {
10644 goto bad;
10645 }
10646 } else {
10647 if (strcmp(straddr, "::1") != 0) {
10648 goto bad;
10649 }
10650 }
10651 inet6++;
10652 break;
10653 case AF_UNSPEC:
10654 goto bad;
10655 break;
10656 default:
10657 /* another family support? */
10658 break;
10659 }
10660 }
10661 }
10662
10663 if (!(inet4 == 0 || inet4 == 2))
10664 goto bad;
10665 if (!(inet6 == 0 || inet6 == 2))
10666 goto bad;
10667
10668 if (aitop)
10669 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010670 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010671
10672 bad:
10673 if (aitop)
10674 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010675 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010676}
10677
Martin v. Löwis11437992002-04-12 09:54:03 +000010678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010679if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010680 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010681else
Matthias Kloseb9621712010-04-24 17:59:49 +000010682 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010683fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010684rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10685 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010686fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010687
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010688fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010689
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010690fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010691
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10693$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10694
Mark Dickinson2df5d282009-12-31 21:22:50 +000010695if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010696then
10697 if test $ipv6 = yes
10698 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010699 echo 'Fatal: You must get working getaddrinfo() function.'
10700 echo ' or you can specify "--disable-ipv6"'.
10701 exit 1
10702 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010703else
Martin v. Löwis11437992002-04-12 09:54:03 +000010704
Matthias Kloseb9621712010-04-24 17:59:49 +000010705$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010706
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010707fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010708
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010709for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010710do :
10711 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010712if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010713 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010714#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010715_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010716
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010717fi
10718done
10719
Michael W. Hudson54241132001-12-07 15:38:26 +000010720
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010721# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10723$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010724if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010725 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010726else
Matthias Kloseb9621712010-04-24 17:59:49 +000010727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010728/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010729#include <sys/types.h>
10730#include <sys/time.h>
10731#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010732
Martin v. Löwis11437992002-04-12 09:54:03 +000010733int
10734main ()
10735{
10736if ((struct tm *) 0)
10737return 0;
10738 ;
10739 return 0;
10740}
10741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010742if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010743 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010744else
Matthias Kloseb9621712010-04-24 17:59:49 +000010745 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010746fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010748fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10750$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010751if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010752
Matthias Kloseb9621712010-04-24 17:59:49 +000010753$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010754
10755fi
10756
Matthias Kloseb9621712010-04-24 17:59:49 +000010757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10758$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010759if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010760 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010761else
Matthias Kloseb9621712010-04-24 17:59:49 +000010762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010763/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010764#include <sys/types.h>
10765#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010766
Martin v. Löwis11437992002-04-12 09:54:03 +000010767int
10768main ()
10769{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010770struct tm tm;
10771 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010772 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010773 ;
10774 return 0;
10775}
10776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010777if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010778 ac_cv_struct_tm=time.h
10779else
Matthias Kloseb9621712010-04-24 17:59:49 +000010780 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010781fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010783fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10785$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010786if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010787
Matthias Kloseb9621712010-04-24 17:59:49 +000010788$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010789
10790fi
10791
Matthias Kloseb9621712010-04-24 17:59:49 +000010792ac_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 +000010793#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010794
Matthias Kloseb9621712010-04-24 17:59:49 +000010795"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010796if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010797
10798cat >>confdefs.h <<_ACEOF
10799#define HAVE_STRUCT_TM_TM_ZONE 1
10800_ACEOF
10801
10802
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010803fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010804
Martin v. Löwis11437992002-04-12 09:54:03 +000010805if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10806
Matthias Kloseb9621712010-04-24 17:59:49 +000010807$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010808
10809else
Matthias Kloseb9621712010-04-24 17:59:49 +000010810 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10811"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010812if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010813 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010814else
Matthias Kloseb9621712010-04-24 17:59:49 +000010815 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010816fi
10817
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010818cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010819#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010820_ACEOF
10821
Matthias Kloseb9621712010-04-24 17:59:49 +000010822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10823$as_echo_n "checking for tzname... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010824if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010825 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010826else
Matthias Kloseb9621712010-04-24 17:59:49 +000010827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010828/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010829#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010830#if !HAVE_DECL_TZNAME
10831extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010832#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010833
Martin v. Löwis11437992002-04-12 09:54:03 +000010834int
10835main ()
10836{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010837return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010838 ;
10839 return 0;
10840}
10841_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010842if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010843 ac_cv_var_tzname=yes
10844else
Matthias Kloseb9621712010-04-24 17:59:49 +000010845 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010846fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010847rm -f core conftest.err conftest.$ac_objext \
10848 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010849fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10851$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010852 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010853
Matthias Kloseb9621712010-04-24 17:59:49 +000010854$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010855
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010856 fi
10857fi
10858
Matthias Kloseb9621712010-04-24 17:59:49 +000010859ac_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 +020010860if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010861
10862cat >>confdefs.h <<_ACEOF
10863#define HAVE_STRUCT_STAT_ST_RDEV 1
10864_ACEOF
10865
10866
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010867fi
10868
Matthias Kloseb9621712010-04-24 17:59:49 +000010869ac_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 +020010870if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010871
Martin v. Löwis11437992002-04-12 09:54:03 +000010872cat >>confdefs.h <<_ACEOF
10873#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10874_ACEOF
10875
10876
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010877fi
10878
Matthias Kloseb9621712010-04-24 17:59:49 +000010879ac_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 +020010880if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010881
10882cat >>confdefs.h <<_ACEOF
10883#define HAVE_STRUCT_STAT_ST_FLAGS 1
10884_ACEOF
10885
10886
10887fi
10888
Matthias Kloseb9621712010-04-24 17:59:49 +000010889ac_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 +020010890if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010891
10892cat >>confdefs.h <<_ACEOF
10893#define HAVE_STRUCT_STAT_ST_GEN 1
10894_ACEOF
10895
10896
10897fi
10898
Matthias Kloseb9621712010-04-24 17:59:49 +000010899ac_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 +020010900if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010901
10902cat >>confdefs.h <<_ACEOF
10903#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10904_ACEOF
10905
10906
10907fi
10908
Matthias Kloseb9621712010-04-24 17:59:49 +000010909ac_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 +020010910if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010911
Martin v. Löwis11437992002-04-12 09:54:03 +000010912cat >>confdefs.h <<_ACEOF
10913#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10914_ACEOF
10915
10916
Matthias Kloseb9621712010-04-24 17:59:49 +000010917$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010918
10919else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010920 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010921 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010922 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10923 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010924esac
10925
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010926fi
10927
Michael W. Hudson54241132001-12-07 15:38:26 +000010928
Martin v. Löwis11437992002-04-12 09:54:03 +000010929
Matthias Kloseb9621712010-04-24 17:59:49 +000010930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10931$as_echo_n "checking for time.h that defines altzone... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010932if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010933 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010934else
Matthias Kloseb159a552010-04-25 21:00:44 +000010935
Matthias Kloseb9621712010-04-24 17:59:49 +000010936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010937/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010938#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010939int
10940main ()
10941{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010942return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010943 ;
10944 return 0;
10945}
10946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010947if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010948 ac_cv_header_time_altzone=yes
10949else
Matthias Kloseb9621712010-04-24 17:59:49 +000010950 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010951fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010953
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010954fi
10955
Matthias Kloseb9621712010-04-24 17:59:49 +000010956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10957$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010958if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010959
Matthias Kloseb9621712010-04-24 17:59:49 +000010960$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010961
10962fi
10963
Guido van Rossumda88dad1995-01-26 00:46:29 +000010964was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10966$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10967cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010968/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010969
10970#include <sys/types.h>
10971#include <sys/select.h>
10972#include <sys/time.h>
10973
Martin v. Löwis11437992002-04-12 09:54:03 +000010974int
10975main ()
10976{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010977;
Martin v. Löwis11437992002-04-12 09:54:03 +000010978 ;
10979 return 0;
10980}
10981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010982if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010983
10984
Matthias Kloseb9621712010-04-24 17:59:49 +000010985$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010986
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010987 was_it_defined=yes
10988
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010989fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10992$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010993
Matthias Kloseb9621712010-04-24 17:59:49 +000010994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10995$as_echo_n "checking for addrinfo... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010996if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010997 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010998else
Matthias Kloseb9621712010-04-24 17:59:49 +000010999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011000/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011001#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011002int
11003main ()
11004{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011005struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011006 ;
11007 return 0;
11008}
11009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011010if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011011 ac_cv_struct_addrinfo=yes
11012else
Matthias Kloseb9621712010-04-24 17:59:49 +000011013 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011014fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11016fi
11017
Matthias Kloseb9621712010-04-24 17:59:49 +000011018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11019$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011020if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011021
Matthias Kloseb9621712010-04-24 17:59:49 +000011022$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011023
11024fi
11025
Matthias Kloseb9621712010-04-24 17:59:49 +000011026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11027$as_echo_n "checking for sockaddr_storage... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011028if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011029 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011030else
Matthias Kloseb9621712010-04-24 17:59:49 +000011031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011032/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011033
11034# include <sys/types.h>
11035# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011036int
11037main ()
11038{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011039struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011040 ;
11041 return 0;
11042}
11043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011044if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011045 ac_cv_struct_sockaddr_storage=yes
11046else
Matthias Kloseb9621712010-04-24 17:59:49 +000011047 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011048fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11050fi
11051
Matthias Kloseb9621712010-04-24 17:59:49 +000011052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11053$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011054if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011055
Matthias Kloseb9621712010-04-24 17:59:49 +000011056$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011057
11058fi
11059
Guido van Rossum627b2d71993-12-24 10:39:16 +000011060# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011061
Matthias Kloseb9621712010-04-24 17:59:49 +000011062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11063$as_echo_n "checking whether char is unsigned... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011064if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011065 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011066else
Matthias Kloseb9621712010-04-24 17:59:49 +000011067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011068/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011069$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011070int
11071main ()
11072{
11073static int test_array [1 - 2 * !(((char) -1) < 0)];
11074test_array [0] = 0
11075
11076 ;
11077 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011078}
Martin v. Löwis11437992002-04-12 09:54:03 +000011079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011080if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011081 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011082else
Matthias Kloseb9621712010-04-24 17:59:49 +000011083 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011084fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011086fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11088$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011089if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011090 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011091
11092fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011093
Matthias Kloseb9621712010-04-24 17:59:49 +000011094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11095$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011096if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011097 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011098else
Matthias Kloseb9621712010-04-24 17:59:49 +000011099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011100/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011101
Martin v. Löwis11437992002-04-12 09:54:03 +000011102int
11103main ()
11104{
11105/* FIXME: Include the comments suggested by Paul. */
11106#ifndef __cplusplus
11107 /* Ultrix mips cc rejects this. */
11108 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011109 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011110 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011111 char const *const *pcpcc;
11112 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011113 /* NEC SVR4.0.2 mips cc rejects this. */
11114 struct point {int x, y;};
11115 static struct point const zero = {0,0};
11116 /* AIX XL C 1.02.0.0 rejects this.
11117 It does not let you subtract one const X* pointer from another in
11118 an arm of an if-expression whose if-part is not a constant
11119 expression */
11120 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011121 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011122 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011123 ++pcpcc;
11124 ppc = (char**) pcpcc;
11125 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011126 { /* SCO 3.2v4 cc rejects this. */
11127 char *t;
11128 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011129
Martin v. Löwis11437992002-04-12 09:54:03 +000011130 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011131 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011132 }
11133 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11134 int x[] = {25, 17};
11135 const int *foo = &x[0];
11136 ++foo;
11137 }
11138 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11139 typedef const int *iptr;
11140 iptr p = 0;
11141 ++p;
11142 }
11143 { /* AIX XL C 1.02.0.0 rejects this saying
11144 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11145 struct s { int j; const int *ap[3]; };
11146 struct s *b; b->j = 5;
11147 }
11148 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11149 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011150 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011151 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011152 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011153#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011154
Martin v. Löwis11437992002-04-12 09:54:03 +000011155 ;
11156 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011157}
Martin v. Löwis11437992002-04-12 09:54:03 +000011158_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011159if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011160 ac_cv_c_const=yes
11161else
Matthias Kloseb9621712010-04-24 17:59:49 +000011162 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011165fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11167$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011168if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011169
Matthias Kloseb9621712010-04-24 17:59:49 +000011170$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011171
11172fi
11173
Michael W. Hudson54241132001-12-07 15:38:26 +000011174
Guido van Rossumda88dad1995-01-26 00:46:29 +000011175works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11177$as_echo_n "checking for working volatile... " >&6; }
11178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011179/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011180
Martin v. Löwis11437992002-04-12 09:54:03 +000011181int
11182main ()
11183{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011184volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011185 ;
11186 return 0;
11187}
11188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011189if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011190 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011191else
Skip Montanaro6dead952003-09-25 14:50:04 +000011192
Matthias Kloseb9621712010-04-24 17:59:49 +000011193$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011194
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011195
Guido van Rossum627b2d71993-12-24 10:39:16 +000011196fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11199$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011200
Guido van Rossumda88dad1995-01-26 00:46:29 +000011201works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11203$as_echo_n "checking for working signed char... " >&6; }
11204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011205/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011206
Martin v. Löwis11437992002-04-12 09:54:03 +000011207int
11208main ()
11209{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011210signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011211 ;
11212 return 0;
11213}
11214_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011215if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011216 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011217else
Skip Montanaro6dead952003-09-25 14:50:04 +000011218
Matthias Kloseb9621712010-04-24 17:59:49 +000011219$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011220
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011221
Guido van Rossum7f43da71994-08-01 12:15:30 +000011222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11225$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011226
Guido van Rossumda88dad1995-01-26 00:46:29 +000011227have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11229$as_echo_n "checking for prototypes... " >&6; }
11230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011231/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011232int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011233int
11234main ()
11235{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011236return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011237 ;
11238 return 0;
11239}
11240_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011241if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011242
Matthias Kloseb9621712010-04-24 17:59:49 +000011243$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011244
Matthias Kloseb159a552010-04-25 21:00:44 +000011245 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11249$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011250
Guido van Rossumda88dad1995-01-26 00:46:29 +000011251works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11253$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011255/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011256
11257#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011258int foo(int x, ...) {
11259 va_list va;
11260 va_start(va, x);
11261 va_arg(va, int);
11262 va_arg(va, char *);
11263 va_arg(va, double);
11264 return 0;
11265}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011266
Martin v. Löwis11437992002-04-12 09:54:03 +000011267int
11268main ()
11269{
Guido van Rossum90eea071996-08-30 20:58:57 +000011270return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011271 ;
11272 return 0;
11273}
11274_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011275if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011276
11277
Matthias Kloseb9621712010-04-24 17:59:49 +000011278$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011279
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011280 works=yes
11281
Guido van Rossum627b2d71993-12-24 10:39:16 +000011282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11285$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011286
Martin v. Löwisd6320502004-08-12 13:45:08 +000011287# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11289$as_echo_n "checking for socketpair... " >&6; }
11290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011291/* end confdefs.h. */
11292
11293#include <sys/types.h>
11294#include <sys/socket.h>
11295
11296int
11297main ()
11298{
11299void *x=socketpair
11300 ;
11301 return 0;
11302}
11303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011304if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011305
Matthias Kloseb9621712010-04-24 17:59:49 +000011306$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011307
Matthias Kloseb159a552010-04-25 21:00:44 +000011308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011309$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011310else
Matthias Kloseb9621712010-04-24 17:59:49 +000011311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11312$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011313
11314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011316
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011317# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11319$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011321/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011322#include <sys/types.h>
11323#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011324int
11325main ()
11326{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011327struct sockaddr x;
11328x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011329 ;
11330 return 0;
11331}
11332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011333if ac_fn_c_try_compile "$LINENO"; then :
11334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11335$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011336
Matthias Kloseb9621712010-04-24 17:59:49 +000011337$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011338
11339else
Matthias Kloseb9621712010-04-24 17:59:49 +000011340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11341$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011342
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011345
Guido van Rossumda88dad1995-01-26 00:46:29 +000011346va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11348$as_echo_n "checking whether va_list is an array... " >&6; }
11349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011350/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011351
11352#ifdef HAVE_STDARG_PROTOTYPES
11353#include <stdarg.h>
11354#else
11355#include <varargs.h>
11356#endif
11357
Martin v. Löwis11437992002-04-12 09:54:03 +000011358int
11359main ()
11360{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011361va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011362 ;
11363 return 0;
11364}
11365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011366if ac_fn_c_try_compile "$LINENO"; then :
11367
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011368else
Skip Montanaro6dead952003-09-25 14:50:04 +000011369
Martin v. Löwis11437992002-04-12 09:54:03 +000011370
Matthias Kloseb9621712010-04-24 17:59:49 +000011371$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011372
Guido van Rossumda88dad1995-01-26 00:46:29 +000011373 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011374
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11378$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011379
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011380# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011381
11382
Matthias Kloseb9621712010-04-24 17:59:49 +000011383ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011384if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011385
Matthias Kloseb9621712010-04-24 17:59:49 +000011386 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011387
Matthias Kloseb9621712010-04-24 17:59:49 +000011388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11389$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011390 OLD_CFLAGS=$CFLAGS
11391 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011393/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011394
11395# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011396
Martin v. Löwis11437992002-04-12 09:54:03 +000011397int
11398main ()
11399{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011400
11401 char *name;
11402 struct hostent *he, *res;
11403 char buffer[2048];
11404 int buflen = 2048;
11405 int h_errnop;
11406
11407 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011408
11409 ;
11410 return 0;
11411}
11412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011413if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011414
Matthias Kloseb9621712010-04-24 17:59:49 +000011415 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011416
Martin v. Löwis11437992002-04-12 09:54:03 +000011417
Matthias Kloseb9621712010-04-24 17:59:49 +000011418$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011419
Matthias Kloseb9621712010-04-24 17:59:49 +000011420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11421$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011422
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011423else
Skip Montanaro6dead952003-09-25 14:50:04 +000011424
Matthias Kloseb9621712010-04-24 17:59:49 +000011425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11426$as_echo "no" >&6; }
11427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11428$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011430/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011431
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011432# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011433
Martin v. Löwis11437992002-04-12 09:54:03 +000011434int
11435main ()
11436{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011437
11438 char *name;
11439 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011440 char buffer[2048];
11441 int buflen = 2048;
11442 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011443
Matthias Kloseb159a552010-04-25 21:00:44 +000011444 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011445
11446 ;
11447 return 0;
11448}
11449_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011450if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011451
Matthias Kloseb9621712010-04-24 17:59:49 +000011452 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011453
Martin v. Löwis11437992002-04-12 09:54:03 +000011454
Matthias Kloseb159a552010-04-25 21:00:44 +000011455$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011456
Matthias Kloseb9621712010-04-24 17:59:49 +000011457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11458$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011459
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011460else
Skip Montanaro6dead952003-09-25 14:50:04 +000011461
Matthias Kloseb9621712010-04-24 17:59:49 +000011462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11463$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11465$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11467/* end confdefs.h. */
11468
11469# include <netdb.h>
11470
11471int
11472main ()
11473{
11474
11475 char *name;
11476 struct hostent *he;
11477 struct hostent_data data;
11478
11479 (void) gethostbyname_r(name, he, &data);
11480
11481 ;
11482 return 0;
11483}
11484_ACEOF
11485if ac_fn_c_try_compile "$LINENO"; then :
11486
11487 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11488
11489
11490$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11491
11492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11493$as_echo "yes" >&6; }
11494
11495else
11496
11497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11498$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011499
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011500fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011502
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011503fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011505
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011506fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011508 CFLAGS=$OLD_CFLAGS
11509
11510else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011511
Matthias Kloseb9621712010-04-24 17:59:49 +000011512 for ac_func in gethostbyname
11513do :
11514 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011515if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011516 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011517#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011518_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011519
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011520fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011521done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011522
Michael W. Hudson54241132001-12-07 15:38:26 +000011523
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011524fi
11525
Michael W. Hudson54241132001-12-07 15:38:26 +000011526
11527
11528
11529
11530
11531
Guido van Rossum627b2d71993-12-24 10:39:16 +000011532# checks for system services
11533# (none yet)
11534
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011535# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011536ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011537if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011538
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011539else
Matthias Kloseb9621712010-04-24 17:59:49 +000011540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11541$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011542if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011543 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011544else
Martin v. Löwis11437992002-04-12 09:54:03 +000011545 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011546LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011548/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011549
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011550/* Override any GCC internal prototype to avoid an error.
11551 Use char because int might match the return type of a GCC
11552 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011553#ifdef __cplusplus
11554extern "C"
11555#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011556char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011557int
11558main ()
11559{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011560return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011561 ;
11562 return 0;
11563}
11564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011565if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011566 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011567else
Matthias Kloseb9621712010-04-24 17:59:49 +000011568 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011569fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011570rm -f core conftest.err conftest.$ac_objext \
11571 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011572LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011573fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11575$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011576if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011577 cat >>confdefs.h <<_ACEOF
11578#define HAVE_LIBIEEE 1
11579_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011580
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011581 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011582
Guido van Rossum627b2d71993-12-24 10:39:16 +000011583fi
11584
Michael W. Hudson54241132001-12-07 15:38:26 +000011585
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011586fi
11587
Michael W. Hudson54241132001-12-07 15:38:26 +000011588
Guido van Rossum7f253911997-05-09 02:42:48 +000011589# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11591$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011592
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011593# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011594if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011595 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011596if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011597then
11598
Matthias Kloseb9621712010-04-24 17:59:49 +000011599$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011600
Matthias Kloseb9621712010-04-24 17:59:49 +000011601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11602$as_echo "yes" >&6; }
11603else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11604$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011605fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011606else
Matthias Kloseb9621712010-04-24 17:59:49 +000011607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11608$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011609fi
11610
Guido van Rossum7f253911997-05-09 02:42:48 +000011611
Guido van Rossum7f43da71994-08-01 12:15:30 +000011612# check for --with-libm=...
11613
Guido van Rossum563e7081996-09-10 18:20:48 +000011614case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011615Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011616*) LIBM=-lm
11617esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11619$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011620
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011621# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011622if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011623 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011624if test "$withval" = no
11625then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11627$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011628elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011629then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11631$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011632else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011633fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011634else
Matthias Kloseb9621712010-04-24 17:59:49 +000011635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11636$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011637fi
11638
Guido van Rossum7f43da71994-08-01 12:15:30 +000011639
11640# check for --with-libc=...
11641
Matthias Kloseb9621712010-04-24 17:59:49 +000011642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11643$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011644
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011645# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011646if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011647 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011648if test "$withval" = no
11649then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11651$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011652elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011653then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11655$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011656else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011657fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011658else
Matthias Kloseb9621712010-04-24 17:59:49 +000011659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11660$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011661fi
11662
Guido van Rossum7f43da71994-08-01 12:15:30 +000011663
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011664# **************************************************
11665# * Check for various properties of floating point *
11666# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011667
Matthias Kloseb9621712010-04-24 17:59:49 +000011668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11669$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011670if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011671 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011672else
11673
Matthias Kloseb9621712010-04-24 17:59:49 +000011674if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011675 ac_cv_little_endian_double=no
11676else
Matthias Kloseb9621712010-04-24 17:59:49 +000011677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011678/* end confdefs.h. */
11679
11680#include <string.h>
11681int main() {
11682 double x = 9006104071832581.0;
11683 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11684 return 0;
11685 else
11686 return 1;
11687}
11688
11689_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011690if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011691 ac_cv_little_endian_double=yes
11692else
Matthias Kloseb9621712010-04-24 17:59:49 +000011693 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011694fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011695rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11696 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011697fi
11698
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011699fi
11700
Matthias Kloseb9621712010-04-24 17:59:49 +000011701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11702$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011703if test "$ac_cv_little_endian_double" = yes
11704then
11705
Matthias Kloseb9621712010-04-24 17:59:49 +000011706$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011707
11708fi
11709
Matthias Kloseb9621712010-04-24 17:59:49 +000011710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11711$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011712if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011713 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011714else
11715
Matthias Kloseb9621712010-04-24 17:59:49 +000011716if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011717 ac_cv_big_endian_double=no
11718else
Matthias Kloseb9621712010-04-24 17:59:49 +000011719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011720/* end confdefs.h. */
11721
11722#include <string.h>
11723int main() {
11724 double x = 9006104071832581.0;
11725 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11726 return 0;
11727 else
11728 return 1;
11729}
11730
11731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011732if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011733 ac_cv_big_endian_double=yes
11734else
Matthias Kloseb9621712010-04-24 17:59:49 +000011735 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011736fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011737rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11738 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011739fi
11740
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011741fi
11742
Matthias Kloseb9621712010-04-24 17:59:49 +000011743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11744$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011745if test "$ac_cv_big_endian_double" = yes
11746then
11747
Matthias Kloseb9621712010-04-24 17:59:49 +000011748$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011749
11750fi
11751
11752# Some ARM platforms use a mixed-endian representation for doubles.
11753# While Python doesn't currently have full support for these platforms
11754# (see e.g., issue 1762561), we can at least make sure that float <-> string
11755# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11757$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011758if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011759 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011760else
11761
Matthias Kloseb9621712010-04-24 17:59:49 +000011762if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011763 ac_cv_mixed_endian_double=no
11764else
Matthias Kloseb9621712010-04-24 17:59:49 +000011765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011766/* end confdefs.h. */
11767
11768#include <string.h>
11769int main() {
11770 double x = 9006104071832581.0;
11771 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11772 return 0;
11773 else
11774 return 1;
11775}
11776
11777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011778if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011779 ac_cv_mixed_endian_double=yes
11780else
Matthias Kloseb9621712010-04-24 17:59:49 +000011781 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011782fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011783rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11784 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011785fi
11786
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011787fi
11788
Matthias Kloseb9621712010-04-24 17:59:49 +000011789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11790$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011791if test "$ac_cv_mixed_endian_double" = yes
11792then
11793
Matthias Kloseb9621712010-04-24 17:59:49 +000011794$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011795
11796fi
11797
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011798# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011799# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011800# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011801# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011802# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011803# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011804
11805# This inline assembler syntax may also work for suncc and icc,
11806# so we try it on all platforms.
11807
Matthias Kloseb9621712010-04-24 17:59:49 +000011808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11809$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011811/* end confdefs.h. */
11812
11813int
11814main ()
11815{
11816
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011817 unsigned short cw;
11818 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11819 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011820
11821 ;
11822 return 0;
11823}
11824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011825if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011826 have_gcc_asm_for_x87=yes
11827else
Matthias Kloseb9621712010-04-24 17:59:49 +000011828 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011829fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11832$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011833if test "$have_gcc_asm_for_x87" = yes
11834then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011835
Matthias Kloseb9621712010-04-24 17:59:49 +000011836$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011837
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011838fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011839
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011840# Detect whether system arithmetic is subject to x87-style double
11841# rounding issues. The result of this test has little meaning on non
11842# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11843# mode is round-to-nearest and double rounding issues are present, and
11844# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11846$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011847# $BASECFLAGS may affect the result
11848ac_save_cc="$CC"
11849CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011850if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011851 ac_cv_x87_double_rounding=no
11852else
Matthias Kloseb9621712010-04-24 17:59:49 +000011853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011854/* end confdefs.h. */
11855
11856#include <stdlib.h>
11857#include <math.h>
11858int main() {
11859 volatile double x, y, z;
11860 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11861 x = 0.99999999999999989; /* 1-2**-53 */
11862 y = 1./x;
11863 if (y != 1.)
11864 exit(0);
11865 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11866 x = 1e16;
11867 y = 2.99999;
11868 z = x + y;
11869 if (z != 1e16+4.)
11870 exit(0);
11871 /* both tests show evidence of double rounding */
11872 exit(1);
11873}
11874
11875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011876if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011877 ac_cv_x87_double_rounding=no
11878else
Matthias Kloseb9621712010-04-24 17:59:49 +000011879 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011880fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011881rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11882 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011883fi
11884
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011885CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11887$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011888if test "$ac_cv_x87_double_rounding" = yes
11889then
11890
Matthias Kloseb9621712010-04-24 17:59:49 +000011891$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011892
11893fi
11894
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011895# ************************************
11896# * Check for mathematical functions *
11897# ************************************
11898
11899LIBS_SAVE=$LIBS
11900LIBS="$LIBS $LIBM"
11901
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011902for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11903do :
11904 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11905ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011906if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011907 cat >>confdefs.h <<_ACEOF
11908#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11909_ACEOF
11910
11911fi
11912done
11913
Victor Stinner8f9f8d62011-05-09 12:45:41 +020011914for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011915do :
11916 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11917ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011918if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011919 cat >>confdefs.h <<_ACEOF
11920#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11921_ACEOF
11922
11923fi
11924done
11925
11926ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11927"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011928if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011929 ac_have_decl=1
11930else
11931 ac_have_decl=0
11932fi
11933
11934cat >>confdefs.h <<_ACEOF
11935#define HAVE_DECL_ISINF $ac_have_decl
11936_ACEOF
11937ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11938"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011939if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011940 ac_have_decl=1
11941else
11942 ac_have_decl=0
11943fi
11944
11945cat >>confdefs.h <<_ACEOF
11946#define HAVE_DECL_ISNAN $ac_have_decl
11947_ACEOF
11948ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11949"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011950if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011951 ac_have_decl=1
11952else
11953 ac_have_decl=0
11954fi
11955
11956cat >>confdefs.h <<_ACEOF
11957#define HAVE_DECL_ISFINITE $ac_have_decl
11958_ACEOF
11959
11960
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011961# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11962# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11964$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011965if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011966 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011967else
11968
Matthias Kloseb9621712010-04-24 17:59:49 +000011969if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011970 ac_cv_tanh_preserves_zero_sign=no
11971else
Matthias Kloseb9621712010-04-24 17:59:49 +000011972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011973/* end confdefs.h. */
11974
11975#include <math.h>
11976#include <stdlib.h>
11977int main() {
11978 /* return 0 if either negative zeros don't exist
11979 on this platform or if negative zeros exist
11980 and tanh(-0.) == -0. */
11981 if (atan2(0., -1.) == atan2(-0., -1.) ||
11982 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11983 else exit(1);
11984}
11985
11986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011987if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011988 ac_cv_tanh_preserves_zero_sign=yes
11989else
Matthias Kloseb9621712010-04-24 17:59:49 +000011990 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011991fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011992rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11993 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011994fi
11995
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011996fi
11997
Matthias Kloseb9621712010-04-24 17:59:49 +000011998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11999$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012000if test "$ac_cv_tanh_preserves_zero_sign" = yes
12001then
12002
Matthias Kloseb9621712010-04-24 17:59:49 +000012003$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012004
12005fi
12006
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012007if test "$ac_cv_func_log1p" = yes
12008then
12009 # On some versions of AIX, log1p(-0.) returns 0. instead of
12010 # -0. See issue #9920.
12011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12012$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012013 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012014 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012015else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012016
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012017 if test "$cross_compiling" = yes; then :
12018 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012019else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12021/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012022
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012023 #include <math.h>
12024 #include <stdlib.h>
12025 int main() {
12026 /* Fail if the signs of log1p(-0.) and -0. can be
12027 distinguished. */
12028 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12029 return 0;
12030 else
12031 return 1;
12032 }
12033
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012034_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012035if ac_fn_c_try_run "$LINENO"; then :
12036 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012037else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012038 ac_cv_log1p_drops_zero_sign=yes
12039fi
12040rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12041 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012042fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012043
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012044fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012045
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12047$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12048fi
12049if test "$ac_cv_log1p_drops_zero_sign" = yes
12050then
12051
12052$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12053
12054fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012055
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012056LIBS=$LIBS_SAVE
12057
Mark Dickinsona614f042009-11-28 12:48:43 +000012058# For multiprocessing module, check that sem_open
12059# actually works. For FreeBSD versions <= 7.2,
12060# the kernel module that provides POSIX semaphores
12061# isn't loaded by default, so an attempt to call
12062# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12064$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012065if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012066 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012067else
Matthias Kloseb9621712010-04-24 17:59:49 +000012068 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012069 ac_cv_posix_semaphores_enabled=yes
12070else
Matthias Kloseb9621712010-04-24 17:59:49 +000012071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012072/* end confdefs.h. */
12073
12074#include <unistd.h>
12075#include <fcntl.h>
12076#include <stdio.h>
12077#include <semaphore.h>
12078#include <sys/stat.h>
12079
12080int main(void) {
12081 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12082 if (a == SEM_FAILED) {
12083 perror("sem_open");
12084 return 1;
12085 }
12086 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012087 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012088 return 0;
12089}
12090
12091_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012092if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012093 ac_cv_posix_semaphores_enabled=yes
12094else
Matthias Kloseb9621712010-04-24 17:59:49 +000012095 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012096fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012097rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12098 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012099fi
12100
12101
Mark Dickinsona614f042009-11-28 12:48:43 +000012102fi
12103
Matthias Kloseb9621712010-04-24 17:59:49 +000012104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12105$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012106if test $ac_cv_posix_semaphores_enabled = no
12107then
12108
Matthias Kloseb9621712010-04-24 17:59:49 +000012109$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012110
12111fi
12112
Mark Dickinson10683072009-04-18 21:18:19 +000012113# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12115$as_echo_n "checking for broken sem_getvalue... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012116if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012117 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012118else
Matthias Kloseb9621712010-04-24 17:59:49 +000012119 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012120 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012121else
Matthias Kloseb9621712010-04-24 17:59:49 +000012122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012123/* end confdefs.h. */
12124
12125#include <unistd.h>
12126#include <fcntl.h>
12127#include <stdio.h>
12128#include <semaphore.h>
12129#include <sys/stat.h>
12130
12131int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012132 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012133 int count;
12134 int res;
12135 if(a==SEM_FAILED){
12136 perror("sem_open");
12137 return 1;
12138
12139 }
12140 res = sem_getvalue(a, &count);
12141 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012142 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012143 return res==-1 ? 1 : 0;
12144}
12145
Mark Dickinson10683072009-04-18 21:18:19 +000012146_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012147if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012148 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012149else
Matthias Kloseb9621712010-04-24 17:59:49 +000012150 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012151fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012152rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12153 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012154fi
12155
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012156
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012157fi
12158
Matthias Kloseb9621712010-04-24 17:59:49 +000012159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12160$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012161if test $ac_cv_broken_sem_getvalue = yes
12162then
12163
Matthias Kloseb9621712010-04-24 17:59:49 +000012164$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012165
12166fi
12167
Mark Dickinsonbd792642009-03-18 20:06:12 +000012168# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12170$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012171# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012172if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012173 enableval=$enable_big_digits; case $enable_big_digits in
12174yes)
12175 enable_big_digits=30 ;;
12176no)
12177 enable_big_digits=15 ;;
1217815|30)
12179 ;;
12180*)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012181 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 +000012182esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12184$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012185
12186cat >>confdefs.h <<_ACEOF
12187#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12188_ACEOF
12189
12190
12191else
Matthias Kloseb9621712010-04-24 17:59:49 +000012192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12193$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012194fi
12195
12196
Guido van Rossumef2255b2000-03-10 22:30:29 +000012197# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012198ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012199if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012200
12201
Matthias Kloseb9621712010-04-24 17:59:49 +000012202$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012203
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012204 wchar_h="yes"
12205
Guido van Rossumef2255b2000-03-10 22:30:29 +000012206else
Martin v. Löwis11437992002-04-12 09:54:03 +000012207 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012208
12209fi
12210
Michael W. Hudson54241132001-12-07 15:38:26 +000012211
Martin v. Löwis11437992002-04-12 09:54:03 +000012212
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012213# determine wchar_t size
12214if test "$wchar_h" = yes
12215then
Matthias Kloseb9621712010-04-24 17:59:49 +000012216 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012217# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12218# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12219# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12221$as_echo_n "checking size of wchar_t... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012222if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012223 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012224else
Matthias Kloseb9621712010-04-24 17:59:49 +000012225 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12226"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012227
Martin v. Löwis11437992002-04-12 09:54:03 +000012228else
Matthias Kloseb9621712010-04-24 17:59:49 +000012229 if test "$ac_cv_type_wchar_t" = yes; then
12230 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12231$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012232as_fn_error 77 "cannot compute sizeof (wchar_t)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012233See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012234 else
12235 ac_cv_sizeof_wchar_t=0
12236 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012237fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012238
Martin v. Löwis11437992002-04-12 09:54:03 +000012239fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12241$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012242
12243
12244
Martin v. Löwis11437992002-04-12 09:54:03 +000012245cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012246#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012247_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012248
Michael W. Hudson54241132001-12-07 15:38:26 +000012249
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012250fi
12251
Matthias Kloseb9621712010-04-24 17:59:49 +000012252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12253$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012254have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012256/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012257
12258#include <tcl.h>
12259#if TCL_UTF_MAX != 6
12260# error "NOT UCS4_TCL"
12261#endif
12262int
12263main ()
12264{
12265
12266 ;
12267 return 0;
12268}
12269_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012270if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012271
12272
Matthias Kloseb9621712010-04-24 17:59:49 +000012273$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012274
12275 have_ucs4_tcl=yes
12276
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12280$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012281
Skip Montanaro6dead952003-09-25 14:50:04 +000012282# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012283if test "$wchar_h" = yes
12284then
12285 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12287$as_echo_n "checking whether wchar_t is signed... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012288 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012289 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012290else
12291
Matthias Kloseb9621712010-04-24 17:59:49 +000012292 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012293 ac_cv_wchar_t_signed=yes
12294else
Matthias Kloseb9621712010-04-24 17:59:49 +000012295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012296/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012297
12298 #include <wchar.h>
12299 int main()
12300 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012301 /* Success: exit code 0 */
12302 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012303 }
12304
12305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012306if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012307 ac_cv_wchar_t_signed=yes
12308else
Matthias Kloseb9621712010-04-24 17:59:49 +000012309 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012310fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012311rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12312 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012313fi
12314
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012315fi
12316
Matthias Kloseb9621712010-04-24 17:59:49 +000012317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12318$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012319fi
12320
Matthias Kloseb9621712010-04-24 17:59:49 +000012321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12322$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012323
12324# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012325if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012326 withval=$with_wide_unicode;
12327if test "$withval" != no
12328then unicode_size="4"
12329else unicode_size="2"
12330fi
12331
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012332else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012333
Georg Brandl52d168a2008-01-07 18:10:24 +000012334case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012335 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012336 *) unicode_size="2" ;;
12337esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012338
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012339fi
12340
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012341
12342
Georg Brandl52d168a2008-01-07 18:10:24 +000012343case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012344 4)
12345 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12346
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012347 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012348 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012349 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012350 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012351esac
12352
Michael W. Hudson54241132001-12-07 15:38:26 +000012353
Martin v. Löwis11437992002-04-12 09:54:03 +000012354
Georg Brandl52d168a2008-01-07 18:10:24 +000012355# wchar_t is only usable if it maps to an unsigned type
12356if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012357 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012358then
12359 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012360
Matthias Kloseb9621712010-04-24 17:59:49 +000012361$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012362
Matthias Kloseb9621712010-04-24 17:59:49 +000012363 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012364
Georg Brandl52d168a2008-01-07 18:10:24 +000012365elif test "$ac_cv_sizeof_short" = "$unicode_size"
12366then
12367 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012368 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012369
Georg Brandl52d168a2008-01-07 18:10:24 +000012370elif test "$ac_cv_sizeof_long" = "$unicode_size"
12371then
12372 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012373 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012374
Georg Brandl52d168a2008-01-07 18:10:24 +000012375else
12376 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012377fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12379$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012380
12381# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12383$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012384if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012385 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012386else
Matthias Kloseb9621712010-04-24 17:59:49 +000012387 ac_cv_c_bigendian=unknown
12388 # See if we're dealing with a universal compiler.
12389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12390/* end confdefs.h. */
12391#ifndef __APPLE_CC__
12392 not a universal capable compiler
12393 #endif
12394 typedef int dummy;
12395
Skip Montanaro6dead952003-09-25 14:50:04 +000012396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012397if ac_fn_c_try_compile "$LINENO"; then :
12398
12399 # Check for potential -arch flags. It is not universal unless
12400 # there are at least two -arch flags with different values.
12401 ac_arch=
12402 ac_prev=
12403 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12404 if test -n "$ac_prev"; then
12405 case $ac_word in
12406 i?86 | x86_64 | ppc | ppc64)
12407 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12408 ac_arch=$ac_word
12409 else
12410 ac_cv_c_bigendian=universal
12411 break
12412 fi
12413 ;;
12414 esac
12415 ac_prev=
12416 elif test "x$ac_word" = "x-arch"; then
12417 ac_prev=arch
12418 fi
12419 done
12420fi
12421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12422 if test $ac_cv_c_bigendian = unknown; then
12423 # See if sys/param.h defines the BYTE_ORDER macro.
12424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012425/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012426#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012427 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012428
Martin v. Löwis11437992002-04-12 09:54:03 +000012429int
12430main ()
12431{
Matthias Kloseb9621712010-04-24 17:59:49 +000012432#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12433 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12434 && LITTLE_ENDIAN)
12435 bogus endian macros
12436 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012437
12438 ;
12439 return 0;
12440}
12441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012442if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012443 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012445/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012446#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012447 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012448
Martin v. Löwis11437992002-04-12 09:54:03 +000012449int
12450main ()
12451{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012452#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012453 not big endian
12454 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012455
12456 ;
12457 return 0;
12458}
12459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012460if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012461 ac_cv_c_bigendian=yes
12462else
Matthias Kloseb9621712010-04-24 17:59:49 +000012463 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012464fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012466fi
12467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12468 fi
12469 if test $ac_cv_c_bigendian = unknown; then
12470 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012472/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012473#include <limits.h>
12474
Martin v. Löwis11437992002-04-12 09:54:03 +000012475int
12476main ()
12477{
Matthias Kloseb9621712010-04-24 17:59:49 +000012478#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12479 bogus endian macros
12480 #endif
12481
Martin v. Löwis11437992002-04-12 09:54:03 +000012482 ;
12483 return 0;
12484}
12485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012486if ac_fn_c_try_compile "$LINENO"; then :
12487 # It does; now see whether it defined to _BIG_ENDIAN or not.
12488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12489/* end confdefs.h. */
12490#include <limits.h>
12491
12492int
12493main ()
12494{
12495#ifndef _BIG_ENDIAN
12496 not big endian
12497 #endif
12498
12499 ;
12500 return 0;
12501}
12502_ACEOF
12503if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012504 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012505else
Matthias Kloseb9621712010-04-24 17:59:49 +000012506 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012507fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12509fi
12510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12511 fi
12512 if test $ac_cv_c_bigendian = unknown; then
12513 # Compile a test program.
12514 if test "$cross_compiling" = yes; then :
12515 # Try to guess by grepping values from an object file.
12516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12517/* end confdefs.h. */
12518short int ascii_mm[] =
12519 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12520 short int ascii_ii[] =
12521 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12522 int use_ascii (int i) {
12523 return ascii_mm[i] + ascii_ii[i];
12524 }
12525 short int ebcdic_ii[] =
12526 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12527 short int ebcdic_mm[] =
12528 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12529 int use_ebcdic (int i) {
12530 return ebcdic_mm[i] + ebcdic_ii[i];
12531 }
12532 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012533
Matthias Kloseb9621712010-04-24 17:59:49 +000012534int
12535main ()
12536{
12537return use_ascii (foo) == use_ebcdic (foo);
12538 ;
12539 return 0;
12540}
12541_ACEOF
12542if ac_fn_c_try_compile "$LINENO"; then :
12543 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12544 ac_cv_c_bigendian=yes
12545 fi
12546 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12547 if test "$ac_cv_c_bigendian" = unknown; then
12548 ac_cv_c_bigendian=no
12549 else
12550 # finding both strings is unlikely to happen, but who knows?
12551 ac_cv_c_bigendian=unknown
12552 fi
12553 fi
12554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012556else
Matthias Kloseb9621712010-04-24 17:59:49 +000012557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012558/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012559$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012560int
12561main ()
12562{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012563
Matthias Kloseb9621712010-04-24 17:59:49 +000012564 /* Are we little or big endian? From Harbison&Steele. */
12565 union
12566 {
12567 long int l;
12568 char c[sizeof (long int)];
12569 } u;
12570 u.l = 1;
12571 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012572
12573 ;
12574 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012575}
Martin v. Löwis11437992002-04-12 09:54:03 +000012576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012577if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012578 ac_cv_c_bigendian=no
12579else
Matthias Kloseb9621712010-04-24 17:59:49 +000012580 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012581fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012582rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12583 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012584fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012585
Matthias Kloseb9621712010-04-24 17:59:49 +000012586 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012587fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12589$as_echo "$ac_cv_c_bigendian" >&6; }
12590 case $ac_cv_c_bigendian in #(
12591 yes)
12592 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12593;; #(
12594 no)
12595 ;; #(
12596 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012597
Matthias Kloseb9621712010-04-24 17:59:49 +000012598$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012599
Matthias Kloseb9621712010-04-24 17:59:49 +000012600 ;; #(
12601 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012602 as_fn_error $? "unknown endianness
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012603 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012604 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012605
Michael W. Hudson54241132001-12-07 15:38:26 +000012606
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012607# ABI version string for Python extension modules. This appears between the
12608# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12609# from the following attributes which affect the ABI of this Python build (in
12610# this order):
12611#
12612# * The Python implementation (always 'cpython-' for us)
12613# * The major and minor version numbers
12614# * --with-pydebug (adds a 'd')
12615# * --with-pymalloc (adds a 'm')
12616# * --with-wide-unicode (adds a 'u')
12617#
12618# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012619# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12620# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012621
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12623$as_echo_n "checking ABIFLAGS... " >&6; }
12624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12625$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12627$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012628SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12630$as_echo "$SOABI" >&6; }
12631
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12633$as_echo_n "checking LDVERSION... " >&6; }
12634LDVERSION='$(VERSION)$(ABIFLAGS)'
12635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12636$as_echo "$LDVERSION" >&6; }
12637
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012638# SO is the extension of shared libraries `(including the dot!)
12639# -- usually .so, .sl on HP-UX, .dll on Cygwin
12640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12641$as_echo_n "checking SO... " >&6; }
12642if test -z "$SO"
12643then
12644 case $ac_sys_system in
12645 hp*|HP*)
12646 case `uname -m` in
12647 ia64) SO=.so;;
12648 *) SO=.sl;;
12649 esac
12650 ;;
12651 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012652 Linux*|GNU*)
12653 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012654 *) SO=.so;;
12655 esac
12656else
12657 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012658 echo
12659 echo '====================================================================='
12660 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012661 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012662 echo '+ Do you really mean to change the extension for shared libraries? +'
12663 echo '+ Continuing in 10 seconds to let you to ponder. +'
12664 echo '+ +'
12665 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012666 sleep 10
12667fi
12668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12669$as_echo "$SO" >&6; }
12670
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012671# Check whether right shifting a negative integer extends the sign bit
12672# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12674$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012675if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012676 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012677else
Martin v. Löwis11437992002-04-12 09:54:03 +000012678
Matthias Kloseb9621712010-04-24 17:59:49 +000012679if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012680 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012681else
Matthias Kloseb9621712010-04-24 17:59:49 +000012682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012683/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012684
12685int main()
12686{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012687 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012688}
12689
Martin v. Löwis11437992002-04-12 09:54:03 +000012690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012691if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012692 ac_cv_rshift_extends_sign=yes
12693else
Matthias Kloseb9621712010-04-24 17:59:49 +000012694 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012695fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012696rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12697 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012698fi
12699
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012700fi
12701
Matthias Kloseb9621712010-04-24 17:59:49 +000012702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12703$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012704if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012705then
Martin v. Löwis11437992002-04-12 09:54:03 +000012706
Matthias Kloseb9621712010-04-24 17:59:49 +000012707$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012708
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012709fi
12710
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012711# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12713$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012714if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012715 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012716else
Martin v. Löwis11437992002-04-12 09:54:03 +000012717
Matthias Kloseb9621712010-04-24 17:59:49 +000012718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012719/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012720#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012721int
12722main ()
12723{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012724
12725 FILE *f = fopen("/dev/null", "r");
12726 flockfile(f);
12727 getc_unlocked(f);
12728 funlockfile(f);
12729
Martin v. Löwis11437992002-04-12 09:54:03 +000012730 ;
12731 return 0;
12732}
12733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012734if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012735 ac_cv_have_getc_unlocked=yes
12736else
Matthias Kloseb9621712010-04-24 17:59:49 +000012737 ac_cv_have_getc_unlocked=no
12738fi
12739rm -f core conftest.err conftest.$ac_objext \
12740 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012741fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012742
Matthias Kloseb9621712010-04-24 17:59:49 +000012743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12744$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012745if test "$ac_cv_have_getc_unlocked" = yes
12746then
Martin v. Löwis11437992002-04-12 09:54:03 +000012747
Matthias Kloseb9621712010-04-24 17:59:49 +000012748$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012749
12750fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012751
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012752# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012753# save the value of LIBS so we don't actually link Python with readline
12754LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012755
Gregory P. Smith18820942008-09-07 06:24:49 +000012756# On some systems we need to link readline to a termcap compatible
12757# library. NOTE: Keep the precedence of listed libraries synchronised
12758# with setup.py.
12759py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12761$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012762for py_libtermcap in "" ncursesw ncurses curses termcap; do
12763 if test -z "$py_libtermcap"; then
12764 READLINE_LIBS="-lreadline"
12765 else
12766 READLINE_LIBS="-lreadline -l$py_libtermcap"
12767 fi
12768 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012770/* end confdefs.h. */
12771
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012772/* Override any GCC internal prototype to avoid an error.
12773 Use char because int might match the return type of a GCC
12774 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012775#ifdef __cplusplus
12776extern "C"
12777#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012778char readline ();
12779int
12780main ()
12781{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012782return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012783 ;
12784 return 0;
12785}
12786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012787if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012788 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012789fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012790rm -f core conftest.err conftest.$ac_objext \
12791 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012792 if test $py_cv_lib_readline = yes; then
12793 break
12794 fi
12795done
12796# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12797#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012798if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12800$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012801else
Matthias Kloseb9621712010-04-24 17:59:49 +000012802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12803$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012804
Matthias Kloseb9621712010-04-24 17:59:49 +000012805$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012806
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012807fi
12808
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012809# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12811$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012812if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012813 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012814else
12815 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012816LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012818/* end confdefs.h. */
12819
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012820/* Override any GCC internal prototype to avoid an error.
12821 Use char because int might match the return type of a GCC
12822 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012823#ifdef __cplusplus
12824extern "C"
12825#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012826char rl_callback_handler_install ();
12827int
12828main ()
12829{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012830return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012831 ;
12832 return 0;
12833}
12834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012835if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012836 ac_cv_lib_readline_rl_callback_handler_install=yes
12837else
Matthias Kloseb9621712010-04-24 17:59:49 +000012838 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012839fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012840rm -f core conftest.err conftest.$ac_objext \
12841 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012842LIBS=$ac_check_lib_save_LIBS
12843fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12845$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012846if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012847
Matthias Kloseb9621712010-04-24 17:59:49 +000012848$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012849
12850fi
12851
12852
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012853# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012855/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012856#include <readline/readline.h>
12857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012858if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012859 have_readline=yes
12860else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012861 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012862
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012863fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012864rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012865if test $have_readline = yes
12866then
Matthias Kloseb9621712010-04-24 17:59:49 +000012867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012868/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012869#include <readline/readline.h>
12870
12871_ACEOF
12872if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012873 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012874
Matthias Kloseb9621712010-04-24 17:59:49 +000012875$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012876
12877fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012878rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012879
Matthias Kloseb9621712010-04-24 17:59:49 +000012880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012881/* end confdefs.h. */
12882#include <readline/readline.h>
12883
12884_ACEOF
12885if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012886 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012887
Matthias Kloseb9621712010-04-24 17:59:49 +000012888$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012889
12890fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012891rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012892
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012893fi
12894
Martin v. Löwis0daad592001-09-30 21:09:59 +000012895# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12897$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012898if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012899 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012900else
Martin v. Löwis11437992002-04-12 09:54:03 +000012901 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012902LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012904/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012905
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012906/* Override any GCC internal prototype to avoid an error.
12907 Use char because int might match the return type of a GCC
12908 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012909#ifdef __cplusplus
12910extern "C"
12911#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012912char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012913int
12914main ()
12915{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012916return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012917 ;
12918 return 0;
12919}
12920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012921if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012922 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012923else
Matthias Kloseb9621712010-04-24 17:59:49 +000012924 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012925fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012926rm -f core conftest.err conftest.$ac_objext \
12927 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012928LIBS=$ac_check_lib_save_LIBS
12929fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12931$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012932if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012933
Matthias Kloseb9621712010-04-24 17:59:49 +000012934$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012935
Martin v. Löwis0daad592001-09-30 21:09:59 +000012936fi
12937
Michael W. Hudson54241132001-12-07 15:38:26 +000012938
Thomas Wouters89d996e2007-09-08 17:39:28 +000012939# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12941$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012942if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012943 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012944else
12945 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012946LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012947cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012948/* end confdefs.h. */
12949
12950/* Override any GCC internal prototype to avoid an error.
12951 Use char because int might match the return type of a GCC
12952 builtin and then its argument prototype would still apply. */
12953#ifdef __cplusplus
12954extern "C"
12955#endif
12956char rl_completion_display_matches_hook ();
12957int
12958main ()
12959{
12960return rl_completion_display_matches_hook ();
12961 ;
12962 return 0;
12963}
12964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012965if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012966 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12967else
Matthias Kloseb9621712010-04-24 17:59:49 +000012968 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012969fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012970rm -f core conftest.err conftest.$ac_objext \
12971 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012972LIBS=$ac_check_lib_save_LIBS
12973fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12975$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012976if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012977
Matthias Kloseb9621712010-04-24 17:59:49 +000012978$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012979
12980fi
12981
12982
Martin v. Löwis0daad592001-09-30 21:09:59 +000012983# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12985$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012986if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012987 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012988else
Martin v. Löwis11437992002-04-12 09:54:03 +000012989 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012990LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012992/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012993
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012994/* Override any GCC internal prototype to avoid an error.
12995 Use char because int might match the return type of a GCC
12996 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012997#ifdef __cplusplus
12998extern "C"
12999#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013000char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013001int
13002main ()
13003{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013004return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013005 ;
13006 return 0;
13007}
13008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013009if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013010 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013011else
Matthias Kloseb9621712010-04-24 17:59:49 +000013012 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013013fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013014rm -f core conftest.err conftest.$ac_objext \
13015 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013016LIBS=$ac_check_lib_save_LIBS
13017fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13019$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013020if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013021
Matthias Kloseb9621712010-04-24 17:59:49 +000013022$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013023
Guido van Rossum353ae582001-07-10 16:45:32 +000013024fi
13025
Jack Jansendd19cf82001-12-06 22:36:17 +000013026
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013027# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013029/* end confdefs.h. */
13030#include <readline/readline.h>
13031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013032if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013033 have_readline=yes
13034else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013035 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013036
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013037fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013038rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013039if test $have_readline = yes
13040then
Matthias Kloseb9621712010-04-24 17:59:49 +000013041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013042/* end confdefs.h. */
13043#include <readline/readline.h>
13044
13045_ACEOF
13046if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013047 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013048
Matthias Kloseb9621712010-04-24 17:59:49 +000013049$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013050
13051fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013052rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013053
13054fi
13055
Martin v. Löwis82bca632006-02-10 20:49:30 +000013056# End of readline checks: restore LIBS
13057LIBS=$LIBS_no_readline
13058
Matthias Kloseb9621712010-04-24 17:59:49 +000013059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13060$as_echo_n "checking for broken nice()... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013061if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013062 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013063else
Martin v. Löwis11437992002-04-12 09:54:03 +000013064
Matthias Kloseb9621712010-04-24 17:59:49 +000013065if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013066 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013067else
Matthias Kloseb9621712010-04-24 17:59:49 +000013068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013069/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013070
13071int main()
13072{
13073 int val1 = nice(1);
13074 if (val1 != -1 && val1 == nice(2))
13075 exit(0);
13076 exit(1);
13077}
13078
Martin v. Löwis11437992002-04-12 09:54:03 +000013079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013080if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013081 ac_cv_broken_nice=yes
13082else
Matthias Kloseb9621712010-04-24 17:59:49 +000013083 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013084fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013085rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13086 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013087fi
13088
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013089fi
13090
Matthias Kloseb9621712010-04-24 17:59:49 +000013091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13092$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013093if test "$ac_cv_broken_nice" = yes
13094then
Martin v. Löwis11437992002-04-12 09:54:03 +000013095
Matthias Kloseb9621712010-04-24 17:59:49 +000013096$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013097
13098fi
13099
Matthias Kloseb9621712010-04-24 17:59:49 +000013100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13101$as_echo_n "checking for broken poll()... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013102if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013103 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013104else
Matthias Kloseb9621712010-04-24 17:59:49 +000013105 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013106 ac_cv_broken_poll=no
13107else
Matthias Kloseb9621712010-04-24 17:59:49 +000013108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013109/* end confdefs.h. */
13110
13111#include <poll.h>
13112
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013113int main()
13114{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013115 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013116 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013117
13118 close (42);
13119
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013120 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013121 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013122 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013123 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013124 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013125 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013126 return 1;
13127}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013128
13129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013130if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013131 ac_cv_broken_poll=yes
13132else
Matthias Kloseb9621712010-04-24 17:59:49 +000013133 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013134fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013135rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13136 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013137fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013138
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013139fi
13140
Matthias Kloseb9621712010-04-24 17:59:49 +000013141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13142$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013143if test "$ac_cv_broken_poll" = yes
13144then
13145
Matthias Kloseb9621712010-04-24 17:59:49 +000013146$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013147
13148fi
13149
Brett Cannon43802422005-02-10 20:48:03 +000013150# 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 +000013151# (which is not required by ISO C or UNIX spec) and/or if we support
13152# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013153ac_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 +000013154#include <$ac_cv_struct_tm>
13155
Matthias Kloseb9621712010-04-24 17:59:49 +000013156"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013157if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013158
13159cat >>confdefs.h <<_ACEOF
13160#define HAVE_STRUCT_TM_TM_ZONE 1
13161_ACEOF
13162
13163
13164fi
13165
13166if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13167
Matthias Kloseb9621712010-04-24 17:59:49 +000013168$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013169
13170else
Matthias Kloseb9621712010-04-24 17:59:49 +000013171 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13172"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013173if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013174 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013175else
Matthias Kloseb9621712010-04-24 17:59:49 +000013176 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013177fi
13178
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013179cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013180#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013181_ACEOF
13182
Matthias Kloseb9621712010-04-24 17:59:49 +000013183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13184$as_echo_n "checking for tzname... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013185if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013186 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013187else
Matthias Kloseb9621712010-04-24 17:59:49 +000013188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013189/* end confdefs.h. */
13190#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013191#if !HAVE_DECL_TZNAME
13192extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013193#endif
13194
13195int
13196main ()
13197{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013198return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013199 ;
13200 return 0;
13201}
13202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013203if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013204 ac_cv_var_tzname=yes
13205else
Matthias Kloseb9621712010-04-24 17:59:49 +000013206 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013207fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013208rm -f core conftest.err conftest.$ac_objext \
13209 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013210fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13212$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013213 if test $ac_cv_var_tzname = yes; then
13214
Matthias Kloseb9621712010-04-24 17:59:49 +000013215$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013216
13217 fi
13218fi
13219
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013220
Martin v. Löwis1d459062005-03-14 21:23:33 +000013221# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13223$as_echo_n "checking for working tzset()... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013224if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013225 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013226else
13227
Matthias Kloseb9621712010-04-24 17:59:49 +000013228if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013229 ac_cv_working_tzset=no
13230else
Matthias Kloseb9621712010-04-24 17:59:49 +000013231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013232/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013233
13234#include <stdlib.h>
13235#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013236#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013237
13238#if HAVE_TZNAME
13239extern char *tzname[];
13240#endif
13241
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013242int main()
13243{
Brett Cannon18367812003-09-19 00:59:16 +000013244 /* Note that we need to ensure that not only does tzset(3)
13245 do 'something' with localtime, but it works as documented
13246 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013247 This includes making sure that tzname is set properly if
13248 tm->tm_zone does not exist since it is the alternative way
13249 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013250
13251 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013252 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013253 */
13254
Martin v. Löwis1d459062005-03-14 21:23:33 +000013255 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013256 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13257
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013258 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013259 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013260 if (localtime(&groundhogday)->tm_hour != 0)
13261 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013262#if HAVE_TZNAME
13263 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13264 if (strcmp(tzname[0], "UTC") ||
13265 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13266 exit(1);
13267#endif
Brett Cannon18367812003-09-19 00:59:16 +000013268
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013269 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013270 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013271 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013272 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013273#if HAVE_TZNAME
13274 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13275 exit(1);
13276#endif
Brett Cannon18367812003-09-19 00:59:16 +000013277
13278 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13279 tzset();
13280 if (localtime(&groundhogday)->tm_hour != 11)
13281 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013282#if HAVE_TZNAME
13283 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13284 exit(1);
13285#endif
13286
13287#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013288 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13289 exit(1);
13290 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13291 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013292#endif
Brett Cannon18367812003-09-19 00:59:16 +000013293
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013294 exit(0);
13295}
13296
13297_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013298if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013299 ac_cv_working_tzset=yes
13300else
Matthias Kloseb9621712010-04-24 17:59:49 +000013301 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013302fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013303rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13304 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013305fi
13306
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013307fi
13308
Matthias Kloseb9621712010-04-24 17:59:49 +000013309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13310$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013311if test "$ac_cv_working_tzset" = yes
13312then
13313
Matthias Kloseb9621712010-04-24 17:59:49 +000013314$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013315
13316fi
13317
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013318# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13320$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013321if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013322 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013323else
Matthias Kloseb9621712010-04-24 17:59:49 +000013324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013325/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013326#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013327int
13328main ()
13329{
13330
13331struct stat st;
13332st.st_mtim.tv_nsec = 1;
13333
13334 ;
13335 return 0;
13336}
13337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013338if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013339 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013340else
Matthias Kloseb9621712010-04-24 17:59:49 +000013341 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13344fi
13345
Matthias Kloseb9621712010-04-24 17:59:49 +000013346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13347$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013348if test "$ac_cv_stat_tv_nsec" = yes
13349then
13350
Matthias Kloseb9621712010-04-24 17:59:49 +000013351$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013352
13353fi
13354
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013355# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13357$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013358if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013359 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013360else
Matthias Kloseb9621712010-04-24 17:59:49 +000013361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013362/* end confdefs.h. */
13363#include <sys/stat.h>
13364int
13365main ()
13366{
13367
13368struct stat st;
13369st.st_mtimespec.tv_nsec = 1;
13370
13371 ;
13372 return 0;
13373}
13374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013375if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013376 ac_cv_stat_tv_nsec2=yes
13377else
Matthias Kloseb9621712010-04-24 17:59:49 +000013378 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13381fi
13382
Matthias Kloseb9621712010-04-24 17:59:49 +000013383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13384$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013385if test "$ac_cv_stat_tv_nsec2" = yes
13386then
13387
Matthias Kloseb9621712010-04-24 17:59:49 +000013388$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013389
13390fi
13391
Jack Jansen666b1e72001-10-31 12:11:48 +000013392# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13394$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013395if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013396 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013397else
Matthias Kloseb9621712010-04-24 17:59:49 +000013398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013399/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013400#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013401int
13402main ()
13403{
Jack Jansen666b1e72001-10-31 12:11:48 +000013404
13405 int rtn;
13406 rtn = mvwdelch(0,0,0);
13407
Martin v. Löwis11437992002-04-12 09:54:03 +000013408 ;
13409 return 0;
13410}
13411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013412if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013413 ac_cv_mvwdelch_is_expression=yes
13414else
Matthias Kloseb9621712010-04-24 17:59:49 +000013415 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013416fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13418fi
13419
Matthias Kloseb9621712010-04-24 17:59:49 +000013420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13421$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013422
13423if test "$ac_cv_mvwdelch_is_expression" = yes
13424then
Martin v. Löwis11437992002-04-12 09:54:03 +000013425
Matthias Kloseb9621712010-04-24 17:59:49 +000013426$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013427
13428fi
13429
Matthias Kloseb9621712010-04-24 17:59:49 +000013430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13431$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013432if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013433 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013434else
Matthias Kloseb9621712010-04-24 17:59:49 +000013435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013436/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013437#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013438int
13439main ()
13440{
Jack Jansen666b1e72001-10-31 12:11:48 +000013441
13442 WINDOW *w;
13443 w->_flags = 0;
13444
Martin v. Löwis11437992002-04-12 09:54:03 +000013445 ;
13446 return 0;
13447}
13448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013449if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013450 ac_cv_window_has_flags=yes
13451else
Matthias Kloseb9621712010-04-24 17:59:49 +000013452 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13455fi
13456
Matthias Kloseb9621712010-04-24 17:59:49 +000013457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13458$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013459
Jack Jansen666b1e72001-10-31 12:11:48 +000013460
13461if test "$ac_cv_window_has_flags" = yes
13462then
Martin v. Löwis11437992002-04-12 09:54:03 +000013463
Matthias Kloseb9621712010-04-24 17:59:49 +000013464$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013465
13466fi
13467
Matthias Kloseb9621712010-04-24 17:59:49 +000013468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13469$as_echo_n "checking for is_term_resized... " >&6; }
13470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013471/* end confdefs.h. */
13472#include <curses.h>
13473int
13474main ()
13475{
13476void *x=is_term_resized
13477 ;
13478 return 0;
13479}
13480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013481if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013482
Matthias Kloseb9621712010-04-24 17:59:49 +000013483$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013484
Matthias Kloseb159a552010-04-25 21:00:44 +000013485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013486$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013487else
Matthias Kloseb9621712010-04-24 17:59:49 +000013488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13489$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013490
13491fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13493
Matthias Kloseb9621712010-04-24 17:59:49 +000013494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13495$as_echo_n "checking for resize_term... " >&6; }
13496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013497/* end confdefs.h. */
13498#include <curses.h>
13499int
13500main ()
13501{
13502void *x=resize_term
13503 ;
13504 return 0;
13505}
13506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013507if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013508
Matthias Kloseb9621712010-04-24 17:59:49 +000013509$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013510
Matthias Kloseb159a552010-04-25 21:00:44 +000013511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013512$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013513else
Matthias Kloseb9621712010-04-24 17:59:49 +000013514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13515$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013516
13517fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13519
Matthias Kloseb9621712010-04-24 17:59:49 +000013520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13521$as_echo_n "checking for resizeterm... " >&6; }
13522cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013523/* end confdefs.h. */
13524#include <curses.h>
13525int
13526main ()
13527{
13528void *x=resizeterm
13529 ;
13530 return 0;
13531}
13532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013533if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013534
Matthias Kloseb9621712010-04-24 17:59:49 +000013535$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013536
Matthias Kloseb159a552010-04-25 21:00:44 +000013537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013538$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013539else
Matthias Kloseb9621712010-04-24 17:59:49 +000013540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13541$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013542
13543fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13545
Matthias Kloseb9621712010-04-24 17:59:49 +000013546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13547$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013548
13549if test -r /dev/ptmx
13550then
Matthias Kloseb9621712010-04-24 17:59:49 +000013551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13552$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013553
Matthias Kloseb9621712010-04-24 17:59:49 +000013554$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013555
Thomas Wouters89f507f2006-12-13 04:49:30 +000013556else
Matthias Kloseb9621712010-04-24 17:59:49 +000013557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13558$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013559fi
13560
Matthias Kloseb9621712010-04-24 17:59:49 +000013561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13562$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013563
13564if test -r /dev/ptc
13565then
Matthias Kloseb9621712010-04-24 17:59:49 +000013566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13567$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013568
Matthias Kloseb9621712010-04-24 17:59:49 +000013569$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013570
Thomas Wouters89f507f2006-12-13 04:49:30 +000013571else
Matthias Kloseb9621712010-04-24 17:59:49 +000013572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13573$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013574fi
13575
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013576if test "$have_long_long" = yes
13577then
Matthias Kloseb9621712010-04-24 17:59:49 +000013578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13579$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013580 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013581 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013582else
Matthias Kloseb9621712010-04-24 17:59:49 +000013583 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013584 ac_cv_have_long_long_format=no
13585else
Matthias Kloseb9621712010-04-24 17:59:49 +000013586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013587/* end confdefs.h. */
13588
13589 #include <stdio.h>
13590 #include <stddef.h>
13591 #include <string.h>
13592
13593 #ifdef HAVE_SYS_TYPES_H
13594 #include <sys/types.h>
13595 #endif
13596
13597 int main()
13598 {
13599 char buffer[256];
13600
13601 if (sprintf(buffer, "%lld", (long long)123) < 0)
13602 return 1;
13603 if (strcmp(buffer, "123"))
13604 return 1;
13605
13606 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13607 return 1;
13608 if (strcmp(buffer, "-123"))
13609 return 1;
13610
13611 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13612 return 1;
13613 if (strcmp(buffer, "123"))
13614 return 1;
13615
13616 return 0;
13617 }
13618
13619_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013620if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013621 ac_cv_have_long_long_format=yes
13622else
Matthias Kloseb9621712010-04-24 17:59:49 +000013623 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013624fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013625rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13626 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013627fi
13628
13629
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013630fi
13631
Matthias Kloseb9621712010-04-24 17:59:49 +000013632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13633$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013634fi
13635
Mark Dickinson89d7d412009-12-31 20:50:59 +000013636if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013637then
13638
Matthias Kloseb9621712010-04-24 17:59:49 +000013639$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013640
13641fi
13642
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013643if test $ac_sys_system = Darwin
13644then
13645 LIBS="$LIBS -framework CoreFoundation"
13646fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013647
Matthias Kloseb9621712010-04-24 17:59:49 +000013648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13649$as_echo_n "checking for %zd printf() format support... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013650if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013651 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013652else
Matthias Kloseb9621712010-04-24 17:59:49 +000013653 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013654 ac_cv_have_size_t_format="cross -- assuming yes"
13655
Thomas Wouters477c8d52006-05-27 19:21:47 +000013656else
Matthias Kloseb9621712010-04-24 17:59:49 +000013657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013658/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013659
Thomas Wouters477c8d52006-05-27 19:21:47 +000013660#include <stdio.h>
13661#include <stddef.h>
13662#include <string.h>
13663
Christian Heimes2c181612007-12-17 20:04:13 +000013664#ifdef HAVE_SYS_TYPES_H
13665#include <sys/types.h>
13666#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013667
13668#ifdef HAVE_SSIZE_T
13669typedef ssize_t Py_ssize_t;
13670#elif SIZEOF_VOID_P == SIZEOF_LONG
13671typedef long Py_ssize_t;
13672#else
13673typedef int Py_ssize_t;
13674#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013675
Christian Heimes2c181612007-12-17 20:04:13 +000013676int main()
13677{
13678 char buffer[256];
13679
Thomas Wouters477c8d52006-05-27 19:21:47 +000013680 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13681 return 1;
13682
Thomas Wouters89f507f2006-12-13 04:49:30 +000013683 if (strcmp(buffer, "123"))
13684 return 1;
13685
13686 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13687 return 1;
13688
13689 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013690 return 1;
13691
13692 return 0;
13693}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013694
Thomas Wouters477c8d52006-05-27 19:21:47 +000013695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013696if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013697 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013698else
Matthias Kloseb9621712010-04-24 17:59:49 +000013699 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013700fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013701rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13702 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013703fi
13704
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013705fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13707$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013708if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013709
Matthias Kloseb9621712010-04-24 17:59:49 +000013710$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013711
13712fi
13713
Matthias Kloseb9621712010-04-24 17:59:49 +000013714ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013715#ifdef HAVE_SYS_TYPES_H
13716#include <sys/types.h>
13717#endif
13718#ifdef HAVE_SYS_SOCKET_H
13719#include <sys/socket.h>
13720#endif
13721
Matthias Kloseb9621712010-04-24 17:59:49 +000013722"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013723if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013724
Martin v. Löwis11437992002-04-12 09:54:03 +000013725else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013726
Matthias Kloseb9621712010-04-24 17:59:49 +000013727$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013728
13729fi
13730
Michael W. Hudson54241132001-12-07 15:38:26 +000013731
Matthias Kloseb9621712010-04-24 17:59:49 +000013732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13733$as_echo_n "checking for broken mbstowcs... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013734if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013735 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013736else
Matthias Kloseb9621712010-04-24 17:59:49 +000013737 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013738 ac_cv_broken_mbstowcs=no
13739else
Matthias Kloseb9621712010-04-24 17:59:49 +000013740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013741/* end confdefs.h. */
13742
13743#include<stdlib.h>
13744int main() {
13745 size_t len = -1;
13746 const char *str = "text";
13747 len = mbstowcs(NULL, str, 0);
13748 return (len != 4);
13749}
13750
13751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013752if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013753 ac_cv_broken_mbstowcs=no
13754else
Matthias Kloseb9621712010-04-24 17:59:49 +000013755 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013756fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013757rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13758 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013759fi
13760
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013761fi
13762
Matthias Kloseb9621712010-04-24 17:59:49 +000013763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13764$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013765if test "$ac_cv_broken_mbstowcs" = yes
13766then
13767
Matthias Kloseb9621712010-04-24 17:59:49 +000013768$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013769
13770fi
13771
Antoine Pitrou042b1282010-08-13 21:15:58 +000013772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13773$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013774if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013775 $as_echo_n "(cached) " >&6
13776else
13777 if test "$cross_compiling" = yes; then :
13778 ac_cv_computed_gotos=no
13779else
13780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13781/* end confdefs.h. */
13782
13783int main(int argc, char **argv)
13784{
13785 static void *targets[1] = { &&LABEL1 };
13786 goto LABEL2;
13787LABEL1:
13788 return 0;
13789LABEL2:
13790 goto *targets[0];
13791 return 1;
13792}
13793
13794_ACEOF
13795if ac_fn_c_try_run "$LINENO"; then :
13796 ac_cv_computed_gotos=yes
13797else
13798 ac_cv_computed_gotos=no
13799fi
13800rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13801 conftest.$ac_objext conftest.beam conftest.$ac_ext
13802fi
13803
13804fi
13805
13806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13807$as_echo "$ac_cv_computed_gotos" >&6; }
13808if test "$ac_cv_computed_gotos" = yes
13809then
13810
13811$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13812
13813fi
13814
Antoine Pitroub52ec782009-01-25 16:34:23 +000013815# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13817$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013818
13819# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013820if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013821 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013822if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013823then
13824
Matthias Kloseb9621712010-04-24 17:59:49 +000013825$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013826
Matthias Kloseb9621712010-04-24 17:59:49 +000013827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13828$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013829fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013830if test "$withval" = no
13831then
13832
13833$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13834
Matthias Kloseb9621712010-04-24 17:59:49 +000013835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13836$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013837fi
13838
Antoine Pitrou042b1282010-08-13 21:15:58 +000013839else
13840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13841$as_echo "no value specified" >&6; }
13842fi
13843
Antoine Pitroub52ec782009-01-25 16:34:23 +000013844
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013845case $ac_sys_system in
13846AIX*)
13847
13848$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13849 ;;
13850esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013851
Michael W. Hudson54241132001-12-07 15:38:26 +000013852
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013853
13854
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013855for h in `(cd $srcdir;echo Python/thread_*.h)`
13856do
13857 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13858done
13859
Michael W. Hudson54241132001-12-07 15:38:26 +000013860
Neal Norwitzd24499d2005-12-18 21:36:39 +000013861SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13863$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013864for dir in $SRCDIRS; do
13865 if test ! -d $dir; then
13866 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013867 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013868done
Matthias Kloseb9621712010-04-24 17:59:49 +000013869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13870$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013871
Guido van Rossum627b2d71993-12-24 10:39:16 +000013872# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013873ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013874
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013875ac_config_files="$ac_config_files Modules/ld_so_aix"
13876
Martin v. Löwis11437992002-04-12 09:54:03 +000013877cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013878# This file is a shell script that caches the results of configure
13879# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013880# scripts and configure runs, see configure's option --config-cache.
13881# It is not useful on other systems. If it contains results you don't
13882# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013883#
Martin v. Löwis11437992002-04-12 09:54:03 +000013884# config.status only pays attention to the cache file if you give it
13885# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013886#
Skip Montanaro6dead952003-09-25 14:50:04 +000013887# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013888# loading this file, other *unset* `ac_cv_foo' will be assigned the
13889# following values.
13890
13891_ACEOF
13892
Guido van Rossumf78abae1997-01-21 22:02:36 +000013893# The following way of writing the cache mishandles newlines in values,
13894# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013895# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013896# Ultrix sh set writes to stderr and can't be redirected directly,
13897# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013898(
13899 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13900 eval ac_val=\$$ac_var
13901 case $ac_val in #(
13902 *${as_nl}*)
13903 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013904 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13905$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013906 esac
13907 case $ac_var in #(
13908 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013909 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13910 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013911 esac ;;
13912 esac
13913 done
13914
Martin v. Löwis11437992002-04-12 09:54:03 +000013915 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013916 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13917 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013918 # `set' does not quote correctly, so add quotes: double-quote
13919 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013920 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013921 "s/'/'\\\\''/g;
13922 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013923 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013924 *)
13925 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013926 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013927 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013928 esac |
13929 sort
13930) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013931 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013932 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013933 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013934 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013935 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13936 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013937 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13938 :end' >>confcache
13939if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13940 if test -w "$cache_file"; then
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013941 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013942 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13943$as_echo "$as_me: updating cache $cache_file" >&6;}
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013944 if test ! -f "$cache_file" || test -h "$cache_file"; then
13945 cat confcache >"$cache_file"
13946 else
13947 case $cache_file in #(
13948 */* | ?:*)
13949 mv -f confcache "$cache_file"$$ &&
13950 mv -f "$cache_file"$$ "$cache_file" ;; #(
13951 *)
13952 mv -f confcache "$cache_file" ;;
13953 esac
13954 fi
13955 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013956 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013957 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13958$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013959 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013960fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013961rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013962
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013963test "x$prefix" = xNONE && prefix=$ac_default_prefix
13964# Let make expand exec_prefix.
13965test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013966
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013967DEFS=-DHAVE_CONFIG_H
13968
Skip Montanaro6dead952003-09-25 14:50:04 +000013969ac_libobjs=
13970ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013971U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013972for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13973 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013974 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013975 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013976 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13977 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013978 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13979 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013980done
13981LIBOBJS=$ac_libobjs
13982
13983LTLIBOBJS=$ac_ltlibobjs
13984
13985
Martin v. Löwis11437992002-04-12 09:54:03 +000013986
Matthias Kloseb9621712010-04-24 17:59:49 +000013987
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013988: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000013989ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013990ac_clean_files_save=$ac_clean_files
13991ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013992{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13993$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13994as_write_fail=0
13995cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013996#! $SHELL
13997# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013998# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013999# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014000# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014001
Martin v. Löwis11437992002-04-12 09:54:03 +000014002debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014003ac_cs_recheck=false
14004ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014005
Matthias Kloseb9621712010-04-24 17:59:49 +000014006SHELL=\${CONFIG_SHELL-$SHELL}
14007export SHELL
14008_ASEOF
14009cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14010## -------------------- ##
14011## M4sh Initialization. ##
14012## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014013
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014014# Be more Bourne compatible
14015DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014016if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014017 emulate sh
14018 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014019 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014020 # is contrary to our usage. Disable this feature.
14021 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014022 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014023else
Matthias Kloseb9621712010-04-24 17:59:49 +000014024 case `(set -o) 2>/dev/null` in #(
14025 *posix*) :
14026 set -o posix ;; #(
14027 *) :
14028 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014029esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014030fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014031
14032
Matthias Kloseb9621712010-04-24 17:59:49 +000014033as_nl='
14034'
14035export as_nl
14036# Printing a long string crashes Solaris 7 /usr/bin/printf.
14037as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14038as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14039as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14040# Prefer a ksh shell builtin over an external printf program on Solaris,
14041# but without wasting forks for bash or zsh.
14042if test -z "$BASH_VERSION$ZSH_VERSION" \
14043 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14044 as_echo='print -r --'
14045 as_echo_n='print -rn --'
14046elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14047 as_echo='printf %s\n'
14048 as_echo_n='printf %s'
14049else
14050 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14051 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14052 as_echo_n='/usr/ucb/echo -n'
14053 else
14054 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14055 as_echo_n_body='eval
14056 arg=$1;
14057 case $arg in #(
14058 *"$as_nl"*)
14059 expr "X$arg" : "X\\(.*\\)$as_nl";
14060 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14061 esac;
14062 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14063 '
14064 export as_echo_n_body
14065 as_echo_n='sh -c $as_echo_n_body as_echo'
14066 fi
14067 export as_echo_body
14068 as_echo='sh -c $as_echo_body as_echo'
14069fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014070
14071# The user is always right.
14072if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014073 PATH_SEPARATOR=:
14074 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14075 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14076 PATH_SEPARATOR=';'
14077 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014078fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014079
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014080
14081# IFS
14082# We need space, tab and new line, in precisely that order. Quoting is
14083# there to prevent editors from complaining about space-tab.
14084# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14085# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014086IFS=" "" $as_nl"
14087
14088# Find who we are. Look in the path if we contain no directory separator.
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014089as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014090case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014091 *[\\/]* ) as_myself=$0 ;;
14092 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014093for as_dir in $PATH
14094do
14095 IFS=$as_save_IFS
14096 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014097 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14098 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014099IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014100
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014101 ;;
14102esac
14103# We did not find ourselves, most probably we were run as `sh COMMAND'
14104# in which case we are not to be found in the path.
14105if test "x$as_myself" = x; then
14106 as_myself=$0
14107fi
14108if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014109 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14110 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014111fi
14112
Matthias Kloseb9621712010-04-24 17:59:49 +000014113# Unset variables that we do not need and which cause bugs (e.g. in
14114# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14115# suppresses any "Segmentation fault" message there. '((' could
14116# trigger a bug in pdksh 5.2.14.
14117for as_var in BASH_ENV ENV MAIL MAILPATH
14118do eval test x\${$as_var+set} = xset \
14119 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014120done
14121PS1='$ '
14122PS2='> '
14123PS4='+ '
14124
14125# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014126LC_ALL=C
14127export LC_ALL
14128LANGUAGE=C
14129export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014130
Matthias Kloseb9621712010-04-24 17:59:49 +000014131# CDPATH.
14132(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14133
14134
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014135# as_fn_error STATUS ERROR [LINENO LOG_FD]
14136# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014137# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14138# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014139# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014140as_fn_error ()
14141{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014142 as_status=$1; test $as_status -eq 0 && as_status=1
14143 if test "$4"; then
14144 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14145 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014146 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014147 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014148 as_fn_exit $as_status
14149} # as_fn_error
14150
14151
14152# as_fn_set_status STATUS
14153# -----------------------
14154# Set $? to STATUS, without forking.
14155as_fn_set_status ()
14156{
14157 return $1
14158} # as_fn_set_status
14159
14160# as_fn_exit STATUS
14161# -----------------
14162# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14163as_fn_exit ()
14164{
14165 set +e
14166 as_fn_set_status $1
14167 exit $1
14168} # as_fn_exit
14169
14170# as_fn_unset VAR
14171# ---------------
14172# Portably unset VAR.
14173as_fn_unset ()
14174{
14175 { eval $1=; unset $1;}
14176}
14177as_unset=as_fn_unset
14178# as_fn_append VAR VALUE
14179# ----------------------
14180# Append the text in VALUE to the end of the definition contained in VAR. Take
14181# advantage of any shell optimizations that allow amortized linear growth over
14182# repeated appends, instead of the typical quadratic growth present in naive
14183# implementations.
14184if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14185 eval 'as_fn_append ()
14186 {
14187 eval $1+=\$2
14188 }'
14189else
14190 as_fn_append ()
14191 {
14192 eval $1=\$$1\$2
14193 }
14194fi # as_fn_append
14195
14196# as_fn_arith ARG...
14197# ------------------
14198# Perform arithmetic evaluation on the ARGs, and store the result in the
14199# global $as_val. Take advantage of shells that can avoid forks. The arguments
14200# must be portable across $(()) and expr.
14201if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14202 eval 'as_fn_arith ()
14203 {
14204 as_val=$(( $* ))
14205 }'
14206else
14207 as_fn_arith ()
14208 {
14209 as_val=`expr "$@" || test $? -eq 1`
14210 }
14211fi # as_fn_arith
14212
14213
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014214if expr a : '\(a\)' >/dev/null 2>&1 &&
14215 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14216 as_expr=expr
14217else
14218 as_expr=false
14219fi
14220
14221if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14222 as_basename=basename
14223else
14224 as_basename=false
14225fi
14226
Matthias Kloseb9621712010-04-24 17:59:49 +000014227if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14228 as_dirname=dirname
14229else
14230 as_dirname=false
14231fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014232
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014233as_me=`$as_basename -- "$0" ||
14234$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14235 X"$0" : 'X\(//\)$' \| \
14236 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014237$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014238 sed '/^.*\/\([^/][^/]*\)\/*$/{
14239 s//\1/
14240 q
14241 }
14242 /^X\/\(\/\/\)$/{
14243 s//\1/
14244 q
14245 }
14246 /^X\/\(\/\).*/{
14247 s//\1/
14248 q
14249 }
14250 s/.*/./; q'`
14251
Matthias Kloseb9621712010-04-24 17:59:49 +000014252# Avoid depending upon Character Ranges.
14253as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14254as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14255as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14256as_cr_digits='0123456789'
14257as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014258
14259ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014260case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014261-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014262 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014263 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014264 xy) ECHO_C='\c';;
14265 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14266 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014267 esac;;
14268*)
14269 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014270esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014271
Martin v. Löwis11437992002-04-12 09:54:03 +000014272rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014273if test -d conf$$.dir; then
14274 rm -f conf$$.dir/conf$$.file
14275else
14276 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014277 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014278fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014279if (echo >conf$$.file) 2>/dev/null; then
14280 if ln -s conf$$.file conf$$ 2>/dev/null; then
14281 as_ln_s='ln -s'
14282 # ... but there are two gotchas:
14283 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14284 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14285 # In both cases, we have to default to `cp -p'.
14286 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14287 as_ln_s='cp -p'
14288 elif ln conf$$.file conf$$ 2>/dev/null; then
14289 as_ln_s=ln
14290 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014291 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014292 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014293else
14294 as_ln_s='cp -p'
14295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014296rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14297rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014298
Matthias Kloseb9621712010-04-24 17:59:49 +000014299
14300# as_fn_mkdir_p
14301# -------------
14302# Create "$as_dir" as a directory, including parents if necessary.
14303as_fn_mkdir_p ()
14304{
14305
14306 case $as_dir in #(
14307 -*) as_dir=./$as_dir;;
14308 esac
14309 test -d "$as_dir" || eval $as_mkdir_p || {
14310 as_dirs=
14311 while :; do
14312 case $as_dir in #(
14313 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14314 *) as_qdir=$as_dir;;
14315 esac
14316 as_dirs="'$as_qdir' $as_dirs"
14317 as_dir=`$as_dirname -- "$as_dir" ||
14318$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14319 X"$as_dir" : 'X\(//\)[^/]' \| \
14320 X"$as_dir" : 'X\(//\)$' \| \
14321 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14322$as_echo X"$as_dir" |
14323 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14324 s//\1/
14325 q
14326 }
14327 /^X\(\/\/\)[^/].*/{
14328 s//\1/
14329 q
14330 }
14331 /^X\(\/\/\)$/{
14332 s//\1/
14333 q
14334 }
14335 /^X\(\/\).*/{
14336 s//\1/
14337 q
14338 }
14339 s/.*/./; q'`
14340 test -d "$as_dir" && break
14341 done
14342 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014343 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014344
14345
14346} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014347if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014348 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014349else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014350 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014351 as_mkdir_p=false
14352fi
14353
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014354if test -x / >/dev/null 2>&1; then
14355 as_test_x='test -x'
14356else
14357 if ls -dL / >/dev/null 2>&1; then
14358 as_ls_L_option=L
14359 else
14360 as_ls_L_option=
14361 fi
14362 as_test_x='
14363 eval sh -c '\''
14364 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014365 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014366 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014367 case $1 in #(
14368 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014369 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014370 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014371 ???[sx]*):;;*)false;;esac;fi
14372 '\'' sh
14373 '
14374fi
14375as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014376
14377# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014378as_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 +000014379
14380# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014381as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014382
14383
Martin v. Löwis11437992002-04-12 09:54:03 +000014384exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014385## ----------------------------------- ##
14386## Main body of $CONFIG_STATUS script. ##
14387## ----------------------------------- ##
14388_ASEOF
14389test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014390
Matthias Kloseb9621712010-04-24 17:59:49 +000014391cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14392# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014393# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014394# values after options handling.
14395ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014396This file was extended by python $as_me 3.3, which was
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014397generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014398
14399 CONFIG_FILES = $CONFIG_FILES
14400 CONFIG_HEADERS = $CONFIG_HEADERS
14401 CONFIG_LINKS = $CONFIG_LINKS
14402 CONFIG_COMMANDS = $CONFIG_COMMANDS
14403 $ $0 $@
14404
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014405on `(hostname || uname -n) 2>/dev/null | sed 1q`
14406"
14407
Martin v. Löwis11437992002-04-12 09:54:03 +000014408_ACEOF
14409
Matthias Kloseb9621712010-04-24 17:59:49 +000014410case $ac_config_files in *"
14411"*) set x $ac_config_files; shift; ac_config_files=$*;;
14412esac
14413
14414case $ac_config_headers in *"
14415"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14416esac
14417
14418
14419cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014420# Files that config.status was made for.
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014421config_files="`echo $ac_config_files`"
14422config_headers="`echo $ac_config_headers`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014423
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014424_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014425
Matthias Kloseb9621712010-04-24 17:59:49 +000014426cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014427ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014428\`$as_me' instantiates files and other configuration actions
14429from templates according to the current configuration. Unless the files
14430and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014431
Matthias Kloseb9621712010-04-24 17:59:49 +000014432Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014433
14434 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014435 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014436 --config print configuration, then exit
14437 -q, --quiet, --silent
14438 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014439 -d, --debug don't remove temporary files
14440 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014441 --file=FILE[:TEMPLATE]
14442 instantiate the configuration file FILE
14443 --header=FILE[:TEMPLATE]
14444 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014445
14446Configuration files:
14447$config_files
14448
14449Configuration headers:
14450$config_headers
14451
Matthias Kloseb9621712010-04-24 17:59:49 +000014452Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014453
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014454_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014455cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14456ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014457ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014458python config.status 3.3
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014459configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000014460 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014461
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014462Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014463This config.status script is free software; the Free Software Foundation
14464gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014465
14466ac_pwd='$ac_pwd'
14467srcdir='$srcdir'
14468INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014469test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014470_ACEOF
14471
Matthias Kloseb9621712010-04-24 17:59:49 +000014472cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14473# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014474ac_need_defaults=:
14475while test $# != 0
14476do
14477 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014478 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014479 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14480 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014481 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014482 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014483 --*=)
14484 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14485 ac_optarg=
14486 ac_shift=:
14487 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014488 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014489 ac_option=$1
14490 ac_optarg=$2
14491 ac_shift=shift
14492 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014493 esac
14494
Skip Montanaro6dead952003-09-25 14:50:04 +000014495 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014496 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014497 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14498 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014499 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014500 $as_echo "$ac_cs_version"; exit ;;
14501 --config | --confi | --conf | --con | --co | --c )
14502 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014503 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014504 debug=: ;;
14505 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014506 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014507 case $ac_optarg in
14508 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014509 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014510 esac
14511 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014512 ac_need_defaults=false;;
14513 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014514 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014515 case $ac_optarg in
14516 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14517 esac
14518 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014519 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014520 --he | --h)
14521 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014522 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014523Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014524 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014525 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014526 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14527 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14528 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014529
14530 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014531 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014532Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014533
Matthias Kloseb9621712010-04-24 17:59:49 +000014534 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014535 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014536
14537 esac
14538 shift
14539done
14540
Skip Montanaro6dead952003-09-25 14:50:04 +000014541ac_configure_extra_args=
14542
14543if $ac_cs_silent; then
14544 exec 6>/dev/null
14545 ac_configure_extra_args="$ac_configure_extra_args --silent"
14546fi
14547
14548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014549cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014550if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014551 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14552 shift
14553 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14554 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014555 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014556 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014557fi
14558
Martin v. Löwis11437992002-04-12 09:54:03 +000014559_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014560cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014561exec 5>>config.log
14562{
14563 echo
14564 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14565## Running $as_me. ##
14566_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014567 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014568} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014569
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014571cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014572_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014573
Matthias Kloseb9621712010-04-24 17:59:49 +000014574cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014575
14576# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014577for ac_config_target in $ac_config_targets
14578do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014579 case $ac_config_target in
14580 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14581 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14582 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014583 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14584 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014585 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14586 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014587 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014588 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014589
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014590 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014591 esac
14592done
14593
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014594
Martin v. Löwis11437992002-04-12 09:54:03 +000014595# If the user did not use the arguments to specify the items to instantiate,
14596# then the envvar interface is used. Set only those that are not.
14597# We use the long form for the default assignment because of an extremely
14598# bizarre bug on SunOS 4.1.3.
14599if $ac_need_defaults; then
14600 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14601 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14602fi
14603
Skip Montanaro6dead952003-09-25 14:50:04 +000014604# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014605# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014606# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014607# Hook for its removal unless debugging.
14608# Note that there is a small window in which the directory will not be cleaned:
14609# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014610$debug ||
14611{
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014612 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014613 trap 'exit_status=$?
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014614 : "${ac_tmp:=$tmp}"
14615 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014616' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014617 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014618}
Martin v. Löwis11437992002-04-12 09:54:03 +000014619# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014620
Martin v. Löwis11437992002-04-12 09:54:03 +000014621{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014622 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014623 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014624} ||
14625{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014626 tmp=./conf$$-$RANDOM
14627 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014628} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014629ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014630
Matthias Kloseb9621712010-04-24 17:59:49 +000014631# Set up the scripts for CONFIG_FILES section.
14632# No need to generate them if there are no CONFIG_FILES.
14633# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014634if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014635
Matthias Kloseb9621712010-04-24 17:59:49 +000014636
14637ac_cr=`echo X | tr X '\015'`
14638# On cygwin, bash can eat \r inside `` if the user requested igncr.
14639# But we know of no other shell where ac_cr would be empty at this
14640# point, so we can use a bashism as a fallback.
14641if test "x$ac_cr" = x; then
14642 eval ac_cr=\$\'\\r\'
14643fi
14644ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14645if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014646 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014647else
14648 ac_cs_awk_cr=$ac_cr
14649fi
14650
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014651echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014652_ACEOF
14653
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014654
Matthias Kloseb9621712010-04-24 17:59:49 +000014655{
14656 echo "cat >conf$$subs.awk <<_ACEOF" &&
14657 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14658 echo "_ACEOF"
14659} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014660 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14661ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014662ac_delim='%!_!# '
14663for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014664 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014665 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014666
Matthias Kloseb9621712010-04-24 17:59:49 +000014667 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14668 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014669 break
14670 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014671 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014672 else
14673 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014674 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014675done
Matthias Kloseb9621712010-04-24 17:59:49 +000014676rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014677
Matthias Kloseb9621712010-04-24 17:59:49 +000014678cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014679cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014681sed -n '
14682h
14683s/^/S["/; s/!.*/"]=/
14684p
14685g
14686s/^[^!]*!//
14687:repl
14688t repl
14689s/'"$ac_delim"'$//
14690t delim
14691:nl
14692h
14693s/\(.\{148\}\)..*/\1/
14694t more1
14695s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14696p
14697n
14698b repl
14699:more1
14700s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14701p
14702g
14703s/.\{148\}//
14704t nl
14705:delim
14706h
14707s/\(.\{148\}\)..*/\1/
14708t more2
14709s/["\\]/\\&/g; s/^/"/; s/$/"/
14710p
14711b
14712:more2
14713s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14714p
14715g
14716s/.\{148\}//
14717t delim
14718' <conf$$subs.awk | sed '
14719/^[^""]/{
14720 N
14721 s/\n//
14722}
14723' >>$CONFIG_STATUS || ac_write_fail=1
14724rm -f conf$$subs.awk
14725cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14726_ACAWK
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014727cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014728 for (key in S) S_is_set[key] = 1
14729 FS = ""
14730
14731}
14732{
14733 line = $ 0
14734 nfields = split(line, field, "@")
14735 substed = 0
14736 len = length(field[1])
14737 for (i = 2; i < nfields; i++) {
14738 key = field[i]
14739 keylen = length(key)
14740 if (S_is_set[key]) {
14741 value = S[key]
14742 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14743 len += length(value) + length(field[++i])
14744 substed = 1
14745 } else
14746 len += 1 + keylen
14747 }
14748
14749 print line
14750}
14751
14752_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014753_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014754cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14755if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14756 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14757else
14758 cat
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014759fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014760 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014761_ACEOF
14762
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014763# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14764# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014765# trailing colons and then remove the whole line if VPATH becomes empty
14766# (actually we leave an empty line to preserve line numbers).
14767if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014768 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14769h
14770s///
14771s/^/:/
14772s/[ ]*$/:/
14773s/:\$(srcdir):/:/g
14774s/:\${srcdir}:/:/g
14775s/:@srcdir@:/:/g
14776s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014777s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014778x
14779s/\(=[ ]*\).*/\1/
14780G
14781s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014782s/^[^=]*=[ ]*$//
14783}'
14784fi
14785
Matthias Kloseb9621712010-04-24 17:59:49 +000014786cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014787fi # test -n "$CONFIG_FILES"
14788
Matthias Kloseb9621712010-04-24 17:59:49 +000014789# Set up the scripts for CONFIG_HEADERS section.
14790# No need to generate them if there are no CONFIG_HEADERS.
14791# This happens for instance with `./config.status Makefile'.
14792if test -n "$CONFIG_HEADERS"; then
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014793cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014794BEGIN {
14795_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014796
Matthias Kloseb9621712010-04-24 17:59:49 +000014797# Transform confdefs.h into an awk script `defines.awk', embedded as
14798# here-document in config.status, that substitutes the proper values into
14799# config.h.in to produce config.h.
14800
14801# Create a delimiter string that does not exist in confdefs.h, to ease
14802# handling of long lines.
14803ac_delim='%!_!# '
14804for ac_last_try in false false :; do
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014805 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14806 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014807 break
14808 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014809 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014810 else
14811 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14812 fi
14813done
14814
14815# For the awk script, D is an array of macro values keyed by name,
14816# likewise P contains macro parameters if any. Preserve backslash
14817# newline sequences.
14818
14819ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14820sed -n '
14821s/.\{148\}/&'"$ac_delim"'/g
14822t rset
14823:rset
14824s/^[ ]*#[ ]*define[ ][ ]*/ /
14825t def
14826d
14827:def
14828s/\\$//
14829t bsnl
14830s/["\\]/\\&/g
14831s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14832D["\1"]=" \3"/p
14833s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14834d
14835:bsnl
14836s/["\\]/\\&/g
14837s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14838D["\1"]=" \3\\\\\\n"\\/p
14839t cont
14840s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14841t cont
14842d
14843:cont
14844n
14845s/.\{148\}/&'"$ac_delim"'/g
14846t clear
14847:clear
14848s/\\$//
14849t bsnlc
14850s/["\\]/\\&/g; s/^/"/; s/$/"/p
14851d
14852:bsnlc
14853s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14854b cont
14855' <confdefs.h | sed '
14856s/'"$ac_delim"'/"\\\
14857"/g' >>$CONFIG_STATUS || ac_write_fail=1
14858
14859cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14860 for (key in D) D_is_set[key] = 1
14861 FS = ""
14862}
14863/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14864 line = \$ 0
14865 split(line, arg, " ")
14866 if (arg[1] == "#") {
14867 defundef = arg[2]
14868 mac1 = arg[3]
14869 } else {
14870 defundef = substr(arg[1], 2)
14871 mac1 = arg[2]
14872 }
14873 split(mac1, mac2, "(") #)
14874 macro = mac2[1]
14875 prefix = substr(line, 1, index(line, defundef) - 1)
14876 if (D_is_set[macro]) {
14877 # Preserve the white space surrounding the "#".
14878 print prefix "define", macro P[macro] D[macro]
14879 next
14880 } else {
14881 # Replace #undef with comments. This is necessary, for example,
14882 # in the case of _POSIX_SOURCE, which is predefined and required
14883 # on some systems where configure will not decide to define it.
14884 if (defundef == "undef") {
14885 print "/*", prefix defundef, macro, "*/"
14886 next
14887 }
14888 }
14889}
14890{ print }
14891_ACAWK
14892_ACEOF
14893cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014894 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014895fi # test -n "$CONFIG_HEADERS"
14896
14897
14898eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14899shift
14900for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014901do
14902 case $ac_tag in
14903 :[FHLC]) ac_mode=$ac_tag; continue;;
14904 esac
14905 case $ac_mode$ac_tag in
14906 :[FHL]*:*);;
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014907 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014908 :[FH]-) ac_tag=-:-;;
14909 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14910 esac
14911 ac_save_IFS=$IFS
14912 IFS=:
14913 set x $ac_tag
14914 IFS=$ac_save_IFS
14915 shift
14916 ac_file=$1
14917 shift
14918
14919 case $ac_mode in
14920 :L) ac_source=$1;;
14921 :[FH])
14922 ac_file_inputs=
14923 for ac_f
14924 do
14925 case $ac_f in
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014926 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014927 *) # Look for the file first in the build tree, then in the source tree
14928 # (if the path is not absolute). The absolute path cannot be DOS-style,
14929 # because $ac_f cannot contain `:'.
14930 test -f "$ac_f" ||
14931 case $ac_f in
14932 [\\/$]*) false;;
14933 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14934 esac ||
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014935 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014936 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014937 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14938 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014939 done
14940
14941 # Let's still pretend it is `configure' which instantiates (i.e., don't
14942 # use $as_me), people would be surprised to read:
14943 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014944 configure_input='Generated from '`
14945 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14946 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014947 if test x"$ac_file" != x-; then
14948 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014949 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14950$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014951 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014952 # Neutralize special characters interpreted by sed in replacement strings.
14953 case $configure_input in #(
14954 *\&* | *\|* | *\\* )
14955 ac_sed_conf_input=`$as_echo "$configure_input" |
14956 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14957 *) ac_sed_conf_input=$configure_input;;
14958 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014959
14960 case $ac_tag in
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014961 *:-:* | *:-) cat >"$ac_tmp/stdin" \
14962 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014963 esac
14964 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014965 esac
14966
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014967 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014968$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014969 X"$ac_file" : 'X\(//\)[^/]' \| \
14970 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014971 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014972$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014973 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14974 s//\1/
14975 q
14976 }
14977 /^X\(\/\/\)[^/].*/{
14978 s//\1/
14979 q
14980 }
14981 /^X\(\/\/\)$/{
14982 s//\1/
14983 q
14984 }
14985 /^X\(\/\).*/{
14986 s//\1/
14987 q
14988 }
14989 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014990 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014991 ac_builddir=.
14992
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014993case "$ac_dir" in
14994.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14995*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014996 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014997 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014998 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014999 case $ac_top_builddir_sub in
15000 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15001 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15002 esac ;;
15003esac
15004ac_abs_top_builddir=$ac_pwd
15005ac_abs_builddir=$ac_pwd$ac_dir_suffix
15006# for backward compatibility:
15007ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015008
15009case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015010 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015011 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015012 ac_top_srcdir=$ac_top_builddir_sub
15013 ac_abs_top_srcdir=$ac_pwd ;;
15014 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015015 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015016 ac_top_srcdir=$srcdir
15017 ac_abs_top_srcdir=$srcdir ;;
15018 *) # Relative name.
15019 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15020 ac_top_srcdir=$ac_top_build_prefix$srcdir
15021 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015022esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015023ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015024
Martin v. Löwis11437992002-04-12 09:54:03 +000015025
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015026 case $ac_mode in
15027 :F)
15028 #
15029 # CONFIG_FILE
15030 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015031
15032 case $INSTALL in
15033 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015034 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015035 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015036_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015037
Matthias Kloseb9621712010-04-24 17:59:49 +000015038cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015039# If the template does not know about datarootdir, expand it.
15040# FIXME: This hack should be removed a few years after 2.60.
15041ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015042ac_sed_dataroot='
15043/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015044 p
15045 q
15046}
15047/@datadir@/p
15048/@docdir@/p
15049/@infodir@/p
15050/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015051/@mandir@/p'
15052case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015053*datarootdir*) ac_datarootdir_seen=yes;;
15054*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015055 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15056$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015057_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015058cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015059 ac_datarootdir_hack='
15060 s&@datadir@&$datadir&g
15061 s&@docdir@&$docdir&g
15062 s&@infodir@&$infodir&g
15063 s&@localedir@&$localedir&g
15064 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015065 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015066esac
15067_ACEOF
15068
15069# Neutralize VPATH when `$srcdir' = `.'.
15070# Shell code in configure.ac might set extrasub.
15071# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015072cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15073ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015074$extrasub
15075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015076cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015077:t
15078/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015079s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015080s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015081s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015082s&@srcdir@&$ac_srcdir&;t t
15083s&@abs_srcdir@&$ac_abs_srcdir&;t t
15084s&@top_srcdir@&$ac_top_srcdir&;t t
15085s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15086s&@builddir@&$ac_builddir&;t t
15087s&@abs_builddir@&$ac_abs_builddir&;t t
15088s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15089s&@INSTALL@&$ac_INSTALL&;t t
15090$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015091"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020015092eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15093 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015094
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015095test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020015096 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15097 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15098 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015099 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015100which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015101$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015102which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015103
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020015104 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015105 case $ac_file in
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020015106 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15107 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015108 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015109 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015110 ;;
15111 :H)
15112 #
15113 # CONFIG_HEADER
15114 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015115 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015116 {
15117 $as_echo "/* $configure_input */" \
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020015118 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15119 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015120 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020015121 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015122 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15123$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015124 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015125 rm -f "$ac_file"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020015126 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015127 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015128 fi
15129 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015130 $as_echo "/* $configure_input */" \
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020015131 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015132 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015133 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015134 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015135
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015136
15137 esac
15138
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015139
15140 case $ac_file$ac_mode in
15141 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15142
15143 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015144done # for ac_tag
15145
Guido van Rossum627b2d71993-12-24 10:39:16 +000015146
Matthias Kloseb9621712010-04-24 17:59:49 +000015147as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015148_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015149ac_clean_files=$ac_clean_files_save
15150
Matthias Kloseb9621712010-04-24 17:59:49 +000015151test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015152 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015153
Martin v. Löwis11437992002-04-12 09:54:03 +000015154
15155# configure is writing to config.log, and then calls config.status.
15156# config.status does its own redirection, appending to config.log.
15157# Unfortunately, on DOS this fails, as config.log is still kept open
15158# by configure, so config.status won't be able to write to it; its
15159# output is simply discarded. So we exec the FD to /dev/null,
15160# effectively closing config.log, so it can be properly (re)opened and
15161# appended to by config.status. When coming back to configure, we
15162# need to make the FD available again.
15163if test "$no_create" != yes; then
15164 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015165 ac_config_status_args=
15166 test "$silent" = yes &&
15167 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015168 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015169 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015170 exec 5>>config.log
15171 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15172 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015173 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015174fi
15175if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15176 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15177$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015178fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015179
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015180
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015181echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015182if test ! -f Modules/Setup
15183then
15184 cp $srcdir/Modules/Setup.dist Modules/Setup
15185fi
15186
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015187echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015188if test ! -f Modules/Setup.local
15189then
15190 echo "# Edit this file for local setup changes" >Modules/Setup.local
15191fi
15192
15193echo "creating Makefile"
15194$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15195 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015196 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015197mv config.c Modules