blob: 708a0e198a38a196b350a0193e421e9db32813ae [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Matthias Klose0f4c16e2012-03-14 23:10:15 +01002# From configure.ac Revision.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Gregory P. Smith69140482012-01-16 02:05:55 -08004# Generated by GNU Autoconf 2.68 for python 3.2.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Kloseb9621712010-04-24 17:59:49 +00008#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
11# Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +000012#
13#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014# This configure script is free software; the Free Software Foundation
15# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000016## -------------------- ##
17## M4sh Initialization. ##
18## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020# Be more Bourne compatible
21DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000022if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000023 emulate sh
24 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000025 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026 # is contrary to our usage. Disable this feature.
27 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000029else
Matthias Kloseb9621712010-04-24 17:59:49 +000030 case `(set -o) 2>/dev/null` in #(
31 *posix*) :
32 set -o posix ;; #(
33 *) :
34 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035esac
Martin v. Löwis11437992002-04-12 09:54:03 +000036fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000037
38
Matthias Kloseb9621712010-04-24 17:59:49 +000039as_nl='
40'
41export as_nl
42# Printing a long string crashes Solaris 7 /usr/bin/printf.
43as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
45as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
46# Prefer a ksh shell builtin over an external printf program on Solaris,
47# but without wasting forks for bash or zsh.
48if test -z "$BASH_VERSION$ZSH_VERSION" \
49 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='print -r --'
51 as_echo_n='print -rn --'
52elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53 as_echo='printf %s\n'
54 as_echo_n='printf %s'
55else
56 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
57 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
58 as_echo_n='/usr/ucb/echo -n'
59 else
60 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
61 as_echo_n_body='eval
62 arg=$1;
63 case $arg in #(
64 *"$as_nl"*)
65 expr "X$arg" : "X\\(.*\\)$as_nl";
66 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67 esac;
68 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
69 '
70 export as_echo_n_body
71 as_echo_n='sh -c $as_echo_n_body as_echo'
72 fi
73 export as_echo_body
74 as_echo='sh -c $as_echo_body as_echo'
75fi
Martin v. Löwis11437992002-04-12 09:54:03 +000076
77# The user is always right.
78if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000079 PATH_SEPARATOR=:
80 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82 PATH_SEPARATOR=';'
83 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000086
87# IFS
88# We need space, tab and new line, in precisely that order. Quoting is
89# there to prevent editors from complaining about space-tab.
90# (If _AS_PATH_WALK were called with IFS unset, it would disable word
91# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000092IFS=" "" $as_nl"
93
94# Find who we are. Look in the path if we contain no directory separator.
Gregory P. Smith69140482012-01-16 02:05:55 -080095as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000096case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000097 *[\\/]* ) as_myself=$0 ;;
98 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000099for as_dir in $PATH
100do
101 IFS=$as_save_IFS
102 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000103 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
104 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000105IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000106
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000107 ;;
108esac
109# We did not find ourselves, most probably we were run as `sh COMMAND'
110# in which case we are not to be found in the path.
111if test "x$as_myself" = x; then
112 as_myself=$0
113fi
114if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000115 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
116 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000117fi
118
Matthias Kloseb9621712010-04-24 17:59:49 +0000119# Unset variables that we do not need and which cause bugs (e.g. in
120# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
121# suppresses any "Segmentation fault" message there. '((' could
122# trigger a bug in pdksh 5.2.14.
123for as_var in BASH_ENV ENV MAIL MAILPATH
124do eval test x\${$as_var+set} = xset \
125 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000126done
127PS1='$ '
128PS2='> '
129PS4='+ '
130
131# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000132LC_ALL=C
133export LC_ALL
134LANGUAGE=C
135export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000136
Matthias Kloseb9621712010-04-24 17:59:49 +0000137# CDPATH.
138(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
139
140if test "x$CONFIG_SHELL" = x; then
141 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
142 emulate sh
143 NULLCMD=:
144 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
145 # is contrary to our usage. Disable this feature.
146 alias -g '\${1+\"\$@\"}'='\"\$@\"'
147 setopt NO_GLOB_SUBST
148else
149 case \`(set -o) 2>/dev/null\` in #(
150 *posix*) :
151 set -o posix ;; #(
152 *) :
153 ;;
154esac
155fi
156"
157 as_required="as_fn_return () { (exit \$1); }
158as_fn_success () { as_fn_return 0; }
159as_fn_failure () { as_fn_return 1; }
160as_fn_ret_success () { return 0; }
161as_fn_ret_failure () { return 1; }
162
163exitcode=0
164as_fn_success || { exitcode=1; echo as_fn_success failed.; }
165as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
166as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
167as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
168if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
169
170else
171 exitcode=1; echo positional parameters were not saved.
172fi
173test x\$exitcode = x0 || exit 1"
174 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
175 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
176 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
177 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
178test \$(( 1 + 1 )) = 2 || exit 1"
179 if (eval "$as_required") 2>/dev/null; then :
180 as_have_required=yes
181else
182 as_have_required=no
183fi
184 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
185
186else
187 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
188as_found=false
189for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
190do
191 IFS=$as_save_IFS
192 test -z "$as_dir" && as_dir=.
193 as_found=:
194 case $as_dir in #(
195 /*)
196 for as_base in sh bash ksh sh5; do
197 # Try only shells that exist, to save several forks.
198 as_shell=$as_dir/$as_base
199 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
200 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
201 CONFIG_SHELL=$as_shell as_have_required=yes
202 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
203 break 2
204fi
205fi
206 done;;
207 esac
208 as_found=false
209done
210$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
211 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
212 CONFIG_SHELL=$SHELL as_have_required=yes
213fi; }
214IFS=$as_save_IFS
215
216
217 if test "x$CONFIG_SHELL" != x; then :
218 # We cannot yet assume a decent shell, so we have to provide a
219 # neutralization value for shells without unset; and this also
220 # works around shells that cannot unset nonexistent variables.
Gregory P. Smith69140482012-01-16 02:05:55 -0800221 # Preserve -v and -x to the replacement shell.
Matthias Kloseb9621712010-04-24 17:59:49 +0000222 BASH_ENV=/dev/null
223 ENV=/dev/null
224 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
225 export CONFIG_SHELL
Gregory P. Smith69140482012-01-16 02:05:55 -0800226 case $- in # ((((
227 *v*x* | *x*v* ) as_opts=-vx ;;
228 *v* ) as_opts=-v ;;
229 *x* ) as_opts=-x ;;
230 * ) as_opts= ;;
231 esac
232 exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
Matthias Kloseb9621712010-04-24 17:59:49 +0000233fi
234
235 if test x$as_have_required = xno; then :
236 $as_echo "$0: This script requires a shell more modern than all"
237 $as_echo "$0: the shells that I found on your system."
238 if test x${ZSH_VERSION+set} = xset ; then
239 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
240 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
241 else
242 $as_echo "$0: Please tell bug-autoconf@gnu.org and
243$0: http://bugs.python.org/ about your system, including
244$0: any error possibly output before this message. Then
245$0: install a modern shell, or manually run the script
246$0: under such a shell if you do have one."
247 fi
248 exit 1
249fi
250fi
251fi
252SHELL=${CONFIG_SHELL-/bin/sh}
253export SHELL
254# Unset more variables known to interfere with behavior of common tools.
255CLICOLOR_FORCE= GREP_OPTIONS=
256unset CLICOLOR_FORCE GREP_OPTIONS
257
258## --------------------- ##
259## M4sh Shell Functions. ##
260## --------------------- ##
261# as_fn_unset VAR
262# ---------------
263# Portably unset VAR.
264as_fn_unset ()
265{
266 { eval $1=; unset $1;}
267}
268as_unset=as_fn_unset
269
270# as_fn_set_status STATUS
271# -----------------------
272# Set $? to STATUS, without forking.
273as_fn_set_status ()
274{
275 return $1
276} # as_fn_set_status
277
278# as_fn_exit STATUS
279# -----------------
280# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
281as_fn_exit ()
282{
283 set +e
284 as_fn_set_status $1
285 exit $1
286} # as_fn_exit
287
288# as_fn_mkdir_p
289# -------------
290# Create "$as_dir" as a directory, including parents if necessary.
291as_fn_mkdir_p ()
292{
293
294 case $as_dir in #(
295 -*) as_dir=./$as_dir;;
296 esac
297 test -d "$as_dir" || eval $as_mkdir_p || {
298 as_dirs=
299 while :; do
300 case $as_dir in #(
301 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
302 *) as_qdir=$as_dir;;
303 esac
304 as_dirs="'$as_qdir' $as_dirs"
305 as_dir=`$as_dirname -- "$as_dir" ||
306$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
307 X"$as_dir" : 'X\(//\)[^/]' \| \
308 X"$as_dir" : 'X\(//\)$' \| \
309 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
310$as_echo X"$as_dir" |
311 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
312 s//\1/
313 q
314 }
315 /^X\(\/\/\)[^/].*/{
316 s//\1/
317 q
318 }
319 /^X\(\/\/\)$/{
320 s//\1/
321 q
322 }
323 /^X\(\/\).*/{
324 s//\1/
325 q
326 }
327 s/.*/./; q'`
328 test -d "$as_dir" && break
329 done
330 test -z "$as_dirs" || eval "mkdir $as_dirs"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000331 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000332
333
334} # as_fn_mkdir_p
335# as_fn_append VAR VALUE
336# ----------------------
337# Append the text in VALUE to the end of the definition contained in VAR. Take
338# advantage of any shell optimizations that allow amortized linear growth over
339# repeated appends, instead of the typical quadratic growth present in naive
340# implementations.
341if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
342 eval 'as_fn_append ()
343 {
344 eval $1+=\$2
345 }'
346else
347 as_fn_append ()
348 {
349 eval $1=\$$1\$2
350 }
351fi # as_fn_append
352
353# as_fn_arith ARG...
354# ------------------
355# Perform arithmetic evaluation on the ARGs, and store the result in the
356# global $as_val. Take advantage of shells that can avoid forks. The arguments
357# must be portable across $(()) and expr.
358if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
359 eval 'as_fn_arith ()
360 {
361 as_val=$(( $* ))
362 }'
363else
364 as_fn_arith ()
365 {
366 as_val=`expr "$@" || test $? -eq 1`
367 }
368fi # as_fn_arith
369
370
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000371# as_fn_error STATUS ERROR [LINENO LOG_FD]
372# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000373# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
374# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000375# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000376as_fn_error ()
377{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000378 as_status=$1; test $as_status -eq 0 && as_status=1
379 if test "$4"; then
380 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
381 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000382 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000383 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000384 as_fn_exit $as_status
385} # as_fn_error
386
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000387if expr a : '\(a\)' >/dev/null 2>&1 &&
388 test "X`expr 00001 : '.*\(...\)'`" = X001; then
389 as_expr=expr
390else
391 as_expr=false
392fi
393
394if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
395 as_basename=basename
396else
397 as_basename=false
398fi
399
Matthias Kloseb9621712010-04-24 17:59:49 +0000400if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
401 as_dirname=dirname
402else
403 as_dirname=false
404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000405
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000406as_me=`$as_basename -- "$0" ||
407$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
408 X"$0" : 'X\(//\)$' \| \
409 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000410$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000411 sed '/^.*\/\([^/][^/]*\)\/*$/{
412 s//\1/
413 q
414 }
415 /^X\/\(\/\/\)$/{
416 s//\1/
417 q
418 }
419 /^X\/\(\/\).*/{
420 s//\1/
421 q
422 }
423 s/.*/./; q'`
424
Matthias Kloseb9621712010-04-24 17:59:49 +0000425# Avoid depending upon Character Ranges.
426as_cr_letters='abcdefghijklmnopqrstuvwxyz'
427as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
428as_cr_Letters=$as_cr_letters$as_cr_LETTERS
429as_cr_digits='0123456789'
430as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000431
432
Matthias Kloseb9621712010-04-24 17:59:49 +0000433 as_lineno_1=$LINENO as_lineno_1a=$LINENO
434 as_lineno_2=$LINENO as_lineno_2a=$LINENO
435 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
436 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
437 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000438 sed -n '
439 p
440 /[$]LINENO/=
441 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000442 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000443 s/[$]LINENO.*/&-/
444 t lineno
445 b
446 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000447 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000448 :loop
449 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000451 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000452 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000453 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000454 { $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 +0000455
456 # Don't try to exec as it changes $[0], causing all sort of problems
457 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000458 # original and so on. Autoconf is especially sensitive to this).
459 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000460 # Exit status is that of the last command.
461 exit
462}
463
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000464ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000465case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000467 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000468 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000469 xy) ECHO_C='\c';;
470 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
471 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000472 esac;;
473*)
474 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000475esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000476
Martin v. Löwis11437992002-04-12 09:54:03 +0000477rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478if test -d conf$$.dir; then
479 rm -f conf$$.dir/conf$$.file
480else
481 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000482 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000484if (echo >conf$$.file) 2>/dev/null; then
485 if ln -s conf$$.file conf$$ 2>/dev/null; then
486 as_ln_s='ln -s'
487 # ... but there are two gotchas:
488 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
489 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
490 # In both cases, we have to default to `cp -p'.
491 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
492 as_ln_s='cp -p'
493 elif ln conf$$.file conf$$ 2>/dev/null; then
494 as_ln_s=ln
495 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000496 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000497 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000498else
499 as_ln_s='cp -p'
500fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000501rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
502rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000503
Skip Montanaro6dead952003-09-25 14:50:04 +0000504if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000505 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000506else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000507 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000508 as_mkdir_p=false
509fi
510
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511if test -x / >/dev/null 2>&1; then
512 as_test_x='test -x'
513else
514 if ls -dL / >/dev/null 2>&1; then
515 as_ls_L_option=L
516 else
517 as_ls_L_option=
518 fi
519 as_test_x='
520 eval sh -c '\''
521 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000522 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000523 else
Matthias Kloseb9621712010-04-24 17:59:49 +0000524 case $1 in #(
525 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000526 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +0000527 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000528 ???[sx]*):;;*)false;;esac;fi
529 '\'' sh
530 '
531fi
532as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000533
534# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000535as_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 +0000536
537# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000538as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000539
540
Matthias Kloseb9621712010-04-24 17:59:49 +0000541test -n "$DJDIR" || exec 7<&0 </dev/null
542exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000543
544# Name of the host.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000545# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000546# so uname gets run too.
547ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
548
Martin v. Löwis11437992002-04-12 09:54:03 +0000549#
550# Initializations.
551#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000552ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000553ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000554ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000555LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000556cross_compiling=no
557subdirs=
558MFLAGS=
559MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000560
Martin v. Löwis11437992002-04-12 09:54:03 +0000561# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000562PACKAGE_NAME='python'
563PACKAGE_TARNAME='python'
Benjamin Peterson46ea4f72009-06-27 21:40:27 +0000564PACKAGE_VERSION='3.2'
565PACKAGE_STRING='python 3.2'
Georg Brandle2e15612009-05-20 18:25:10 +0000566PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000567PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000568
569ac_unique_file="Include/object.h"
570# Factoring default headers for most tests.
571ac_includes_default="\
572#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000573#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000574# include <sys/types.h>
575#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000576#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000577# include <sys/stat.h>
578#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000579#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# include <stdlib.h>
581# include <stddef.h>
582#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000583# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000584# include <stdlib.h>
585# endif
586#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000587#ifdef HAVE_STRING_H
588# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000589# include <memory.h>
590# endif
591# include <string.h>
592#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000593#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000594# include <strings.h>
595#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000596#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000598#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000599#ifdef HAVE_STDINT_H
600# include <stdint.h>
601#endif
602#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <unistd.h>
604#endif"
605
Matthias Kloseb9621712010-04-24 17:59:49 +0000606ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000607SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000608THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000609SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000610LIBC
611LIBM
612HAVE_GETHOSTBYNAME
613HAVE_GETHOSTBYNAME_R
614HAVE_GETHOSTBYNAME_R_3_ARG
615HAVE_GETHOSTBYNAME_R_5_ARG
616HAVE_GETHOSTBYNAME_R_6_ARG
617LIBOBJS
618TRUE
619MACHDEP_OBJS
620DYNLOADFILE
621DLINCLDIR
622THREADOBJ
623LDLAST
624USE_THREAD_MODULE
625SIGNAL_OBJS
626USE_SIGNAL_MODULE
627LIBFFI_INCLUDEDIR
628PKG_CONFIG
629SHLIBS
630CFLAGSFORSHARED
631LINKFORSHARED
632CCSHARED
633BLDSHARED
634LDCXXSHARED
635LDSHARED
636SO
637LIBTOOL_CRUFT
638OTHER_LIBTOOL_OPT
639UNIVERSAL_ARCH_FLAGS
640BASECFLAGS
641OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000642ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000643LN
Trent Nelsona45afca2012-08-30 14:32:02 +0000644MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000645INSTALL_DATA
646INSTALL_SCRIPT
647INSTALL_PROGRAM
Matthias Klosec4c48422012-10-21 23:05:35 +0200648PYTHON
649ASDLGEN
Georg Brandl1ca2e792011-03-05 20:51:24 +0100650HAS_HG
651HGBRANCH
652HGTAG
653HGVERSION
Trent Nelson9effe692012-10-16 08:41:32 -0400654BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000655SVNVERSION
656ARFLAGS
657AR
658RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000659USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000660GNULD
661LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000662LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000663RUNSHARED
664INSTSONAME
665LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000666PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000667BLDLIBRARY
668DLLLIBRARY
669LDLIBRARY
670LIBRARY
671BUILDEXEEXT
672EGREP
673GREP
674CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200675NO_AS_NEEDED
Matthias Kloseb9621712010-04-24 17:59:49 +0000676MAINCC
677CXX
678OBJEXT
679EXEEXT
680ac_ct_CC
681CPPFLAGS
682LDFLAGS
683CFLAGS
684CC
685EXPORT_MACOSX_DEPLOYMENT_TARGET
686CONFIGURE_MACOSX_DEPLOYMENT_TARGET
687SGI_ABI
688MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000689FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000690FRAMEWORKUNIXTOOLSPREFIX
691FRAMEWORKALTINSTALLLAST
692FRAMEWORKALTINSTALLFIRST
693FRAMEWORKINSTALLLAST
694FRAMEWORKINSTALLFIRST
695PYTHONFRAMEWORKINSTALLDIR
696PYTHONFRAMEWORKPREFIX
697PYTHONFRAMEWORKDIR
698PYTHONFRAMEWORKIDENTIFIER
699PYTHONFRAMEWORK
700LIPO_32BIT_FLAGS
701ARCH_RUN_32BIT
702UNIVERSALSDK
703CONFIG_ARGS
704SOVERSION
705VERSION
706target_alias
707host_alias
708build_alias
709LIBS
710ECHO_T
711ECHO_N
712ECHO_C
713DEFS
714mandir
715localedir
716libdir
717psdir
718pdfdir
719dvidir
720htmldir
721infodir
722docdir
723oldincludedir
724includedir
725localstatedir
726sharedstatedir
727sysconfdir
728datadir
729datarootdir
730libexecdir
731sbindir
732bindir
733program_transform_name
734prefix
735exec_prefix
736PACKAGE_URL
737PACKAGE_BUGREPORT
738PACKAGE_STRING
739PACKAGE_VERSION
740PACKAGE_TARNAME
741PACKAGE_NAME
742PATH_SEPARATOR
743SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000744ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000745ac_user_opts='
746enable_option_checking
747enable_universalsdk
748with_universal_archs
749with_framework_name
750enable_framework
751with_gcc
752with_cxx_main
753with_suffix
754enable_shared
755enable_profiling
756with_pydebug
757with_libs
758with_system_expat
759with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000760enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000761with_dbmliborder
762with_signal_module
763with_dec_threads
764with_threads
765with_thread
766enable_ipv6
767with_doc_strings
768with_tsc
769with_pymalloc
770with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000771with_fpectl
772with_libm
773with_libc
774enable_big_digits
775with_wide_unicode
776with_computed_gotos
777'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000778 ac_precious_vars='build_alias
779host_alias
780target_alias
781CC
782CFLAGS
783LDFLAGS
784LIBS
785CPPFLAGS
Barry Warsaw14d98ac2010-11-24 19:43:47 +0000786CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000787
Guido van Rossum627b2d71993-12-24 10:39:16 +0000788
Guido van Rossum7f43da71994-08-01 12:15:30 +0000789# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000790ac_init_help=
791ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000792ac_unrecognized_opts=
793ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000794# The variables have the same names as the options, with
795# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000796cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000797exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000799no_recursion=
800prefix=NONE
801program_prefix=NONE
802program_suffix=NONE
803program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000804silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000805site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000806srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000807verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000808x_includes=NONE
809x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000810
811# Installation directory options.
812# These are left unexpanded so users can "make install exec_prefix=/foo"
813# and all the variables that are supposed to be based on exec_prefix
814# by default will actually change.
815# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000816# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000817bindir='${exec_prefix}/bin'
818sbindir='${exec_prefix}/sbin'
819libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000820datarootdir='${prefix}/share'
821datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000822sysconfdir='${prefix}/etc'
823sharedstatedir='${prefix}/com'
824localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000825includedir='${prefix}/include'
826oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000827docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
828infodir='${datarootdir}/info'
829htmldir='${docdir}'
830dvidir='${docdir}'
831pdfdir='${docdir}'
832psdir='${docdir}'
833libdir='${exec_prefix}/lib'
834localedir='${datarootdir}/locale'
835mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000836
Guido van Rossum7f43da71994-08-01 12:15:30 +0000837ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000838ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000840do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000841 # If the previous option needs an argument, assign it.
842 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000843 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000844 ac_prev=
845 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000846 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000848 case $ac_option in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000849 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
850 *=) ac_optarg= ;;
851 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000852 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000854 # Accept the important Cygnus configure options, so we can diagnose typos.
855
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000856 case $ac_dashdash$ac_option in
857 --)
858 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000859
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000860 -bindir | --bindir | --bindi | --bind | --bin | --bi)
861 ac_prev=bindir ;;
862 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000863 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000864
865 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000866 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000867 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000868 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870 -cache-file | --cache-file | --cache-fil | --cache-fi \
871 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
872 ac_prev=cache_file ;;
873 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
874 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000875 cache_file=$ac_optarg ;;
876
877 --config-cache | -C)
878 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000879
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000880 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000881 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000882 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000883 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000884
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000885 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
886 | --dataroo | --dataro | --datar)
887 ac_prev=datarootdir ;;
888 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
889 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
890 datarootdir=$ac_optarg ;;
891
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000893 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000894 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000895 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000896 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000897 ac_useropt_orig=$ac_useropt
898 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
899 case $ac_user_opts in
900 *"
901"enable_$ac_useropt"
902"*) ;;
903 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
904 ac_unrecognized_sep=', ';;
905 esac
906 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000907
908 -docdir | --docdir | --docdi | --doc | --do)
909 ac_prev=docdir ;;
910 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
911 docdir=$ac_optarg ;;
912
913 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
914 ac_prev=dvidir ;;
915 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
916 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917
918 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000919 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000920 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000921 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000922 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000923 ac_useropt_orig=$ac_useropt
924 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
925 case $ac_user_opts in
926 *"
927"enable_$ac_useropt"
928"*) ;;
929 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
930 ac_unrecognized_sep=', ';;
931 esac
932 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
935 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
936 | --exec | --exe | --ex)
937 ac_prev=exec_prefix ;;
938 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
939 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
940 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000942
943 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000944 # Obsolete; use --with-gas.
945 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000946
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 -help | --help | --hel | --he | -h)
948 ac_init_help=long ;;
949 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
950 ac_init_help=recursive ;;
951 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
952 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953
954 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000955 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000959 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
960 ac_prev=htmldir ;;
961 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
962 | --ht=*)
963 htmldir=$ac_optarg ;;
964
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000965 -includedir | --includedir | --includedi | --included | --include \
966 | --includ | --inclu | --incl | --inc)
967 ac_prev=includedir ;;
968 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
969 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000970 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000971
972 -infodir | --infodir | --infodi | --infod | --info | --inf)
973 ac_prev=infodir ;;
974 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000975 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000976
977 -libdir | --libdir | --libdi | --libd)
978 ac_prev=libdir ;;
979 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000981
982 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
983 | --libexe | --libex | --libe)
984 ac_prev=libexecdir ;;
985 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
986 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000988
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000989 -localedir | --localedir | --localedi | --localed | --locale)
990 ac_prev=localedir ;;
991 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
992 localedir=$ac_optarg ;;
993
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000994 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000995 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000996 ac_prev=localstatedir ;;
997 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000998 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000999 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001000
1001 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1002 ac_prev=mandir ;;
1003 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001005
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001007 # Obsolete; use --without-fp.
1008 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009
1010 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012 no_create=yes ;;
1013
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001014 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1015 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1016 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001018 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1019 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1020 | --oldin | --oldi | --old | --ol | --o)
1021 ac_prev=oldincludedir ;;
1022 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1023 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1024 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001026
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1028 ac_prev=prefix ;;
1029 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031
1032 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1033 | --program-pre | --program-pr | --program-p)
1034 ac_prev=program_prefix ;;
1035 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1036 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001037 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001038
1039 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1040 | --program-suf | --program-su | --program-s)
1041 ac_prev=program_suffix ;;
1042 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1043 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001045
1046 -program-transform-name | --program-transform-name \
1047 | --program-transform-nam | --program-transform-na \
1048 | --program-transform-n | --program-transform- \
1049 | --program-transform | --program-transfor \
1050 | --program-transfo | --program-transf \
1051 | --program-trans | --program-tran \
1052 | --progr-tra | --program-tr | --program-t)
1053 ac_prev=program_transform_name ;;
1054 -program-transform-name=* | --program-transform-name=* \
1055 | --program-transform-nam=* | --program-transform-na=* \
1056 | --program-transform-n=* | --program-transform-=* \
1057 | --program-transform=* | --program-transfor=* \
1058 | --program-transfo=* | --program-transf=* \
1059 | --program-trans=* | --program-tran=* \
1060 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001063 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1064 ac_prev=pdfdir ;;
1065 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1066 pdfdir=$ac_optarg ;;
1067
1068 -psdir | --psdir | --psdi | --psd | --ps)
1069 ac_prev=psdir ;;
1070 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1071 psdir=$ac_optarg ;;
1072
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1074 | -silent | --silent | --silen | --sile | --sil)
1075 silent=yes ;;
1076
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001077 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1078 ac_prev=sbindir ;;
1079 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1080 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001081 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001082
1083 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1084 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1085 | --sharedst | --shareds | --shared | --share | --shar \
1086 | --sha | --sh)
1087 ac_prev=sharedstatedir ;;
1088 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1089 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1090 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1091 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001093
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001094 -site | --site | --sit)
1095 ac_prev=site ;;
1096 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001098
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1100 ac_prev=srcdir ;;
1101 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001104 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1105 | --syscon | --sysco | --sysc | --sys | --sy)
1106 ac_prev=sysconfdir ;;
1107 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1108 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001110
Guido van Rossum7f43da71994-08-01 12:15:30 +00001111 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001113 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001115
1116 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1117 verbose=yes ;;
1118
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 -version | --version | --versio | --versi | --vers | -V)
1120 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001121
1122 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001123 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001124 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001125 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001126 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001127 ac_useropt_orig=$ac_useropt
1128 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1129 case $ac_user_opts in
1130 *"
1131"with_$ac_useropt"
1132"*) ;;
1133 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1134 ac_unrecognized_sep=', ';;
1135 esac
1136 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137
1138 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001139 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001140 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001141 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001142 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001143 ac_useropt_orig=$ac_useropt
1144 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1145 case $ac_user_opts in
1146 *"
1147"with_$ac_useropt"
1148"*) ;;
1149 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1150 ac_unrecognized_sep=', ';;
1151 esac
1152 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001153
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001154 --x)
1155 # Obsolete; use --with-x.
1156 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001157
1158 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1159 | --x-incl | --x-inc | --x-in | --x-i)
1160 ac_prev=x_includes ;;
1161 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1162 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001164
1165 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1166 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1167 ac_prev=x_libraries ;;
1168 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1169 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001171
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001172 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1173Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174 ;;
1175
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 *=*)
1177 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1178 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001179 case $ac_envvar in #(
1180 '' | [0-9]* | *[!_$as_cr_alnum]* )
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001181 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001182 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001183 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 export $ac_envvar ;;
1185
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001186 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001188 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001189 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001190 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Gregory P. Smith69140482012-01-16 02:05:55 -08001191 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192 ;;
1193
1194 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001195done
1196
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001198 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001199 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001200fi
1201
Matthias Kloseb9621712010-04-24 17:59:49 +00001202if test -n "$ac_unrecognized_opts"; then
1203 case $enable_option_checking in
1204 no) ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001205 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001206 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1207 esac
1208fi
1209
1210# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001211for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1212 datadir sysconfdir sharedstatedir localstatedir includedir \
1213 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1214 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001215do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001216 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001217 # Remove trailing slashes.
1218 case $ac_val in
1219 */ )
1220 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1221 eval $ac_var=\$ac_val;;
1222 esac
1223 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001224 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001225 [\\/$]* | ?:[\\/]* ) continue;;
1226 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001227 esac
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001228 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001229done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001230
Martin v. Löwis11437992002-04-12 09:54:03 +00001231# There might be people who depend on the old broken behavior: `$host'
1232# used to hold the argument of --host etc.
1233# FIXME: To remove some day.
1234build=$build_alias
1235host=$host_alias
1236target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001237
Martin v. Löwis11437992002-04-12 09:54:03 +00001238# FIXME: To remove some day.
1239if test "x$host_alias" != x; then
1240 if test "x$build_alias" = x; then
1241 cross_compiling=maybe
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001242 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1243 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001244 elif test "x$build_alias" != "x$host_alias"; then
1245 cross_compiling=yes
1246 fi
1247fi
1248
1249ac_tool_prefix=
1250test -n "$host_alias" && ac_tool_prefix=$host_alias-
1251
1252test "$silent" = yes && exec 6>/dev/null
1253
Guido van Rossum627b2d71993-12-24 10:39:16 +00001254
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001255ac_pwd=`pwd` && test -n "$ac_pwd" &&
1256ac_ls_di=`ls -di .` &&
1257ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001258 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001259test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001260 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001261
1262
Guido van Rossum627b2d71993-12-24 10:39:16 +00001263# Find the source files, if location was not specified.
1264if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001265 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001266 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001267 ac_confdir=`$as_dirname -- "$as_myself" ||
1268$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1269 X"$as_myself" : 'X\(//\)[^/]' \| \
1270 X"$as_myself" : 'X\(//\)$' \| \
1271 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1272$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001273 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1274 s//\1/
1275 q
1276 }
1277 /^X\(\/\/\)[^/].*/{
1278 s//\1/
1279 q
1280 }
1281 /^X\(\/\/\)$/{
1282 s//\1/
1283 q
1284 }
1285 /^X\(\/\).*/{
1286 s//\1/
1287 q
1288 }
1289 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001290 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001291 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001292 srcdir=..
1293 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001294else
1295 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001296fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001297if test ! -r "$srcdir/$ac_unique_file"; then
1298 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001299 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001301ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1302ac_abs_confdir=`(
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001303 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001304 pwd)`
1305# When building in place, set srcdir=.
1306if test "$ac_abs_confdir" = "$ac_pwd"; then
1307 srcdir=.
1308fi
1309# Remove unnecessary trailing slashes from srcdir.
1310# Double slashes in file names in object file debugging info
1311# mess up M-x gdb in Emacs.
1312case $srcdir in
1313*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1314esac
1315for ac_var in $ac_precious_vars; do
1316 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1317 eval ac_env_${ac_var}_value=\$${ac_var}
1318 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1319 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1320done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001321
Martin v. Löwis11437992002-04-12 09:54:03 +00001322#
1323# Report the --help message.
1324#
1325if test "$ac_init_help" = "long"; then
1326 # Omit some internal or obsolete options to make the list less imposing.
1327 # This message is too long to be a string in the A/UX 3.1 sh.
1328 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001329\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001330
1331Usage: $0 [OPTION]... [VAR=VALUE]...
1332
1333To assign environment variables (e.g., CC, CFLAGS...), specify them as
1334VAR=VALUE. See below for descriptions of some of the useful variables.
1335
1336Defaults for the options are specified in brackets.
1337
1338Configuration:
1339 -h, --help display this help and exit
1340 --help=short display options specific to this package
1341 --help=recursive display the short help of all the included packages
1342 -V, --version display version information and exit
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001343 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001344 --cache-file=FILE cache test results in FILE [disabled]
1345 -C, --config-cache alias for \`--cache-file=config.cache'
1346 -n, --no-create do not create output files
1347 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1348
Martin v. Löwis11437992002-04-12 09:54:03 +00001349Installation directories:
1350 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001351 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001352 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001353 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001354
1355By default, \`make install' will install all the files in
1356\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1357an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1358for instance \`--prefix=\$HOME'.
1359
1360For better control, use the options below.
1361
1362Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001363 --bindir=DIR user executables [EPREFIX/bin]
1364 --sbindir=DIR system admin executables [EPREFIX/sbin]
1365 --libexecdir=DIR program executables [EPREFIX/libexec]
1366 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1367 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1368 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1369 --libdir=DIR object code libraries [EPREFIX/lib]
1370 --includedir=DIR C header files [PREFIX/include]
1371 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1372 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1373 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1374 --infodir=DIR info documentation [DATAROOTDIR/info]
1375 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1376 --mandir=DIR man documentation [DATAROOTDIR/man]
1377 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1378 --htmldir=DIR html documentation [DOCDIR]
1379 --dvidir=DIR dvi documentation [DOCDIR]
1380 --pdfdir=DIR pdf documentation [DOCDIR]
1381 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001382_ACEOF
1383
1384 cat <<\_ACEOF
1385_ACEOF
1386fi
1387
1388if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001389 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001390 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001391 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001392 cat <<\_ACEOF
1393
1394Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001395 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001396 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1397 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001398 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001399 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001400 --enable-framework[=INSTALLDIR]
1401 Build (MacOSX|Darwin) framework
1402 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001403 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001404 --enable-loadable-sqlite-extensions
1405 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001406 --enable-ipv6 Enable ipv6 (with ipv4) support
1407 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001408 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001409 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001410
1411Optional Packages:
1412 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1413 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001414 --with-universal-archs=ARCH
1415 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001416 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001417 --with-framework-name=FRAMEWORK
1418 specify an alternate name of the framework built
1419 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001420 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001421 --with-cxx-main=<compiler>
1422 compile main() and link python executable with C++
1423 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001424 --with-suffix=.exe set executable suffix
1425 --with-pydebug build with Py_DEBUG defined
1426 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001427 --with-system-expat build pyexpat module using an installed expat
1428 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001429 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001430 --with-dbmliborder=db1:db2:...
1431 order to check db backends for dbm. Valid value is a
1432 colon separated string with the backend names
1433 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001434 --with-signal-module disable/enable signal module
1435 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1436 --with(out)-threads[=DIRECTORY]
1437 disable/enable thread support
1438 --with(out)-thread[=DIRECTORY]
1439 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001440 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001441 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001442 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001443 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001444 --with-fpectl enable SIGFPE catching
1445 --with-libm=STRING math library
1446 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001447 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001448 --with(out)-computed-gotos
1449 Use computed gotos in evaluation loop (enabled by
1450 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001451
1452Some influential environment variables:
1453 CC C compiler command
1454 CFLAGS C compiler flags
1455 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1456 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001457 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001458 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001459 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001460 CPP C preprocessor
1461
1462Use these variables to override the choices made by `configure' or to help
1463it to find libraries and programs with nonstandard names/locations.
1464
Georg Brandle2e15612009-05-20 18:25:10 +00001465Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001466_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001467ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001468fi
1469
1470if test "$ac_init_help" = "recursive"; then
1471 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001472 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001473 test -d "$ac_dir" ||
1474 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1475 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001476 ac_builddir=.
1477
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001478case "$ac_dir" in
1479.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1480*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001481 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001482 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001483 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001484 case $ac_top_builddir_sub in
1485 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1486 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1487 esac ;;
1488esac
1489ac_abs_top_builddir=$ac_pwd
1490ac_abs_builddir=$ac_pwd$ac_dir_suffix
1491# for backward compatibility:
1492ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001493
1494case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001495 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001496 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001497 ac_top_srcdir=$ac_top_builddir_sub
1498 ac_abs_top_srcdir=$ac_pwd ;;
1499 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001500 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001501 ac_top_srcdir=$srcdir
1502 ac_abs_top_srcdir=$srcdir ;;
1503 *) # Relative name.
1504 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1505 ac_top_srcdir=$ac_top_build_prefix$srcdir
1506 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001507esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001508ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001509
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001510 cd "$ac_dir" || { ac_status=$?; continue; }
1511 # Check for guested configure.
1512 if test -f "$ac_srcdir/configure.gnu"; then
1513 echo &&
1514 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1515 elif test -f "$ac_srcdir/configure"; then
1516 echo &&
1517 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001518 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001519 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001520 fi || ac_status=$?
1521 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001522 done
1523fi
1524
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001525test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001526if $ac_init_version; then
1527 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001528python configure 3.2
Gregory P. Smith69140482012-01-16 02:05:55 -08001529generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001530
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001531Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001532This configure script is free software; the Free Software Foundation
1533gives unlimited permission to copy, distribute and modify it.
1534_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001535 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001536fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001537
1538## ------------------------ ##
1539## Autoconf initialization. ##
1540## ------------------------ ##
1541
1542# ac_fn_c_try_compile LINENO
1543# --------------------------
1544# Try to compile conftest.$ac_ext, and return whether this succeeded.
1545ac_fn_c_try_compile ()
1546{
1547 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1548 rm -f conftest.$ac_objext
1549 if { { ac_try="$ac_compile"
1550case "(($ac_try" in
1551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1552 *) ac_try_echo=$ac_try;;
1553esac
1554eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1555$as_echo "$ac_try_echo"; } >&5
1556 (eval "$ac_compile") 2>conftest.err
1557 ac_status=$?
1558 if test -s conftest.err; then
1559 grep -v '^ *+' conftest.err >conftest.er1
1560 cat conftest.er1 >&5
1561 mv -f conftest.er1 conftest.err
1562 fi
1563 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1564 test $ac_status = 0; } && {
1565 test -z "$ac_c_werror_flag" ||
1566 test ! -s conftest.err
1567 } && test -s conftest.$ac_objext; then :
1568 ac_retval=0
1569else
1570 $as_echo "$as_me: failed program was:" >&5
1571sed 's/^/| /' conftest.$ac_ext >&5
1572
1573 ac_retval=1
1574fi
Gregory P. Smith69140482012-01-16 02:05:55 -08001575 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001576 as_fn_set_status $ac_retval
1577
1578} # ac_fn_c_try_compile
1579
Martin v. Löwis48e14d32011-05-09 07:37:45 +02001580# ac_fn_c_try_link LINENO
1581# -----------------------
1582# Try to link conftest.$ac_ext, and return whether this succeeded.
1583ac_fn_c_try_link ()
1584{
1585 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1586 rm -f conftest.$ac_objext conftest$ac_exeext
1587 if { { ac_try="$ac_link"
1588case "(($ac_try" in
1589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1590 *) ac_try_echo=$ac_try;;
1591esac
1592eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1593$as_echo "$ac_try_echo"; } >&5
1594 (eval "$ac_link") 2>conftest.err
1595 ac_status=$?
1596 if test -s conftest.err; then
1597 grep -v '^ *+' conftest.err >conftest.er1
1598 cat conftest.er1 >&5
1599 mv -f conftest.er1 conftest.err
1600 fi
1601 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1602 test $ac_status = 0; } && {
1603 test -z "$ac_c_werror_flag" ||
1604 test ! -s conftest.err
1605 } && test -s conftest$ac_exeext && {
1606 test "$cross_compiling" = yes ||
1607 $as_test_x conftest$ac_exeext
1608 }; then :
1609 ac_retval=0
1610else
1611 $as_echo "$as_me: failed program was:" >&5
1612sed 's/^/| /' conftest.$ac_ext >&5
1613
1614 ac_retval=1
1615fi
1616 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1617 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1618 # interfere with the next link command; also delete a directory that is
1619 # left behind by Apple's compiler. We do this before executing the actions.
1620 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Gregory P. Smith69140482012-01-16 02:05:55 -08001621 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Martin v. Löwis48e14d32011-05-09 07:37:45 +02001622 as_fn_set_status $ac_retval
1623
1624} # ac_fn_c_try_link
1625
Matthias Kloseb9621712010-04-24 17:59:49 +00001626# ac_fn_c_try_cpp LINENO
1627# ----------------------
1628# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1629ac_fn_c_try_cpp ()
1630{
1631 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1632 if { { ac_try="$ac_cpp conftest.$ac_ext"
1633case "(($ac_try" in
1634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1635 *) ac_try_echo=$ac_try;;
1636esac
1637eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1638$as_echo "$ac_try_echo"; } >&5
1639 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1640 ac_status=$?
1641 if test -s conftest.err; then
1642 grep -v '^ *+' conftest.err >conftest.er1
1643 cat conftest.er1 >&5
1644 mv -f conftest.er1 conftest.err
1645 fi
1646 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001647 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001648 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1649 test ! -s conftest.err
1650 }; then :
1651 ac_retval=0
1652else
1653 $as_echo "$as_me: failed program was:" >&5
1654sed 's/^/| /' conftest.$ac_ext >&5
1655
1656 ac_retval=1
1657fi
Gregory P. Smith69140482012-01-16 02:05:55 -08001658 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001659 as_fn_set_status $ac_retval
1660
1661} # ac_fn_c_try_cpp
1662
1663# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1664# -------------------------------------------------------
1665# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1666# the include files in INCLUDES and setting the cache variable VAR
1667# accordingly.
1668ac_fn_c_check_header_mongrel ()
1669{
1670 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Gregory P. Smith69140482012-01-16 02:05:55 -08001671 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1673$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001674if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001675 $as_echo_n "(cached) " >&6
1676fi
1677eval ac_res=\$$3
1678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1679$as_echo "$ac_res" >&6; }
1680else
1681 # Is the header compilable?
1682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1683$as_echo_n "checking $2 usability... " >&6; }
1684cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1685/* end confdefs.h. */
1686$4
1687#include <$2>
1688_ACEOF
1689if ac_fn_c_try_compile "$LINENO"; then :
1690 ac_header_compiler=yes
1691else
1692 ac_header_compiler=no
1693fi
1694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1696$as_echo "$ac_header_compiler" >&6; }
1697
1698# Is the header present?
1699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1700$as_echo_n "checking $2 presence... " >&6; }
1701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1702/* end confdefs.h. */
1703#include <$2>
1704_ACEOF
1705if ac_fn_c_try_cpp "$LINENO"; then :
1706 ac_header_preproc=yes
1707else
1708 ac_header_preproc=no
1709fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001710rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1712$as_echo "$ac_header_preproc" >&6; }
1713
1714# So? What about this header?
1715case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1716 yes:no: )
1717 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1718$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1719 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1720$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1721 ;;
1722 no:yes:* )
1723 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1724$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1725 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1726$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1727 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1728$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1729 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1730$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1731 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1732$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001733( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001734## Report this to http://bugs.python.org/ ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001735## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001736 ) | sed "s/^/$as_me: WARNING: /" >&2
1737 ;;
1738esac
1739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1740$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001741if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001742 $as_echo_n "(cached) " >&6
1743else
1744 eval "$3=\$ac_header_compiler"
1745fi
1746eval ac_res=\$$3
1747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1748$as_echo "$ac_res" >&6; }
1749fi
Gregory P. Smith69140482012-01-16 02:05:55 -08001750 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001751
1752} # ac_fn_c_check_header_mongrel
1753
1754# ac_fn_c_try_run LINENO
1755# ----------------------
1756# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1757# that executables *can* be run.
1758ac_fn_c_try_run ()
1759{
1760 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1761 if { { ac_try="$ac_link"
1762case "(($ac_try" in
1763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1764 *) ac_try_echo=$ac_try;;
1765esac
1766eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1767$as_echo "$ac_try_echo"; } >&5
1768 (eval "$ac_link") 2>&5
1769 ac_status=$?
1770 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1771 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1772 { { case "(($ac_try" in
1773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1774 *) ac_try_echo=$ac_try;;
1775esac
1776eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1777$as_echo "$ac_try_echo"; } >&5
1778 (eval "$ac_try") 2>&5
1779 ac_status=$?
1780 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1781 test $ac_status = 0; }; }; then :
1782 ac_retval=0
1783else
1784 $as_echo "$as_me: program exited with status $ac_status" >&5
1785 $as_echo "$as_me: failed program was:" >&5
1786sed 's/^/| /' conftest.$ac_ext >&5
1787
1788 ac_retval=$ac_status
1789fi
1790 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Gregory P. Smith69140482012-01-16 02:05:55 -08001791 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001792 as_fn_set_status $ac_retval
1793
1794} # ac_fn_c_try_run
1795
1796# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1797# -------------------------------------------------------
1798# Tests whether HEADER exists and can be compiled using the include files in
1799# INCLUDES, setting the cache variable VAR accordingly.
1800ac_fn_c_check_header_compile ()
1801{
1802 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1804$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001805if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001806 $as_echo_n "(cached) " >&6
1807else
1808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1809/* end confdefs.h. */
1810$4
1811#include <$2>
1812_ACEOF
1813if ac_fn_c_try_compile "$LINENO"; then :
1814 eval "$3=yes"
1815else
1816 eval "$3=no"
1817fi
1818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1819fi
1820eval ac_res=\$$3
1821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1822$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001823 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001824
1825} # ac_fn_c_check_header_compile
1826
Matthias Kloseb9621712010-04-24 17:59:49 +00001827# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1828# -------------------------------------------
1829# Tests whether TYPE exists after having included INCLUDES, setting cache
1830# variable VAR accordingly.
1831ac_fn_c_check_type ()
1832{
1833 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1835$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001836if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001837 $as_echo_n "(cached) " >&6
1838else
1839 eval "$3=no"
1840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1841/* end confdefs.h. */
1842$4
1843int
1844main ()
1845{
1846if (sizeof ($2))
1847 return 0;
1848 ;
1849 return 0;
1850}
1851_ACEOF
1852if ac_fn_c_try_compile "$LINENO"; then :
1853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1854/* end confdefs.h. */
1855$4
1856int
1857main ()
1858{
1859if (sizeof (($2)))
1860 return 0;
1861 ;
1862 return 0;
1863}
1864_ACEOF
1865if ac_fn_c_try_compile "$LINENO"; then :
1866
1867else
1868 eval "$3=yes"
1869fi
1870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1871fi
1872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1873fi
1874eval ac_res=\$$3
1875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1876$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001877 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001878
1879} # ac_fn_c_check_type
1880
1881# ac_fn_c_find_uintX_t LINENO BITS VAR
1882# ------------------------------------
1883# Finds an unsigned integer type with width BITS, setting cache variable VAR
1884# accordingly.
1885ac_fn_c_find_uintX_t ()
1886{
1887 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1889$as_echo_n "checking for uint$2_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001890if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001891 $as_echo_n "(cached) " >&6
1892else
1893 eval "$3=no"
1894 # Order is important - never check a type that is potentially smaller
1895 # than half of the expected target width.
1896 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1897 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1899/* end confdefs.h. */
1900$ac_includes_default
1901int
1902main ()
1903{
1904static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1905test_array [0] = 0
1906
1907 ;
1908 return 0;
1909}
1910_ACEOF
1911if ac_fn_c_try_compile "$LINENO"; then :
1912 case $ac_type in #(
1913 uint$2_t) :
1914 eval "$3=yes" ;; #(
1915 *) :
1916 eval "$3=\$ac_type" ;;
1917esac
1918fi
1919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001920 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001921
1922else
1923 break
1924fi
1925 done
1926fi
1927eval ac_res=\$$3
1928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1929$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001930 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001931
1932} # ac_fn_c_find_uintX_t
1933
1934# ac_fn_c_find_intX_t LINENO BITS VAR
1935# -----------------------------------
1936# Finds a signed integer type with width BITS, setting cache variable VAR
1937# accordingly.
1938ac_fn_c_find_intX_t ()
1939{
1940 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1942$as_echo_n "checking for int$2_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001943if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001944 $as_echo_n "(cached) " >&6
1945else
1946 eval "$3=no"
1947 # Order is important - never check a type that is potentially smaller
1948 # than half of the expected target width.
1949 for ac_type in int$2_t 'int' 'long int' \
1950 'long long int' 'short int' 'signed char'; do
1951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1952/* end confdefs.h. */
1953$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001954 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001955int
1956main ()
1957{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001958static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001959test_array [0] = 0
1960
1961 ;
1962 return 0;
1963}
1964_ACEOF
1965if ac_fn_c_try_compile "$LINENO"; then :
1966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1967/* end confdefs.h. */
1968$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001969 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001970int
1971main ()
1972{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001973static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001974 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1975test_array [0] = 0
1976
1977 ;
1978 return 0;
1979}
1980_ACEOF
1981if ac_fn_c_try_compile "$LINENO"; then :
1982
1983else
1984 case $ac_type in #(
1985 int$2_t) :
1986 eval "$3=yes" ;; #(
1987 *) :
1988 eval "$3=\$ac_type" ;;
1989esac
1990fi
1991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1992fi
1993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001994 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001995
1996else
1997 break
1998fi
1999 done
2000fi
2001eval ac_res=\$$3
2002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2003$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002004 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002005
2006} # ac_fn_c_find_intX_t
2007
2008# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2009# --------------------------------------------
2010# Tries to find the compile-time value of EXPR in a program that includes
2011# INCLUDES, setting VAR accordingly. Returns whether the value could be
2012# computed
2013ac_fn_c_compute_int ()
2014{
2015 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2016 if test "$cross_compiling" = yes; then
2017 # Depending upon the size, compute the lo and hi bounds.
2018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2019/* end confdefs.h. */
2020$4
2021int
2022main ()
2023{
2024static int test_array [1 - 2 * !(($2) >= 0)];
2025test_array [0] = 0
2026
2027 ;
2028 return 0;
2029}
2030_ACEOF
2031if ac_fn_c_try_compile "$LINENO"; then :
2032 ac_lo=0 ac_mid=0
2033 while :; do
2034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2035/* end confdefs.h. */
2036$4
2037int
2038main ()
2039{
2040static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2041test_array [0] = 0
2042
2043 ;
2044 return 0;
2045}
2046_ACEOF
2047if ac_fn_c_try_compile "$LINENO"; then :
2048 ac_hi=$ac_mid; break
2049else
2050 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2051 if test $ac_lo -le $ac_mid; then
2052 ac_lo= ac_hi=
2053 break
2054 fi
2055 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2056fi
2057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2058 done
2059else
2060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2061/* end confdefs.h. */
2062$4
2063int
2064main ()
2065{
2066static int test_array [1 - 2 * !(($2) < 0)];
2067test_array [0] = 0
2068
2069 ;
2070 return 0;
2071}
2072_ACEOF
2073if ac_fn_c_try_compile "$LINENO"; then :
2074 ac_hi=-1 ac_mid=-1
2075 while :; do
2076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2077/* end confdefs.h. */
2078$4
2079int
2080main ()
2081{
2082static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2083test_array [0] = 0
2084
2085 ;
2086 return 0;
2087}
2088_ACEOF
2089if ac_fn_c_try_compile "$LINENO"; then :
2090 ac_lo=$ac_mid; break
2091else
2092 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2093 if test $ac_mid -le $ac_hi; then
2094 ac_lo= ac_hi=
2095 break
2096 fi
2097 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2098fi
2099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2100 done
2101else
2102 ac_lo= ac_hi=
2103fi
2104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2105fi
2106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2107# Binary search between lo and hi bounds.
2108while test "x$ac_lo" != "x$ac_hi"; do
2109 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2111/* end confdefs.h. */
2112$4
2113int
2114main ()
2115{
2116static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2117test_array [0] = 0
2118
2119 ;
2120 return 0;
2121}
2122_ACEOF
2123if ac_fn_c_try_compile "$LINENO"; then :
2124 ac_hi=$ac_mid
2125else
2126 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2127fi
2128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2129done
2130case $ac_lo in #((
2131?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2132'') ac_retval=1 ;;
2133esac
2134 else
2135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2136/* end confdefs.h. */
2137$4
2138static long int longval () { return $2; }
2139static unsigned long int ulongval () { return $2; }
2140#include <stdio.h>
2141#include <stdlib.h>
2142int
2143main ()
2144{
2145
2146 FILE *f = fopen ("conftest.val", "w");
2147 if (! f)
2148 return 1;
2149 if (($2) < 0)
2150 {
2151 long int i = longval ();
2152 if (i != ($2))
2153 return 1;
2154 fprintf (f, "%ld", i);
2155 }
2156 else
2157 {
2158 unsigned long int i = ulongval ();
2159 if (i != ($2))
2160 return 1;
2161 fprintf (f, "%lu", i);
2162 }
2163 /* Do not output a trailing newline, as this causes \r\n confusion
2164 on some platforms. */
2165 return ferror (f) || fclose (f) != 0;
2166
2167 ;
2168 return 0;
2169}
2170_ACEOF
2171if ac_fn_c_try_run "$LINENO"; then :
2172 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2173else
2174 ac_retval=1
2175fi
2176rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2177 conftest.$ac_objext conftest.beam conftest.$ac_ext
2178rm -f conftest.val
2179
2180 fi
Gregory P. Smith69140482012-01-16 02:05:55 -08002181 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002182 as_fn_set_status $ac_retval
2183
2184} # ac_fn_c_compute_int
2185
2186# ac_fn_c_check_func LINENO FUNC VAR
2187# ----------------------------------
2188# Tests whether FUNC exists, setting the cache variable VAR accordingly
2189ac_fn_c_check_func ()
2190{
2191 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2193$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002194if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002195 $as_echo_n "(cached) " >&6
2196else
2197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2198/* end confdefs.h. */
2199/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2200 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2201#define $2 innocuous_$2
2202
2203/* System header to define __stub macros and hopefully few prototypes,
2204 which can conflict with char $2 (); below.
2205 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2206 <limits.h> exists even on freestanding compilers. */
2207
2208#ifdef __STDC__
2209# include <limits.h>
2210#else
2211# include <assert.h>
2212#endif
2213
2214#undef $2
2215
2216/* Override any GCC internal prototype to avoid an error.
2217 Use char because int might match the return type of a GCC
2218 builtin and then its argument prototype would still apply. */
2219#ifdef __cplusplus
2220extern "C"
2221#endif
2222char $2 ();
2223/* The GNU C library defines this for functions which it implements
2224 to always fail with ENOSYS. Some functions are actually named
2225 something starting with __ and the normal name is an alias. */
2226#if defined __stub_$2 || defined __stub___$2
2227choke me
2228#endif
2229
2230int
2231main ()
2232{
2233return $2 ();
2234 ;
2235 return 0;
2236}
2237_ACEOF
2238if ac_fn_c_try_link "$LINENO"; then :
2239 eval "$3=yes"
2240else
2241 eval "$3=no"
2242fi
2243rm -f core conftest.err conftest.$ac_objext \
2244 conftest$ac_exeext conftest.$ac_ext
2245fi
2246eval ac_res=\$$3
2247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2248$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002249 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002250
2251} # ac_fn_c_check_func
2252
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002253# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2254# ---------------------------------------------
2255# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2256# accordingly.
2257ac_fn_c_check_decl ()
2258{
2259 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2260 as_decl_name=`echo $2|sed 's/ *(.*//'`
2261 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2263$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2264if eval \${$3+:} false; then :
2265 $as_echo_n "(cached) " >&6
2266else
2267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2268/* end confdefs.h. */
2269$4
2270int
2271main ()
2272{
2273#ifndef $as_decl_name
2274#ifdef __cplusplus
2275 (void) $as_decl_use;
2276#else
2277 (void) $as_decl_name;
2278#endif
2279#endif
2280
2281 ;
2282 return 0;
2283}
2284_ACEOF
2285if ac_fn_c_try_compile "$LINENO"; then :
2286 eval "$3=yes"
2287else
2288 eval "$3=no"
2289fi
2290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2291fi
2292eval ac_res=\$$3
2293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2294$as_echo "$ac_res" >&6; }
2295 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2296
2297} # ac_fn_c_check_decl
2298
Matthias Kloseb9621712010-04-24 17:59:49 +00002299# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2300# ----------------------------------------------------
2301# Tries to find if the field MEMBER exists in type AGGR, after including
2302# INCLUDES, setting cache variable VAR accordingly.
2303ac_fn_c_check_member ()
2304{
2305 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2307$as_echo_n "checking for $2.$3... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002308if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002309 $as_echo_n "(cached) " >&6
2310else
2311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2312/* end confdefs.h. */
2313$5
2314int
2315main ()
2316{
2317static $2 ac_aggr;
2318if (ac_aggr.$3)
2319return 0;
2320 ;
2321 return 0;
2322}
2323_ACEOF
2324if ac_fn_c_try_compile "$LINENO"; then :
2325 eval "$4=yes"
2326else
2327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2328/* end confdefs.h. */
2329$5
2330int
2331main ()
2332{
2333static $2 ac_aggr;
2334if (sizeof ac_aggr.$3)
2335return 0;
2336 ;
2337 return 0;
2338}
2339_ACEOF
2340if ac_fn_c_try_compile "$LINENO"; then :
2341 eval "$4=yes"
2342else
2343 eval "$4=no"
2344fi
2345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2346fi
2347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2348fi
2349eval ac_res=\$$4
2350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2351$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002352 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002353
2354} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002355cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002356This file contains any messages produced by compilers while
2357running configure, to aid debugging if configure makes a mistake.
2358
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002359It was created by python $as_me 3.2, which was
Gregory P. Smith69140482012-01-16 02:05:55 -08002360generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002361
2362 $ $0 $@
2363
2364_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002365exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002366{
2367cat <<_ASUNAME
2368## --------- ##
2369## Platform. ##
2370## --------- ##
2371
2372hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2373uname -m = `(uname -m) 2>/dev/null || echo unknown`
2374uname -r = `(uname -r) 2>/dev/null || echo unknown`
2375uname -s = `(uname -s) 2>/dev/null || echo unknown`
2376uname -v = `(uname -v) 2>/dev/null || echo unknown`
2377
2378/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2379/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2380
2381/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2382/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2383/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002384/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002385/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2386/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2387/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2388
2389_ASUNAME
2390
2391as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2392for as_dir in $PATH
2393do
2394 IFS=$as_save_IFS
2395 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002396 $as_echo "PATH: $as_dir"
2397 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002398IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002399
2400} >&5
2401
2402cat >&5 <<_ACEOF
2403
2404
2405## ----------- ##
2406## Core tests. ##
2407## ----------- ##
2408
2409_ACEOF
2410
2411
2412# Keep a trace of the command line.
2413# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002414# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002415# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002416# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002417ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002418ac_configure_args0=
2419ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002420ac_must_keep_next=false
2421for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002422do
Skip Montanaro6dead952003-09-25 14:50:04 +00002423 for ac_arg
2424 do
2425 case $ac_arg in
2426 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2427 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2428 | -silent | --silent | --silen | --sile | --sil)
2429 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002430 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002431 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 esac
2433 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002434 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002435 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002436 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002437 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002438 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002439 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002440 case $ac_arg in
2441 *=* | --config-cache | -C | -disable-* | --disable-* \
2442 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2443 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2444 | -with-* | --with-* | -without-* | --without-* | --x)
2445 case "$ac_configure_args0 " in
2446 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2447 esac
2448 ;;
2449 -* ) ac_must_keep_next=true ;;
2450 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002451 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002452 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002453 ;;
2454 esac
2455 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002456done
Matthias Kloseb9621712010-04-24 17:59:49 +00002457{ ac_configure_args0=; unset ac_configure_args0;}
2458{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002459
2460# When interrupted or exit'd, cleanup temporary files, and complete
2461# config.log. We remove comments because anyway the quotes in there
2462# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002463# WARNING: Use '\'' to represent an apostrophe within the trap.
2464# 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 +00002465trap 'exit_status=$?
2466 # Save into config.log some information that might help in debugging.
2467 {
2468 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002469
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002470 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002471## Cache variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002472## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002473 echo
2474 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475(
2476 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2477 eval ac_val=\$$ac_var
2478 case $ac_val in #(
2479 *${as_nl}*)
2480 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002481 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2482$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483 esac
2484 case $ac_var in #(
2485 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002486 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2487 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488 esac ;;
2489 esac
2490 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002491 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002492 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2493 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002494 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495 "s/'\''/'\''\\\\'\'''\''/g;
2496 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2497 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002498 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002499 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002500 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501 esac |
2502 sort
2503)
Martin v. Löwis11437992002-04-12 09:54:03 +00002504 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002505
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002506 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002507## Output variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002508## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002509 echo
2510 for ac_var in $ac_subst_vars
2511 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512 eval ac_val=\$$ac_var
2513 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002514 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002516 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 done | sort
2518 echo
2519
2520 if test -n "$ac_subst_files"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002521 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522## File substitutions. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002523## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002524 echo
2525 for ac_var in $ac_subst_files
2526 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527 eval ac_val=\$$ac_var
2528 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002529 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002531 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002532 done | sort
2533 echo
2534 fi
2535
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 if test -s confdefs.h; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002537 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002538## confdefs.h. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002539## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002542 echo
2543 fi
2544 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002545 $as_echo "$as_me: caught signal $ac_signal"
2546 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002547 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002548 rm -f core *.core core.conftest.* &&
2549 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002550 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002551' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002552for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002553 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002554done
2555ac_signal=0
2556
2557# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002558rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002559
Matthias Kloseb9621712010-04-24 17:59:49 +00002560$as_echo "/* confdefs.h */" > confdefs.h
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562# Predefined preprocessor variables.
2563
2564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_NAME "$PACKAGE_NAME"
2566_ACEOF
2567
Martin v. Löwis11437992002-04-12 09:54:03 +00002568cat >>confdefs.h <<_ACEOF
2569#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2570_ACEOF
2571
Martin v. Löwis11437992002-04-12 09:54:03 +00002572cat >>confdefs.h <<_ACEOF
2573#define PACKAGE_VERSION "$PACKAGE_VERSION"
2574_ACEOF
2575
Martin v. Löwis11437992002-04-12 09:54:03 +00002576cat >>confdefs.h <<_ACEOF
2577#define PACKAGE_STRING "$PACKAGE_STRING"
2578_ACEOF
2579
Martin v. Löwis11437992002-04-12 09:54:03 +00002580cat >>confdefs.h <<_ACEOF
2581#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2582_ACEOF
2583
Matthias Kloseb9621712010-04-24 17:59:49 +00002584cat >>confdefs.h <<_ACEOF
2585#define PACKAGE_URL "$PACKAGE_URL"
2586_ACEOF
2587
Martin v. Löwis11437992002-04-12 09:54:03 +00002588
2589# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002590# Prefer an explicitly selected file to automatically selected ones.
2591ac_site_file1=NONE
2592ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593if test -n "$CONFIG_SITE"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002594 # We do not want a PATH search for config.site.
2595 case $CONFIG_SITE in #((
2596 -*) ac_site_file1=./$CONFIG_SITE;;
2597 */*) ac_site_file1=$CONFIG_SITE;;
2598 *) ac_site_file1=./$CONFIG_SITE;;
2599 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002600elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002601 ac_site_file1=$prefix/share/config.site
2602 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603else
Matthias Kloseb9621712010-04-24 17:59:49 +00002604 ac_site_file1=$ac_default_prefix/share/config.site
2605 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002606fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002607for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002608do
Matthias Kloseb9621712010-04-24 17:59:49 +00002609 test "x$ac_site_file" = xNONE && continue
2610 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2611 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2612$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 sed 's/^/| /' "$ac_site_file" >&5
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002614 . "$ac_site_file" \
2615 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2616$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2617as_fn_error $? "failed to load site script $ac_site_file
Gregory P. Smith69140482012-01-16 02:05:55 -08002618See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002619 fi
2620done
2621
2622if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002623 # Some versions of bash will fail to source /dev/null (special files
2624 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2625 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2626 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2627$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002629 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2630 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 esac
2632 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002633else
Matthias Kloseb9621712010-04-24 17:59:49 +00002634 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2635$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 >$cache_file
2637fi
2638
2639# Check that the precious variables saved in the cache have kept the same
2640# value.
2641ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002642for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002643 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2644 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002645 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2646 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002647 case $ac_old_set,$ac_new_set in
2648 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002649 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2650$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 +00002651 ac_cache_corrupted=: ;;
2652 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002653 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2654$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002655 ac_cache_corrupted=: ;;
2656 ,);;
2657 *)
2658 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002659 # differences in whitespace do not lead to failure.
2660 ac_old_val_w=`echo x $ac_old_val`
2661 ac_new_val_w=`echo x $ac_new_val`
2662 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2663 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2664$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2665 ac_cache_corrupted=:
2666 else
2667 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2668$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2669 eval $ac_var=\$ac_old_val
2670 fi
2671 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2672$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2673 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2674$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002675 fi;;
2676 esac
2677 # Pass precious variables to config.status.
2678 if test "$ac_new_set" = set; then
2679 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002680 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 *) ac_arg=$ac_var=$ac_new_val ;;
2682 esac
2683 case " $ac_configure_args " in
2684 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002685 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002686 esac
2687 fi
2688done
2689if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002690 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2691$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2692 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2693$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002694 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002696## -------------------- ##
2697## Main body of script. ##
2698## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002699
Guido van Rossum7f43da71994-08-01 12:15:30 +00002700ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002701ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002702ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2703ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2704ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002705
Guido van Rossum627b2d71993-12-24 10:39:16 +00002706
Michael W. Hudson54241132001-12-07 15:38:26 +00002707
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002708ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002709
2710
Martin v. Löwis11437992002-04-12 09:54:03 +00002711
Benjamin Petersond23f8222009-04-05 19:13:16 +00002712if test "$prefix" != "/"; then
2713 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2714fi
2715
2716
Martin v. Löwis11437992002-04-12 09:54:03 +00002717
2718
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002719# We don't use PACKAGE_ variables, and they cause conflicts
2720# with other autoconf-based packages that include Python.h
2721grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2722rm confdefs.h
2723mv confdefs.h.new confdefs.h
2724
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002725
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002726VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002727
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002728# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002729
2730SOVERSION=1.0
2731
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002732# The later defininition of _XOPEN_SOURCE disables certain features
2733# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2734
Matthias Kloseb9621712010-04-24 17:59:49 +00002735$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002736
2737
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002738# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2739# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2740# them.
2741
Matthias Kloseb9621712010-04-24 17:59:49 +00002742$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002743
2744
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002745# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2746# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2747# them.
2748
Matthias Kloseb9621712010-04-24 17:59:49 +00002749$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002750
2751
Martin v. Löwisd6320502004-08-12 13:45:08 +00002752# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2753# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2754
Matthias Kloseb9621712010-04-24 17:59:49 +00002755$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002756
2757
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002758# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2759# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2760# them.
2761
Matthias Kloseb9621712010-04-24 17:59:49 +00002762$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002763
2764
2765
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002766define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002767
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002768# Arguments passed to configure.
2769
2770CONFIG_ARGS="$ac_configure_args"
2771
Matthias Kloseb9621712010-04-24 17:59:49 +00002772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2773$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002774# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002775if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002776 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002777 case $enableval in
2778 yes)
2779 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002780 if test ! -d "${enableval}"
2781 then
2782 enableval=/
2783 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002784 ;;
2785 esac
2786 case $enableval in
2787 no)
2788 UNIVERSALSDK=
2789 enable_universalsdk=
2790 ;;
2791 *)
2792 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002793 if test ! -d "${UNIVERSALSDK}"
2794 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002795 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002796 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002797 ;;
2798 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002799
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002800
Thomas Wouters477c8d52006-05-27 19:21:47 +00002801else
2802
2803 UNIVERSALSDK=
2804 enable_universalsdk=
2805
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002806fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002807
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002808if test -n "${UNIVERSALSDK}"
2809then
Matthias Kloseb9621712010-04-24 17:59:49 +00002810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2811$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002812else
Matthias Kloseb9621712010-04-24 17:59:49 +00002813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2814$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002815fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002816
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002817
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002818
2819
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002820UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002821
Matthias Kloseb9621712010-04-24 17:59:49 +00002822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2823$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002824
2825# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002826if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002827 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2829$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002830 UNIVERSAL_ARCHS="$withval"
2831
2832else
2833
Matthias Kloseb9621712010-04-24 17:59:49 +00002834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2835$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002836
2837fi
2838
2839
2840
2841
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002842
2843# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002844if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002845 withval=$with_framework_name;
2846 PYTHONFRAMEWORK=${withval}
2847 PYTHONFRAMEWORKDIR=${withval}.framework
2848 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2849
2850else
2851
2852 PYTHONFRAMEWORK=Python
2853 PYTHONFRAMEWORKDIR=Python.framework
2854 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2855
2856fi
2857
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002858# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002859if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002860 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002861 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002862 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002863 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002864 esac
2865 case $enableval in
2866 no)
2867 PYTHONFRAMEWORK=
2868 PYTHONFRAMEWORKDIR=no-framework
2869 PYTHONFRAMEWORKPREFIX=
2870 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002871 FRAMEWORKINSTALLFIRST=
2872 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002873 FRAMEWORKALTINSTALLFIRST=
2874 FRAMEWORKALTINSTALLLAST=
2875 if test "x${prefix}" = "xNONE"; then
2876 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2877 else
2878 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2879 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002880 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002881 ;;
2882 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002883 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002884 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002885 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002886 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002887 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2888 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002889 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002890
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002891 if test "x${prefix}" = "xNONE" ; then
2892 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002893
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002894 else
2895 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2896 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002897
2898 case "${enableval}" in
2899 /System*)
2900 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2901 if test "${prefix}" = "NONE" ; then
2902 # See below
2903 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2904 fi
2905 ;;
2906
2907 /Library*)
2908 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2909 ;;
2910
2911 */Library/Frameworks)
2912 MDIR="`dirname "${enableval}"`"
2913 MDIR="`dirname "${MDIR}"`"
2914 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2915
2916 if test "${prefix}" = "NONE"; then
2917 # User hasn't specified the
2918 # --prefix option, but wants to install
2919 # the framework in a non-default location,
2920 # ensure that the compatibility links get
2921 # installed relative to that prefix as well
2922 # instead of in /usr/local.
2923 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2924 fi
2925 ;;
2926
2927 *)
2928 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2929 ;;
2930 esac
2931
Jack Jansen127e56e2001-09-11 14:41:54 +00002932 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002933
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002934 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002935 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002936 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002937
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002938 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002939
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002940 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2941
2942 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2943
Jack Jansene578a632001-08-15 01:27:14 +00002944 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002945
Guido van Rossum563e7081996-09-10 18:20:48 +00002946else
Martin v. Löwis11437992002-04-12 09:54:03 +00002947
Jack Jansene578a632001-08-15 01:27:14 +00002948 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002949 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002950 PYTHONFRAMEWORKPREFIX=
2951 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002952 FRAMEWORKINSTALLFIRST=
2953 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002954 FRAMEWORKALTINSTALLFIRST=
2955 FRAMEWORKALTINSTALLLAST=
2956 if test "x${prefix}" = "xNONE" ; then
2957 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2958 else
2959 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2960 fi
Jack Jansene578a632001-08-15 01:27:14 +00002961 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002962
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002963
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002964fi
2965
Thomas Wouters477c8d52006-05-27 19:21:47 +00002966
2967
Michael W. Hudson54241132001-12-07 15:38:26 +00002968
2969
2970
2971
Jack Jansene578a632001-08-15 01:27:14 +00002972
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002973
2974
2975
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002976
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002977
Jack Jansene578a632001-08-15 01:27:14 +00002978##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002979## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002980## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002981##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002982# Set name for machine-dependent library files
2983
Matthias Kloseb9621712010-04-24 17:59:49 +00002984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2985$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002986if test -z "$MACHDEP"
2987then
Guido van Rossum563e7081996-09-10 18:20:48 +00002988 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002989 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002990 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002991 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002992 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002993 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002994 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002995 ac_md_system=`echo $ac_sys_system |
2996 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2997 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002998 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002999 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003000
Guido van Rossum07397971997-04-29 21:49:50 +00003001 case $MACHDEP in
Victor Stinner0c17d0d2011-08-20 14:01:05 +02003002 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003003 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003004 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003005 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003006 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003007 esac
3008fi
Guido van Rossum91922671997-10-09 20:24:13 +00003009
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003010# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3011# disable features if it is defined, without any means to access these
3012# features as extensions. For these systems, we skip the definition of
3013# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3014# some feature, make sure there is no alternative way to access this
3015# feature. Also, when using wildcards, make sure you have verified the
3016# need for not defining _XOPEN_SOURCE on all systems matching the
3017# wildcard, and that the wildcard does not include future systems
3018# (which may remove their limitations).
3019case $ac_sys_system/$ac_sys_release in
3020 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3021 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003022 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003023 # In addition, Stefan Krah confirms that issue #1244610 exists through
3024 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003025 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003026 define_xopen_source=no
3027 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3028 # also defined. This can be overridden by defining _BSD_SOURCE
3029 # As this has a different meaning on Linux, only define it on OpenBSD
3030
Matthias Kloseb9621712010-04-24 17:59:49 +00003031$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003032
3033 ;;
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003034 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003035 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3036 # also defined. This can be overridden by defining _BSD_SOURCE
3037 # As this has a different meaning on Linux, only define it on OpenBSD
3038
Matthias Kloseb9621712010-04-24 17:59:49 +00003039$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003040
3041 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003042 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3043 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3044 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003045 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 +00003046 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003047 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3048 # request to enable features supported by the standard as a request
3049 # to disable features not supported by the standard. The best way
3050 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3051 # entirely and define __EXTENSIONS__ instead.
3052 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003053 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003054 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3055 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003056 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003057 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003058 define_xopen_source=no;;
3059 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003060 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003061 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003062 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003063 # On FreeBSD 4, the math functions C89 does not cover are never defined
3064 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3065 FreeBSD/4.*)
3066 define_xopen_source=no;;
3067 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3068 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3069 # identifies itself as Darwin/7.*
3070 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3071 # disables platform specific features beyond repair.
3072 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3073 # has no effect, don't bother defining them
3074 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003075 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003076 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003077 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003078 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3079 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3080 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003081 AIX/4)
3082 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003083 AIX/5)
3084 if test `uname -r` -eq 1; then
3085 define_xopen_source=no
3086 fi
3087 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003088 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3089 # defining NI_NUMERICHOST.
3090 QNX/6.3.2)
3091 define_xopen_source=no
3092 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003093
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003094esac
3095
3096if test $define_xopen_source = yes
3097then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003098
Matthias Kloseb9621712010-04-24 17:59:49 +00003099$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003100
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003101
3102 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3103 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3104 # several APIs are not declared. Since this is also needed in some
3105 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003106
Matthias Kloseb9621712010-04-24 17:59:49 +00003107$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003108
3109
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003110
Matthias Kloseb9621712010-04-24 17:59:49 +00003111$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003112
3113
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003114fi
3115
Guido van Rossum91922671997-10-09 20:24:13 +00003116#
3117# SGI compilers allow the specification of the both the ABI and the
3118# ISA on the command line. Depending on the values of these switches,
3119# different and often incompatable code will be generated.
3120#
3121# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3122# thus supply support for various ABI/ISA combinations. The MACHDEP
3123# variable is also adjusted.
3124#
3125
3126if test ! -z "$SGI_ABI"
3127then
3128 CC="cc $SGI_ABI"
3129 LDFLAGS="$SGI_ABI $LDFLAGS"
3130 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3131fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3133$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003134
Jack Jansen6b08a402004-06-03 12:41:45 +00003135# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3136# it may influence the way we can build extensions, so distutils
3137# needs to check it
3138
Thomas Wouters477c8d52006-05-27 19:21:47 +00003139
Jack Jansen6b08a402004-06-03 12:41:45 +00003140CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003141EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003142
Matthias Kloseb9621712010-04-24 17:59:49 +00003143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3144$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003145ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3147$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003148
Guido van Rossum627b2d71993-12-24 10:39:16 +00003149# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003150
3151# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3152# for debug/optimization stuff. BASECFLAGS is for flags that are required
3153# just to get things to compile and link. Users are free to override OPT
3154# when running configure or make. The build should not break if they do.
3155# BASECFLAGS should generally not be messed with, however.
3156
3157# XXX shouldn't some/most/all of this code be merged with the stuff later
3158# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3160$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003161
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003162# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003163if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003164 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003165 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003166 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003167 without_gcc=yes;;
3168 yes) CC=gcc
3169 without_gcc=no;;
3170 *) CC=$withval
3171 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003172 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003173else
Martin v. Löwis11437992002-04-12 09:54:03 +00003174
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003175 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003176 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003177 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003178 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003179 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003180fi
3181
Matthias Kloseb9621712010-04-24 17:59:49 +00003182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3183$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003184
Guido van Rossum8b131c51995-03-09 14:10:13 +00003185# If the user switches compilers, we can't believe the cache
3186if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3187then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003188 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003189(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003190fi
3191
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003192# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3193# when the compiler supports them, but we don't always want -O2, and
3194# we set -g later.
3195if test -z "$CFLAGS"; then
3196 CFLAGS=
3197fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003198ac_ext=c
3199ac_cpp='$CPP $CPPFLAGS'
3200ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3201ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3202ac_compiler_gnu=$ac_cv_c_compiler_gnu
3203if test -n "$ac_tool_prefix"; then
3204 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3205set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3207$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003208if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003209 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003210else
3211 if test -n "$CC"; then
3212 ac_cv_prog_CC="$CC" # Let the user override the test.
3213else
Martin v. Löwis11437992002-04-12 09:54:03 +00003214as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3215for as_dir in $PATH
3216do
3217 IFS=$as_save_IFS
3218 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003219 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003220 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 +00003221 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003222 $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 +00003223 break 2
3224 fi
3225done
Matthias Kloseb9621712010-04-24 17:59:49 +00003226 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003227IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003228
Jack Jansendd19cf82001-12-06 22:36:17 +00003229fi
3230fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003231CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003232if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3234$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003235else
Matthias Kloseb9621712010-04-24 17:59:49 +00003236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3237$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003238fi
3239
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003240
Martin v. Löwis11437992002-04-12 09:54:03 +00003241fi
3242if test -z "$ac_cv_prog_CC"; then
3243 ac_ct_CC=$CC
3244 # Extract the first word of "gcc", so it can be a program name with args.
3245set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3247$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003248if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003249 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003250else
3251 if test -n "$ac_ct_CC"; then
3252 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3253else
3254as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3255for as_dir in $PATH
3256do
3257 IFS=$as_save_IFS
3258 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003259 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003260 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 +00003261 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003262 $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 +00003263 break 2
3264 fi
3265done
Matthias Kloseb9621712010-04-24 17:59:49 +00003266 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003267IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003268
3269fi
3270fi
3271ac_ct_CC=$ac_cv_prog_ac_ct_CC
3272if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3274$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003275else
Matthias Kloseb9621712010-04-24 17:59:49 +00003276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3277$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003278fi
3279
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003280 if test "x$ac_ct_CC" = x; then
3281 CC=""
3282 else
3283 case $cross_compiling:$ac_tool_warned in
3284yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003285{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3286$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003287ac_tool_warned=yes ;;
3288esac
3289 CC=$ac_ct_CC
3290 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003291else
3292 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003293fi
3294
Jack Jansendd19cf82001-12-06 22:36:17 +00003295if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003296 if test -n "$ac_tool_prefix"; then
3297 # 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 +00003298set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3300$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003301if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003302 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003303else
3304 if test -n "$CC"; then
3305 ac_cv_prog_CC="$CC" # Let the user override the test.
3306else
Martin v. Löwis11437992002-04-12 09:54:03 +00003307as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3308for as_dir in $PATH
3309do
3310 IFS=$as_save_IFS
3311 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003312 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003313 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 +00003314 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003315 $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 +00003316 break 2
3317 fi
3318done
Matthias Kloseb9621712010-04-24 17:59:49 +00003319 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003320IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003321
3322fi
3323fi
3324CC=$ac_cv_prog_CC
3325if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3327$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003328else
Matthias Kloseb9621712010-04-24 17:59:49 +00003329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3330$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003331fi
3332
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003333
Martin v. Löwis11437992002-04-12 09:54:03 +00003334 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003335fi
3336if test -z "$CC"; then
3337 # Extract the first word of "cc", so it can be a program name with args.
3338set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3340$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003341if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003342 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003343else
3344 if test -n "$CC"; then
3345 ac_cv_prog_CC="$CC" # Let the user override the test.
3346else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003347 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003348as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3349for as_dir in $PATH
3350do
3351 IFS=$as_save_IFS
3352 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003353 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003354 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003355 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3356 ac_prog_rejected=yes
3357 continue
3358 fi
3359 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003360 $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 +00003361 break 2
3362 fi
3363done
Matthias Kloseb9621712010-04-24 17:59:49 +00003364 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003365IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003366
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003367if test $ac_prog_rejected = yes; then
3368 # We found a bogon in the path, so make sure we never use it.
3369 set dummy $ac_cv_prog_CC
3370 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003371 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003372 # We chose a different compiler from the bogus one.
3373 # However, it has the same basename, so the bogon will be chosen
3374 # first if we set CC to just the basename; use the full file name.
3375 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003376 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003377 fi
3378fi
3379fi
3380fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003381CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003382if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3384$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003385else
Matthias Kloseb9621712010-04-24 17:59:49 +00003386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3387$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003388fi
3389
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003390
Martin v. Löwis11437992002-04-12 09:54:03 +00003391fi
3392if test -z "$CC"; then
3393 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003394 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003395 do
3396 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3397set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3399$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003400if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003401 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003402else
3403 if test -n "$CC"; then
3404 ac_cv_prog_CC="$CC" # Let the user override the test.
3405else
Martin v. Löwis11437992002-04-12 09:54:03 +00003406as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3407for as_dir in $PATH
3408do
3409 IFS=$as_save_IFS
3410 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003411 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003412 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 +00003413 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003414 $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 +00003415 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003416 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003417done
Matthias Kloseb9621712010-04-24 17:59:49 +00003418 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003419IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003420
3421fi
3422fi
3423CC=$ac_cv_prog_CC
3424if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3426$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003427else
Matthias Kloseb9621712010-04-24 17:59:49 +00003428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3429$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003430fi
3431
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003432
Martin v. Löwis11437992002-04-12 09:54:03 +00003433 test -n "$CC" && break
3434 done
3435fi
3436if test -z "$CC"; then
3437 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003438 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003439do
3440 # Extract the first word of "$ac_prog", so it can be a program name with args.
3441set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3443$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003444if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003445 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003446else
3447 if test -n "$ac_ct_CC"; then
3448 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3449else
3450as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3451for as_dir in $PATH
3452do
3453 IFS=$as_save_IFS
3454 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003455 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003456 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 +00003457 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003458 $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 +00003459 break 2
3460 fi
3461done
Matthias Kloseb9621712010-04-24 17:59:49 +00003462 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003463IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003464
Martin v. Löwis11437992002-04-12 09:54:03 +00003465fi
3466fi
3467ac_ct_CC=$ac_cv_prog_ac_ct_CC
3468if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3470$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003471else
Matthias Kloseb9621712010-04-24 17:59:49 +00003472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3473$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003474fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003475
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003476
Martin v. Löwis11437992002-04-12 09:54:03 +00003477 test -n "$ac_ct_CC" && break
3478done
Michael W. Hudson54241132001-12-07 15:38:26 +00003479
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003480 if test "x$ac_ct_CC" = x; then
3481 CC=""
3482 else
3483 case $cross_compiling:$ac_tool_warned in
3484yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003485{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3486$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003487ac_tool_warned=yes ;;
3488esac
3489 CC=$ac_ct_CC
3490 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003491fi
3492
3493fi
3494
3495
Matthias Kloseb9621712010-04-24 17:59:49 +00003496test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3497$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003498as_fn_error $? "no acceptable C compiler found in \$PATH
Gregory P. Smith69140482012-01-16 02:05:55 -08003499See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003500
3501# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003502$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3503set X $ac_compile
3504ac_compiler=$2
3505for ac_option in --version -v -V -qversion; do
3506 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003507case "(($ac_try" in
3508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3509 *) ac_try_echo=$ac_try;;
3510esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003511eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3512$as_echo "$ac_try_echo"; } >&5
3513 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003514 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003515 if test -s conftest.err; then
3516 sed '10a\
3517... rest of stderr output deleted ...
3518 10q' conftest.err >conftest.er1
3519 cat conftest.er1 >&5
3520 fi
3521 rm -f conftest.er1 conftest.err
3522 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3523 test $ac_status = 0; }
3524done
Martin v. Löwis11437992002-04-12 09:54:03 +00003525
Matthias Kloseb9621712010-04-24 17:59:49 +00003526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003527/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003528
Martin v. Löwis11437992002-04-12 09:54:03 +00003529int
3530main ()
3531{
3532
3533 ;
3534 return 0;
3535}
3536_ACEOF
3537ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003538ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003539# Try to create an executable without -o first, disregard a.out.
3540# It will help us diagnose broken compilers, and finding out an intuition
3541# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3543$as_echo_n "checking whether the C compiler works... " >&6; }
3544ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3545
3546# The possible output files:
3547ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3548
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003549ac_rmfiles=
3550for ac_file in $ac_files
3551do
3552 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003553 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003554 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3555 esac
3556done
3557rm -f $ac_rmfiles
3558
Matthias Kloseb9621712010-04-24 17:59:49 +00003559if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003560case "(($ac_try" in
3561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3562 *) ac_try_echo=$ac_try;;
3563esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003564eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3565$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003566 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003567 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003568 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3569 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003570 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3571# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3572# in a Makefile. We should not override ac_cv_exeext if it was cached,
3573# so that the user can short-circuit this test for compilers unknown to
3574# Autoconf.
3575for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003576do
3577 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003578 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003579 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003580 ;;
3581 [ab].out )
3582 # We found the default executable, but exeext='' is most
3583 # certainly right.
3584 break;;
3585 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003586 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003587 then :; else
3588 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3589 fi
3590 # We set ac_cv_exeext here because the later test for it is not
3591 # safe: cross compilers may not add the suffix if given an `-o'
3592 # argument, so we may need to know it at that point already.
3593 # Even if this section looks crufty: it has the advantage of
3594 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003595 break;;
3596 * )
3597 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003598 esac
3599done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003600test "$ac_cv_exeext" = no && ac_cv_exeext=
3601
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003602else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003603 ac_file=''
3604fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003605if test -z "$ac_file"; then :
3606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3607$as_echo "no" >&6; }
3608$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003609sed 's/^/| /' conftest.$ac_ext >&5
3610
Matthias Kloseb9621712010-04-24 17:59:49 +00003611{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3612$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003613as_fn_error 77 "C compiler cannot create executables
Gregory P. Smith69140482012-01-16 02:05:55 -08003614See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003615else
3616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3617$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003618fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3620$as_echo_n "checking for C compiler default output file name... " >&6; }
3621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3622$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003623ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003624
Matthias Kloseb9621712010-04-24 17:59:49 +00003625rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003626ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3628$as_echo_n "checking for suffix of executables... " >&6; }
3629if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003630case "(($ac_try" in
3631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3632 *) ac_try_echo=$ac_try;;
3633esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003634eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3635$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003636 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003637 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3639 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003640 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3641# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3642# work properly (i.e., refer to `conftest.exe'), while it won't with
3643# `rm'.
3644for ac_file in conftest.exe conftest conftest.*; do
3645 test -f "$ac_file" || continue
3646 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003647 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003648 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3649 break;;
3650 * ) break;;
3651 esac
3652done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003653else
Matthias Kloseb9621712010-04-24 17:59:49 +00003654 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3655$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003656as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Gregory P. Smith69140482012-01-16 02:05:55 -08003657See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003658fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003659rm -f conftest conftest$ac_cv_exeext
3660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3661$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003662
3663rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003664EXEEXT=$ac_cv_exeext
3665ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3667/* end confdefs.h. */
3668#include <stdio.h>
3669int
3670main ()
3671{
3672FILE *f = fopen ("conftest.out", "w");
3673 return ferror (f) || fclose (f) != 0;
3674
3675 ;
3676 return 0;
3677}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003679ac_clean_files="$ac_clean_files conftest.out"
3680# Check that the compiler produces executables we can run. If not, either
3681# the compiler is broken, or we cross compile.
3682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3683$as_echo_n "checking whether we are cross compiling... " >&6; }
3684if test "$cross_compiling" != yes; then
3685 { { ac_try="$ac_link"
3686case "(($ac_try" in
3687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3688 *) ac_try_echo=$ac_try;;
3689esac
3690eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3691$as_echo "$ac_try_echo"; } >&5
3692 (eval "$ac_link") 2>&5
3693 ac_status=$?
3694 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3695 test $ac_status = 0; }
3696 if { ac_try='./conftest$ac_cv_exeext'
3697 { { case "(($ac_try" in
3698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3699 *) ac_try_echo=$ac_try;;
3700esac
3701eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3702$as_echo "$ac_try_echo"; } >&5
3703 (eval "$ac_try") 2>&5
3704 ac_status=$?
3705 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3706 test $ac_status = 0; }; }; then
3707 cross_compiling=no
3708 else
3709 if test "$cross_compiling" = maybe; then
3710 cross_compiling=yes
3711 else
3712 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3713$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003714as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003715If you meant to cross compile, use \`--host'.
Gregory P. Smith69140482012-01-16 02:05:55 -08003716See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 fi
3718 fi
3719fi
3720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3721$as_echo "$cross_compiling" >&6; }
3722
3723rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3724ac_clean_files=$ac_clean_files_save
3725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3726$as_echo_n "checking for suffix of object files... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003727if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003728 $as_echo_n "(cached) " >&6
3729else
3730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003731/* end confdefs.h. */
3732
3733int
3734main ()
3735{
3736
3737 ;
3738 return 0;
3739}
3740_ACEOF
3741rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003742if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003743case "(($ac_try" in
3744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3745 *) ac_try_echo=$ac_try;;
3746esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003747eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3748$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003749 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003750 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003751 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3752 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003753 for ac_file in conftest.o conftest.obj conftest.*; do
3754 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003755 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003756 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003757 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3758 break;;
3759 esac
3760done
3761else
Matthias Kloseb9621712010-04-24 17:59:49 +00003762 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003763sed 's/^/| /' conftest.$ac_ext >&5
3764
Matthias Kloseb9621712010-04-24 17:59:49 +00003765{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3766$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003767as_fn_error $? "cannot compute suffix of object files: cannot compile
Gregory P. Smith69140482012-01-16 02:05:55 -08003768See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003769fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003770rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003771fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3773$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003774OBJEXT=$ac_cv_objext
3775ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3777$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003778if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003779 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003780else
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003782/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003783
Martin v. Löwis11437992002-04-12 09:54:03 +00003784int
3785main ()
3786{
3787#ifndef __GNUC__
3788 choke me
3789#endif
3790
3791 ;
3792 return 0;
3793}
3794_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003795if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003796 ac_compiler_gnu=yes
3797else
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003799fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003801ac_cv_c_compiler_gnu=$ac_compiler_gnu
3802
3803fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3805$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3806if test $ac_compiler_gnu = yes; then
3807 GCC=yes
3808else
3809 GCC=
3810fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003811ac_test_CFLAGS=${CFLAGS+set}
3812ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3814$as_echo_n "checking whether $CC accepts -g... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003815if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003817else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003818 ac_save_c_werror_flag=$ac_c_werror_flag
3819 ac_c_werror_flag=yes
3820 ac_cv_prog_cc_g=no
3821 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003823/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003824
Martin v. Löwis11437992002-04-12 09:54:03 +00003825int
3826main ()
3827{
3828
3829 ;
3830 return 0;
3831}
3832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003833if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003834 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003835else
Matthias Kloseb9621712010-04-24 17:59:49 +00003836 CFLAGS=""
3837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003838/* end confdefs.h. */
3839
3840int
3841main ()
3842{
3843
3844 ;
3845 return 0;
3846}
3847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003848if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003849
Matthias Kloseb9621712010-04-24 17:59:49 +00003850else
3851 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003852 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003854/* end confdefs.h. */
3855
3856int
3857main ()
3858{
3859
3860 ;
3861 return 0;
3862}
3863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003864if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003865 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003866fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003868fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3872 ac_c_werror_flag=$ac_save_c_werror_flag
3873fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3875$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003876if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003877 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003878elif test $ac_cv_prog_cc_g = yes; then
3879 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003880 CFLAGS="-g -O2"
3881 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003882 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003883 fi
3884else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003885 if test "$GCC" = yes; then
3886 CFLAGS="-O2"
3887 else
3888 CFLAGS=
3889 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003890fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3892$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003893if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003894 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003895else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003896 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003897ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003899/* end confdefs.h. */
3900#include <stdarg.h>
3901#include <stdio.h>
3902#include <sys/types.h>
3903#include <sys/stat.h>
3904/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3905struct buf { int x; };
3906FILE * (*rcsopen) (struct buf *, struct stat *, int);
3907static char *e (p, i)
3908 char **p;
3909 int i;
3910{
3911 return p[i];
3912}
3913static char *f (char * (*g) (char **, int), char **p, ...)
3914{
3915 char *s;
3916 va_list v;
3917 va_start (v,p);
3918 s = g (p, va_arg (v,int));
3919 va_end (v);
3920 return s;
3921}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003922
3923/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3924 function prototypes and stuff, but not '\xHH' hex character constants.
3925 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003926 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003927 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3928 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003929 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003930int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3931
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003932/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3933 inside strings and character constants. */
3934#define FOO(x) 'x'
3935int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3936
Skip Montanaro6dead952003-09-25 14:50:04 +00003937int test (int i, double x);
3938struct s1 {int (*f) (int a);};
3939struct s2 {int (*f) (double a);};
3940int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3941int argc;
3942char **argv;
3943int
3944main ()
3945{
3946return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3947 ;
3948 return 0;
3949}
3950_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3952 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003953do
3954 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003955 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003956 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003957fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003958rm -f core conftest.err conftest.$ac_objext
3959 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003960done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003961rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003962CC=$ac_save_CC
3963
3964fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003965# AC_CACHE_VAL
3966case "x$ac_cv_prog_cc_c89" in
3967 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3969$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003970 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3972$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003973 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003974 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3976$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003977esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003978if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003979
Matthias Kloseb9621712010-04-24 17:59:49 +00003980fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003981
Martin v. Löwis11437992002-04-12 09:54:03 +00003982ac_ext=c
3983ac_cpp='$CPP $CPPFLAGS'
3984ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3985ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3986ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003987
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003988
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003989
3990
Matthias Kloseb9621712010-04-24 17:59:49 +00003991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3992$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003993
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003994# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003995if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003996 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003997
3998 case $withval in
3999 no) with_cxx_main=no
4000 MAINCC='$(CC)';;
4001 yes) with_cxx_main=yes
4002 MAINCC='$(CXX)';;
4003 *) with_cxx_main=yes
4004 MAINCC=$withval
4005 if test -z "$CXX"
4006 then
4007 CXX=$withval
4008 fi;;
4009 esac
4010else
4011
4012 with_cxx_main=no
4013 MAINCC='$(CC)'
4014
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004015fi
4016
Matthias Kloseb9621712010-04-24 17:59:49 +00004017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4018$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004019
4020preset_cxx="$CXX"
4021if test -z "$CXX"
4022then
4023 case "$CC" in
4024 gcc) # Extract the first word of "g++", so it can be a program name with args.
4025set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4027$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004028if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004029 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004030else
4031 case $CXX in
4032 [\\/]* | ?:[\\/]*)
4033 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4034 ;;
4035 *)
4036 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4037for as_dir in notfound
4038do
4039 IFS=$as_save_IFS
4040 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004041 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004042 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 +00004043 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004044 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004045 break 2
4046 fi
4047done
Matthias Kloseb9621712010-04-24 17:59:49 +00004048 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004049IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004050
4051 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4052 ;;
4053esac
4054fi
4055CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004056if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4058$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004059else
Matthias Kloseb9621712010-04-24 17:59:49 +00004060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4061$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004062fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004063
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004064 ;;
4065 cc) # Extract the first word of "c++", so it can be a program name with args.
4066set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4068$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004069if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004070 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004071else
4072 case $CXX in
4073 [\\/]* | ?:[\\/]*)
4074 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4075 ;;
4076 *)
4077 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4078for as_dir in notfound
4079do
4080 IFS=$as_save_IFS
4081 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004082 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004083 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 +00004084 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004085 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004086 break 2
4087 fi
4088done
Matthias Kloseb9621712010-04-24 17:59:49 +00004089 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004090IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004091
4092 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4093 ;;
4094esac
4095fi
4096CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004097if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4099$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004100else
Matthias Kloseb9621712010-04-24 17:59:49 +00004101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4102$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004103fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004104
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004105 ;;
4106 esac
4107 if test "$CXX" = "notfound"
4108 then
4109 CXX=""
4110 fi
4111fi
4112if test -z "$CXX"
4113then
4114 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4115do
4116 # Extract the first word of "$ac_prog", so it can be a program name with args.
4117set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4119$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004120if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004121 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004122else
4123 if test -n "$CXX"; then
4124 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4125else
4126as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4127for as_dir in $PATH
4128do
4129 IFS=$as_save_IFS
4130 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004131 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004132 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 +00004133 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004134 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004135 break 2
4136 fi
4137done
Matthias Kloseb9621712010-04-24 17:59:49 +00004138 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004139IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004140
4141fi
4142fi
4143CXX=$ac_cv_prog_CXX
4144if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4146$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004147else
Matthias Kloseb9621712010-04-24 17:59:49 +00004148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4149$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004150fi
4151
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004152
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004153 test -n "$CXX" && break
4154done
4155test -n "$CXX" || CXX="notfound"
4156
4157 if test "$CXX" = "notfound"
4158 then
4159 CXX=""
4160 fi
4161fi
4162if test "$preset_cxx" != "$CXX"
4163then
Matthias Kloseb9621712010-04-24 17:59:49 +00004164 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004165
4166 By default, distutils will build C++ extension modules with \"$CXX\".
4167 If this is not intended, then set CXX on the configure command line.
4168 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004169$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004170
4171 By default, distutils will build C++ extension modules with \"$CXX\".
4172 If this is not intended, then set CXX on the configure command line.
4173 " >&2;}
4174fi
4175
4176
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4178$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4179save_LDFLAGS="$LDFLAGS"
4180LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004181
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4183/* end confdefs.h. */
4184
4185int
4186main ()
4187{
4188
4189 ;
4190 return 0;
4191}
4192_ACEOF
4193if ac_fn_c_try_link "$LINENO"; then :
4194 NO_AS_NEEDED="-Wl,--no-as-needed"
4195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4196$as_echo "yes" >&6; }
4197else
4198 NO_AS_NEEDED=""
4199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4200$as_echo "no" >&6; }
4201fi
4202rm -f core conftest.err conftest.$ac_objext \
4203 conftest$ac_exeext conftest.$ac_ext
4204LDFLAGS="$save_LDFLAGS"
4205
4206
4207
4208# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004209ac_ext=c
4210ac_cpp='$CPP $CPPFLAGS'
4211ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4212ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4213ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4215$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004216# On Suns, sometimes $CPP names a directory.
4217if test -n "$CPP" && test -d "$CPP"; then
4218 CPP=
4219fi
4220if test -z "$CPP"; then
Gregory P. Smith69140482012-01-16 02:05:55 -08004221 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004222 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004223else
Martin v. Löwis11437992002-04-12 09:54:03 +00004224 # Double quotes because CPP needs to be expanded
4225 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4226 do
4227 ac_preproc_ok=false
4228for ac_c_preproc_warn_flag in '' yes
4229do
4230 # Use a header file that comes with gcc, so configuring glibc
4231 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004232 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4233 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004234 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004235 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004237/* end confdefs.h. */
4238#ifdef __STDC__
4239# include <limits.h>
4240#else
4241# include <assert.h>
4242#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004243 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004245if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004246
Matthias Kloseb9621712010-04-24 17:59:49 +00004247else
Martin v. Löwis11437992002-04-12 09:54:03 +00004248 # Broken: fails on valid input.
4249continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004250fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004251rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004252
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004253 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004254 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004256/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004257#include <ac_nonexistent.h>
4258_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004259if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004260 # Broken: success on invalid input.
4261continue
4262else
Martin v. Löwis11437992002-04-12 09:54:03 +00004263 # Passes both tests.
4264ac_preproc_ok=:
4265break
4266fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004267rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004268
4269done
4270# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004271rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004272if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004273 break
4274fi
4275
4276 done
4277 ac_cv_prog_CPP=$CPP
4278
4279fi
4280 CPP=$ac_cv_prog_CPP
4281else
4282 ac_cv_prog_CPP=$CPP
4283fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4285$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004286ac_preproc_ok=false
4287for ac_c_preproc_warn_flag in '' yes
4288do
4289 # Use a header file that comes with gcc, so configuring glibc
4290 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004291 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4292 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004293 # On the NeXT, cc -E runs the code through the compiler's parser,
4294 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004296/* end confdefs.h. */
4297#ifdef __STDC__
4298# include <limits.h>
4299#else
4300# include <assert.h>
4301#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004302 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004304if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004305
Matthias Kloseb9621712010-04-24 17:59:49 +00004306else
Martin v. Löwis11437992002-04-12 09:54:03 +00004307 # Broken: fails on valid input.
4308continue
4309fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004310rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004311
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004312 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004313 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004315/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004316#include <ac_nonexistent.h>
4317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004318if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004319 # Broken: success on invalid input.
4320continue
4321else
Martin v. Löwis11437992002-04-12 09:54:03 +00004322 # Passes both tests.
4323ac_preproc_ok=:
4324break
4325fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004326rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004327
4328done
4329# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004330rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004331if $ac_preproc_ok; then :
4332
Martin v. Löwis11437992002-04-12 09:54:03 +00004333else
Matthias Kloseb9621712010-04-24 17:59:49 +00004334 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4335$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004336as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Gregory P. Smith69140482012-01-16 02:05:55 -08004337See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004338fi
4339
4340ac_ext=c
4341ac_cpp='$CPP $CPPFLAGS'
4342ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4343ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4344ac_compiler_gnu=$ac_cv_c_compiler_gnu
4345
4346
Matthias Kloseb9621712010-04-24 17:59:49 +00004347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4348$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004349if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004350 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004351else
Matthias Kloseb9621712010-04-24 17:59:49 +00004352 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004353 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004354 # Loop through the user's path and test for each of PROGNAME-LIST
4355 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004356for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4357do
4358 IFS=$as_save_IFS
4359 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004360 for ac_prog in grep ggrep; do
4361 for ac_exec_ext in '' $ac_executable_extensions; do
4362 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4363 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4364# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004365 # Check for GNU $ac_path_GREP
4366case `"$ac_path_GREP" --version 2>&1` in
4367*GNU*)
4368 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4369*)
4370 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004371 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004372 while :
4373 do
4374 cat "conftest.in" "conftest.in" >"conftest.tmp"
4375 mv "conftest.tmp" "conftest.in"
4376 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004377 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4379 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004380 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004381 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4382 # Best one so far, save it but keep looking for a better one
4383 ac_cv_path_GREP="$ac_path_GREP"
4384 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004385 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004386 # 10*(2^10) chars as input seems more than enough
4387 test $ac_count -gt 10 && break
4388 done
4389 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4390esac
4391
Matthias Kloseb9621712010-04-24 17:59:49 +00004392 $ac_path_GREP_found && break 3
4393 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004394 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004395 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004396IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004397 if test -z "$ac_cv_path_GREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004398 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 +00004399 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004400else
4401 ac_cv_path_GREP=$GREP
4402fi
4403
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004404fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4406$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004407 GREP="$ac_cv_path_GREP"
4408
4409
Matthias Kloseb9621712010-04-24 17:59:49 +00004410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4411$as_echo_n "checking for egrep... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004412if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004413 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004414else
4415 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4416 then ac_cv_path_EGREP="$GREP -E"
4417 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004418 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004419 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004420 # Loop through the user's path and test for each of PROGNAME-LIST
4421 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004422for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4423do
4424 IFS=$as_save_IFS
4425 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004426 for ac_prog in egrep; do
4427 for ac_exec_ext in '' $ac_executable_extensions; do
4428 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4429 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4430# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004431 # Check for GNU $ac_path_EGREP
4432case `"$ac_path_EGREP" --version 2>&1` in
4433*GNU*)
4434 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4435*)
4436 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004437 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004438 while :
4439 do
4440 cat "conftest.in" "conftest.in" >"conftest.tmp"
4441 mv "conftest.tmp" "conftest.in"
4442 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004443 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004444 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4445 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004446 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004447 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4448 # Best one so far, save it but keep looking for a better one
4449 ac_cv_path_EGREP="$ac_path_EGREP"
4450 ac_path_EGREP_max=$ac_count
4451 fi
4452 # 10*(2^10) chars as input seems more than enough
4453 test $ac_count -gt 10 && break
4454 done
4455 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4456esac
4457
Matthias Kloseb9621712010-04-24 17:59:49 +00004458 $ac_path_EGREP_found && break 3
4459 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004460 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004461 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004462IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004463 if test -z "$ac_cv_path_EGREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004464 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 +00004465 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004466else
4467 ac_cv_path_EGREP=$EGREP
4468fi
4469
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004470 fi
4471fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4473$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004474 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004475
4476
Matthias Kloseb9621712010-04-24 17:59:49 +00004477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4478$as_echo_n "checking for ANSI C header files... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004479if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004480 $as_echo_n "(cached) " >&6
4481else
4482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004483/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004484#include <stdlib.h>
4485#include <stdarg.h>
4486#include <string.h>
4487#include <float.h>
4488
4489int
4490main ()
4491{
4492
4493 ;
4494 return 0;
4495}
4496_ACEOF
4497if ac_fn_c_try_compile "$LINENO"; then :
4498 ac_cv_header_stdc=yes
4499else
4500 ac_cv_header_stdc=no
4501fi
4502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4503
4504if test $ac_cv_header_stdc = yes; then
4505 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4507/* end confdefs.h. */
4508#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004509
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004510_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004511if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004512 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004513
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004514else
Matthias Kloseb9621712010-04-24 17:59:49 +00004515 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004516fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004517rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004518
Matthias Kloseb9621712010-04-24 17:59:49 +00004519fi
4520
4521if test $ac_cv_header_stdc = yes; then
4522 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4524/* end confdefs.h. */
4525#include <stdlib.h>
4526
4527_ACEOF
4528if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4529 $EGREP "free" >/dev/null 2>&1; then :
4530
4531else
4532 ac_cv_header_stdc=no
4533fi
4534rm -f conftest*
4535
4536fi
4537
4538if test $ac_cv_header_stdc = yes; then
4539 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4540 if test "$cross_compiling" = yes; then :
4541 :
4542else
4543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4544/* end confdefs.h. */
4545#include <ctype.h>
4546#include <stdlib.h>
4547#if ((' ' & 0x0FF) == 0x020)
4548# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4549# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4550#else
4551# define ISLOWER(c) \
4552 (('a' <= (c) && (c) <= 'i') \
4553 || ('j' <= (c) && (c) <= 'r') \
4554 || ('s' <= (c) && (c) <= 'z'))
4555# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4556#endif
4557
4558#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4559int
4560main ()
4561{
4562 int i;
4563 for (i = 0; i < 256; i++)
4564 if (XOR (islower (i), ISLOWER (i))
4565 || toupper (i) != TOUPPER (i))
4566 return 2;
4567 return 0;
4568}
4569_ACEOF
4570if ac_fn_c_try_run "$LINENO"; then :
4571
4572else
4573 ac_cv_header_stdc=no
4574fi
4575rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4576 conftest.$ac_objext conftest.beam conftest.$ac_ext
4577fi
4578
4579fi
4580fi
4581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4582$as_echo "$ac_cv_header_stdc" >&6; }
4583if test $ac_cv_header_stdc = yes; then
4584
4585$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4586
4587fi
4588
4589# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4590for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4591 inttypes.h stdint.h unistd.h
4592do :
4593 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4594ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4595"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004596if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004597 cat >>confdefs.h <<_ACEOF
4598#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4599_ACEOF
4600
4601fi
4602
4603done
4604
4605
4606
4607 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08004608if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004609 MINIX=yes
4610else
4611 MINIX=
4612fi
4613
4614
4615 if test "$MINIX" = yes; then
4616
4617$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4618
4619
4620$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4621
4622
4623$as_echo "#define _MINIX 1" >>confdefs.h
4624
4625 fi
4626
4627
4628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4629$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004630if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004631 $as_echo_n "(cached) " >&6
4632else
4633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4634/* end confdefs.h. */
4635
4636# define __EXTENSIONS__ 1
4637 $ac_includes_default
4638int
4639main ()
4640{
4641
4642 ;
4643 return 0;
4644}
4645_ACEOF
4646if ac_fn_c_try_compile "$LINENO"; then :
4647 ac_cv_safe_to_define___extensions__=yes
4648else
4649 ac_cv_safe_to_define___extensions__=no
4650fi
4651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4652fi
4653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4654$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4655 test $ac_cv_safe_to_define___extensions__ = yes &&
4656 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4657
4658 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4659
4660 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4661
4662 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4663
4664 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4665
4666
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004667
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004668# Check for unsupported systems
4669case $ac_sys_system/$ac_sys_release in
4670atheos*|Linux*/1*)
4671 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4672 echo See README for details.
4673 exit 1;;
4674esac
4675
4676
Matthias Kloseb9621712010-04-24 17:59:49 +00004677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4678$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004679
4680# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004681if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004682 withval=$with_suffix;
4683 case $withval in
4684 no) EXEEXT=;;
4685 yes) EXEEXT=.exe;;
4686 *) EXEEXT=$withval;;
4687 esac
4688fi
4689
Matthias Kloseb9621712010-04-24 17:59:49 +00004690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4691$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004692
4693# Test whether we're running on a non-case-sensitive system, in which
4694# case we give a warning if no ext is given
4695
Matthias Kloseb9621712010-04-24 17:59:49 +00004696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4697$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004698if test ! -d CaseSensitiveTestDir; then
4699mkdir CaseSensitiveTestDir
4700fi
4701
4702if test -d casesensitivetestdir
4703then
Matthias Kloseb9621712010-04-24 17:59:49 +00004704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4705$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004706 BUILDEXEEXT=.exe
4707else
Matthias Kloseb9621712010-04-24 17:59:49 +00004708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4709$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004710 BUILDEXEEXT=$EXEEXT
4711fi
4712rmdir CaseSensitiveTestDir
4713
4714case $MACHDEP in
4715bsdos*)
4716 case $CC in
4717 gcc) CC="$CC -D_HAVE_BSDI";;
4718 esac;;
4719esac
4720
4721case $ac_sys_system in
4722hp*|HP*)
4723 case $CC in
4724 cc|*/cc) CC="$CC -Ae";;
4725 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004726esac
4727
4728
4729
Matthias Kloseb9621712010-04-24 17:59:49 +00004730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4731$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004732if test -z "$LIBRARY"
4733then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004734 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004735fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4737$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004738
4739# LDLIBRARY is the name of the library to link against (as opposed to the
4740# name of the library into which to insert object files). BLDLIBRARY is also
4741# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4742# is blank as the main program is not linked directly against LDLIBRARY.
4743# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4744# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4745# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4746# DLLLIBRARY is the shared (i.e., DLL) library.
4747#
4748# RUNSHARED is used to run shared python without installed libraries
4749#
4750# INSTSONAME is the name of the shared library that will be use to install
4751# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004752#
4753# LDVERSION is the shared library version number, normally the Python version
4754# with the ABI build flags appended.
4755
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004756
4757
4758
4759
4760
4761
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004762
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004763LDLIBRARY="$LIBRARY"
4764BLDLIBRARY='$(LDLIBRARY)'
4765INSTSONAME='$(LDLIBRARY)'
4766DLLLIBRARY=''
4767LDLIBRARYDIR=''
4768RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004769LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004770
4771# LINKCC is the command that links the python executable -- default is $(CC).
4772# If CXX is set, and if it is needed to link a main function that was
4773# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4774# python might then depend on the C++ runtime
4775# This is altered for AIX in order to build the export list before
4776# linking.
4777
Matthias Kloseb9621712010-04-24 17:59:49 +00004778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4779$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004780if test -z "$LINKCC"
4781then
4782 LINKCC='$(PURIFY) $(MAINCC)'
4783 case $ac_sys_system in
4784 AIX*)
4785 exp_extra="\"\""
4786 if test $ac_sys_release -ge 5 -o \
4787 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4788 exp_extra="."
4789 fi
4790 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004791 QNX*)
4792 # qcc must be used because the other compilers do not
4793 # support -N.
4794 LINKCC=qcc;;
4795 esac
4796fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4798$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004799
4800# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4801# make sure we default having it set to "no": this is used by
4802# distutils.unixccompiler to know if it should add --enable-new-dtags
4803# to linker command lines, and failing to detect GNU ld simply results
4804# in the same bahaviour as before.
4805
Matthias Kloseb9621712010-04-24 17:59:49 +00004806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4807$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004808ac_prog=ld
4809if test "$GCC" = yes; then
4810 ac_prog=`$CC -print-prog-name=ld`
4811fi
4812case `"$ac_prog" -V 2>&1 < /dev/null` in
4813 *GNU*)
4814 GNULD=yes;;
4815 *)
4816 GNULD=no;;
4817esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4819$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004820
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4822$as_echo_n "checking for inline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004823if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004824 $as_echo_n "(cached) " >&6
4825else
4826 ac_cv_c_inline=no
4827for ac_kw in inline __inline__ __inline; do
4828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4829/* end confdefs.h. */
4830#ifndef __cplusplus
4831typedef int foo_t;
4832static $ac_kw foo_t static_foo () {return 0; }
4833$ac_kw foo_t foo () {return 0; }
4834#endif
4835
4836_ACEOF
4837if ac_fn_c_try_compile "$LINENO"; then :
4838 ac_cv_c_inline=$ac_kw
4839fi
4840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4841 test "$ac_cv_c_inline" != no && break
4842done
4843
4844fi
4845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4846$as_echo "$ac_cv_c_inline" >&6; }
4847
4848case $ac_cv_c_inline in
4849 inline | yes) ;;
4850 *)
4851 case $ac_cv_c_inline in
4852 no) ac_val=;;
4853 *) ac_val=$ac_cv_c_inline;;
4854 esac
4855 cat >>confdefs.h <<_ACEOF
4856#ifndef __cplusplus
4857#define inline $ac_val
4858#endif
4859_ACEOF
4860 ;;
4861esac
4862
4863if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004864
4865$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004866
4867
4868fi
4869
4870
Matthias Kloseb9621712010-04-24 17:59:49 +00004871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4872$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004873# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004874if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004875 enableval=$enable_shared;
4876fi
4877
4878
4879if test -z "$enable_shared"
4880then
4881 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004882 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004883 enable_shared="yes";;
4884 *)
4885 enable_shared="no";;
4886 esac
4887fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4889$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004890
Matthias Kloseb9621712010-04-24 17:59:49 +00004891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4892$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004893# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004894if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004895 enableval=$enable_profiling; ac_save_cc="$CC"
4896 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004897 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004898 ac_enable_profiling="no"
4899else
Matthias Kloseb9621712010-04-24 17:59:49 +00004900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004901/* end confdefs.h. */
4902int main() { return 0; }
4903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004904if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004905 ac_enable_profiling="yes"
4906else
Matthias Kloseb9621712010-04-24 17:59:49 +00004907 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004908fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004909rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4910 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004911fi
4912
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004913 CC="$ac_save_cc"
4914fi
4915
Matthias Kloseb9621712010-04-24 17:59:49 +00004916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4917$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004918
4919case "$ac_enable_profiling" in
4920 "yes")
4921 BASECFLAGS="-pg $BASECFLAGS"
4922 LDFLAGS="-pg $LDFLAGS"
4923 ;;
4924esac
4925
Matthias Kloseb9621712010-04-24 17:59:49 +00004926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4927$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004928
4929# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4930# library that we build, but we do not want to link against it (we
4931# will find it with a -framework option). For this reason there is an
4932# extra variable BLDLIBRARY against which Python and the extension
4933# modules are linked, BLDLIBRARY. This is normally the same as
4934# LDLIBRARY, but empty for MacOSX framework builds.
4935if test "$enable_framework"
4936then
4937 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4938 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4939 BLDLIBRARY=''
4940else
4941 BLDLIBRARY='$(LDLIBRARY)'
4942fi
4943
4944# Other platforms follow
4945if test $enable_shared = "yes"; then
4946
Matthias Kloseb9621712010-04-24 17:59:49 +00004947$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004948
4949 case $ac_sys_system in
4950 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004951 LDLIBRARY='libpython$(LDVERSION).dll.a'
4952 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004953 ;;
4954 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004955 LDLIBRARY='libpython$(LDVERSION).so'
4956 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004957 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4958 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004959 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004960 then
4961 PY3LIBRARY=libpython3.so
4962 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004963 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02004964 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004965 LDLIBRARY='libpython$(LDVERSION).so'
4966 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004967 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4968 case $ac_sys_system in
4969 FreeBSD*)
4970 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4971 ;;
4972 esac
4973 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004974 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004975 then
4976 PY3LIBRARY=libpython3.so
4977 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004978 ;;
4979 hp*|HP*)
4980 case `uname -m` in
4981 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004982 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004983 ;;
4984 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004985 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004986 ;;
4987 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004988 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004989 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4990 ;;
4991 OSF*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004992 LDLIBRARY='libpython$(LDVERSION).so'
4993 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004994 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4995 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004996 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004997 LDLIBRARY='libpython$(LDVERSION).dylib'
4998 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004999 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5000 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005001 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005002 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005003 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5004 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005005
5006 esac
5007else # shared is disabled
5008 case $ac_sys_system in
5009 CYGWIN*)
5010 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005011 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005012 ;;
5013 esac
5014fi
5015
Matthias Kloseb9621712010-04-24 17:59:49 +00005016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5017$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005018
5019if test -n "$ac_tool_prefix"; then
5020 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5021set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5023$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005024if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005025 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005026else
5027 if test -n "$RANLIB"; then
5028 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5029else
5030as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5031for as_dir in $PATH
5032do
5033 IFS=$as_save_IFS
5034 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005035 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005036 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5037 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005038 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005039 break 2
5040 fi
5041done
Matthias Kloseb9621712010-04-24 17:59:49 +00005042 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005043IFS=$as_save_IFS
5044
5045fi
5046fi
5047RANLIB=$ac_cv_prog_RANLIB
5048if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5050$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005051else
Matthias Kloseb9621712010-04-24 17:59:49 +00005052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5053$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005054fi
5055
5056
5057fi
5058if test -z "$ac_cv_prog_RANLIB"; then
5059 ac_ct_RANLIB=$RANLIB
5060 # Extract the first word of "ranlib", so it can be a program name with args.
5061set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5063$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005064if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005065 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005066else
5067 if test -n "$ac_ct_RANLIB"; then
5068 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5069else
5070as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5071for as_dir in $PATH
5072do
5073 IFS=$as_save_IFS
5074 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005075 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005076 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5077 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005078 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005079 break 2
5080 fi
5081done
Matthias Kloseb9621712010-04-24 17:59:49 +00005082 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005083IFS=$as_save_IFS
5084
5085fi
5086fi
5087ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5088if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5090$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005091else
Matthias Kloseb9621712010-04-24 17:59:49 +00005092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5093$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005094fi
5095
5096 if test "x$ac_ct_RANLIB" = x; then
5097 RANLIB=":"
5098 else
5099 case $cross_compiling:$ac_tool_warned in
5100yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005101{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5102$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005103ac_tool_warned=yes ;;
5104esac
5105 RANLIB=$ac_ct_RANLIB
5106 fi
5107else
5108 RANLIB="$ac_cv_prog_RANLIB"
5109fi
5110
5111
5112for ac_prog in ar aal
5113do
5114 # Extract the first word of "$ac_prog", so it can be a program name with args.
5115set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5117$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005118if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005119 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005120else
5121 if test -n "$AR"; then
5122 ac_cv_prog_AR="$AR" # Let the user override the test.
5123else
5124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5125for as_dir in $PATH
5126do
5127 IFS=$as_save_IFS
5128 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005129 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005130 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5131 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005132 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005133 break 2
5134 fi
5135done
Matthias Kloseb9621712010-04-24 17:59:49 +00005136 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005137IFS=$as_save_IFS
5138
5139fi
5140fi
5141AR=$ac_cv_prog_AR
5142if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5144$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005145else
Matthias Kloseb9621712010-04-24 17:59:49 +00005146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5147$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005148fi
5149
5150
5151 test -n "$AR" && break
5152done
5153test -n "$AR" || AR="ar"
5154
5155
5156# tweak ARFLAGS only if the user didn't set it on the command line
5157
5158if test -z "$ARFLAGS"
5159then
5160 ARFLAGS="rc"
5161fi
5162
5163
5164# Extract the first word of "svnversion", so it can be a program name with args.
5165set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5167$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005168if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005169 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005170else
5171 if test -n "$SVNVERSION"; then
5172 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5173else
5174as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5175for as_dir in $PATH
5176do
5177 IFS=$as_save_IFS
5178 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005179 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005180 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5181 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005182 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005183 break 2
5184 fi
5185done
Matthias Kloseb9621712010-04-24 17:59:49 +00005186 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005187IFS=$as_save_IFS
5188
5189 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5190fi
5191fi
5192SVNVERSION=$ac_cv_prog_SVNVERSION
5193if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5195$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005196else
Matthias Kloseb9621712010-04-24 17:59:49 +00005197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5198$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005199fi
5200
5201
5202if test $SVNVERSION = found
5203then
5204 SVNVERSION="svnversion \$(srcdir)"
5205else
5206 SVNVERSION="echo Unversioned directory"
5207fi
5208
Trent Nelson9effe692012-10-16 08:41:32 -04005209
Trent Nelson739fc542012-10-17 04:45:30 -04005210if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson9effe692012-10-16 08:41:32 -04005211 # If we're building out-of-tree, we need to make sure the following
5212 # resources get picked up before their $srcdir counterparts.
5213 # Objects/ -> typeslots.inc
5214 # Include/ -> Python-ast.h, graminit.h
5215 # Python/ -> importlib.h
5216 # (A side effect of this is that these resources will automatically be
5217 # regenerated when building out-of-tree, regardless of whether or not
5218 # the $srcdir counterpart is up-to-date. This is an acceptable trade
5219 # off.)
5220 BASECPPFLAGS="-IObjects -IInclude -IPython"
5221else
5222 BASECPPFLAGS=""
5223fi
5224
Georg Brandl1ca2e792011-03-05 20:51:24 +01005225
5226
5227
Georg Brandl187c1112011-07-03 09:23:20 +02005228
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02005229if test -e $srcdir/.hg/dirstate
Georg Brandl187c1112011-07-03 09:23:20 +02005230then
Georg Brandl1ca2e792011-03-05 20:51:24 +01005231# Extract the first word of "hg", so it can be a program name with args.
5232set dummy hg; ac_word=$2
5233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5234$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005235if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl1ca2e792011-03-05 20:51:24 +01005236 $as_echo_n "(cached) " >&6
5237else
5238 if test -n "$HAS_HG"; then
5239 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5240else
5241as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5242for as_dir in $PATH
5243do
5244 IFS=$as_save_IFS
5245 test -z "$as_dir" && as_dir=.
5246 for ac_exec_ext in '' $ac_executable_extensions; do
5247 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5248 ac_cv_prog_HAS_HG="found"
5249 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5250 break 2
5251 fi
5252done
5253 done
5254IFS=$as_save_IFS
5255
5256 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5257fi
5258fi
5259HAS_HG=$ac_cv_prog_HAS_HG
5260if test -n "$HAS_HG"; then
5261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5262$as_echo "$HAS_HG" >&6; }
5263else
5264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5265$as_echo "no" >&6; }
5266fi
5267
5268
Georg Brandl187c1112011-07-03 09:23:20 +02005269else
5270HAS_HG=no-repository
5271fi
Georg Brandl1ca2e792011-03-05 20:51:24 +01005272if test $HAS_HG = found
5273then
5274 HGVERSION="hg id -i \$(srcdir)"
5275 HGTAG="hg id -t \$(srcdir)"
5276 HGBRANCH="hg id -b \$(srcdir)"
5277else
5278 HGVERSION=""
5279 HGTAG=""
5280 HGBRANCH=""
5281fi
5282
Georg Brandl187c1112011-07-03 09:23:20 +02005283
Matthias Klosec4c48422012-10-21 23:05:35 +02005284for ac_prog in python$PACKAGE_VERSION python3 python
5285do
5286 # Extract the first word of "$ac_prog", so it can be a program name with args.
5287set dummy $ac_prog; ac_word=$2
Georg Brandl187c1112011-07-03 09:23:20 +02005288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5289$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02005290if ${ac_cv_prog_PYTHON+:} false; then :
Georg Brandl187c1112011-07-03 09:23:20 +02005291 $as_echo_n "(cached) " >&6
5292else
Matthias Klosec4c48422012-10-21 23:05:35 +02005293 if test -n "$PYTHON"; then
5294 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Georg Brandl187c1112011-07-03 09:23:20 +02005295else
5296as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5297for as_dir in $PATH
5298do
5299 IFS=$as_save_IFS
5300 test -z "$as_dir" && as_dir=.
5301 for ac_exec_ext in '' $ac_executable_extensions; do
5302 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Matthias Klosec4c48422012-10-21 23:05:35 +02005303 ac_cv_prog_PYTHON="$ac_prog"
Georg Brandl187c1112011-07-03 09:23:20 +02005304 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5305 break 2
5306 fi
5307done
5308 done
5309IFS=$as_save_IFS
5310
Georg Brandl187c1112011-07-03 09:23:20 +02005311fi
5312fi
Matthias Klosec4c48422012-10-21 23:05:35 +02005313PYTHON=$ac_cv_prog_PYTHON
5314if test -n "$PYTHON"; then
5315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
5316$as_echo "$PYTHON" >&6; }
Georg Brandl187c1112011-07-03 09:23:20 +02005317else
5318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5319$as_echo "no" >&6; }
5320fi
5321
5322
Matthias Klosec4c48422012-10-21 23:05:35 +02005323 test -n "$PYTHON" && break
5324done
5325test -n "$PYTHON" || PYTHON="not-found"
5326
5327if $PYTHON = not-found; then
5328 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5329else
5330 ASDLGEN="$PYTHON"
Georg Brandl187c1112011-07-03 09:23:20 +02005331fi
5332
5333
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005334case $MACHDEP in
5335bsdos*|hp*|HP*)
5336 # install -d does not work on BSDI or HP-UX
5337 if test -z "$INSTALL"
5338 then
5339 INSTALL="${srcdir}/install-sh -c"
5340 fi
5341esac
5342ac_aux_dir=
5343for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005344 if test -f "$ac_dir/install-sh"; then
5345 ac_aux_dir=$ac_dir
5346 ac_install_sh="$ac_aux_dir/install-sh -c"
5347 break
5348 elif test -f "$ac_dir/install.sh"; then
5349 ac_aux_dir=$ac_dir
5350 ac_install_sh="$ac_aux_dir/install.sh -c"
5351 break
5352 elif test -f "$ac_dir/shtool"; then
5353 ac_aux_dir=$ac_dir
5354 ac_install_sh="$ac_aux_dir/shtool install -c"
5355 break
5356 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005357done
5358if test -z "$ac_aux_dir"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005359 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005360fi
5361
5362# These three variables are undocumented and unsupported,
5363# and are intended to be withdrawn in a future Autoconf release.
5364# They can cause serious problems if a builder's source tree is in a directory
5365# whose full name contains unusual characters.
5366ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5367ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5368ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5369
5370
5371# Find a good install program. We prefer a C program (faster),
5372# so one script is as good as another. But avoid the broken or
5373# incompatible versions:
5374# SysV /etc/install, /usr/sbin/install
5375# SunOS /usr/etc/install
5376# IRIX /sbin/install
5377# AIX /bin/install
5378# AmigaOS /C/install, which installs bootblocks on floppy discs
5379# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5380# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5381# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5382# OS/2's system install, which has a completely different semantic
5383# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005384# Reject install programs that cannot install multiple files.
5385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5386$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005387if test -z "$INSTALL"; then
Gregory P. Smith69140482012-01-16 02:05:55 -08005388if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005389 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005390else
5391 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5392for as_dir in $PATH
5393do
5394 IFS=$as_save_IFS
5395 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005396 # Account for people who put trailing slashes in PATH elements.
5397case $as_dir/ in #((
5398 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005399 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005400 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005401 /usr/ucb/* ) ;;
5402 *)
5403 # OSF1 and SCO ODT 3.0 have their own names for install.
5404 # Don't use installbsd from OSF since it installs stuff as root
5405 # by default.
5406 for ac_prog in ginstall scoinst install; do
5407 for ac_exec_ext in '' $ac_executable_extensions; do
5408 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5409 if test $ac_prog = install &&
5410 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5411 # AIX install. It has an incompatible calling convention.
5412 :
5413 elif test $ac_prog = install &&
5414 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5415 # program-specific install script used by HP pwplus--don't use.
5416 :
5417 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005418 rm -rf conftest.one conftest.two conftest.dir
5419 echo one > conftest.one
5420 echo two > conftest.two
5421 mkdir conftest.dir
5422 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5423 test -s conftest.one && test -s conftest.two &&
5424 test -s conftest.dir/conftest.one &&
5425 test -s conftest.dir/conftest.two
5426 then
5427 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5428 break 3
5429 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005430 fi
5431 fi
5432 done
5433 done
5434 ;;
5435esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005436
5437 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005438IFS=$as_save_IFS
5439
Matthias Kloseb9621712010-04-24 17:59:49 +00005440rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005441
5442fi
5443 if test "${ac_cv_path_install+set}" = set; then
5444 INSTALL=$ac_cv_path_install
5445 else
5446 # As a last resort, use the slow shell script. Don't cache a
5447 # value for INSTALL within a source directory, because that will
5448 # break other packages using the cache if that directory is
5449 # removed, or if the value is a relative name.
5450 INSTALL=$ac_install_sh
5451 fi
5452fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5454$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005455
5456# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5457# It thinks the first close brace ends the variable substitution.
5458test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5459
5460test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5461
5462test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5463
Trent Nelsona45afca2012-08-30 14:32:02 +00005464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5465$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5466if test -z "$MKDIR_P"; then
5467 if ${ac_cv_path_mkdir+:} false; then :
5468 $as_echo_n "(cached) " >&6
5469else
5470 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5471for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5472do
5473 IFS=$as_save_IFS
5474 test -z "$as_dir" && as_dir=.
5475 for ac_prog in mkdir gmkdir; do
5476 for ac_exec_ext in '' $ac_executable_extensions; do
5477 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
5478 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5479 'mkdir (GNU coreutils) '* | \
5480 'mkdir (coreutils) '* | \
5481 'mkdir (fileutils) '4.1*)
5482 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5483 break 3;;
5484 esac
5485 done
5486 done
5487 done
5488IFS=$as_save_IFS
5489
5490fi
5491
5492 test -d ./--version && rmdir ./--version
5493 if test "${ac_cv_path_mkdir+set}" = set; then
5494 MKDIR_P="$ac_cv_path_mkdir -p"
5495 else
5496 # As a last resort, use the slow shell script. Don't cache a
5497 # value for MKDIR_P within a source directory, because that will
5498 # break other packages using the cache if that directory is
5499 # removed, or if the value is a relative name.
5500 MKDIR_P="$ac_install_sh -d"
5501 fi
5502fi
5503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5504$as_echo "$MKDIR_P" >&6; }
5505
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005506
5507# Not every filesystem supports hard links
5508
5509if test -z "$LN" ; then
5510 case $ac_sys_system in
5511 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005512 *) LN=ln;;
5513 esac
5514fi
5515
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005516# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005517
5518ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005519
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005520# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5522$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005523
5524# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005525if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005526 withval=$with_pydebug;
5527if test "$withval" != no
5528then
5529
Matthias Kloseb9621712010-04-24 17:59:49 +00005530$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005531
Matthias Kloseb9621712010-04-24 17:59:49 +00005532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5533$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005534 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005535 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005536else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5537$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005538fi
5539else
Matthias Kloseb9621712010-04-24 17:59:49 +00005540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5541$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005542fi
5543
5544
5545# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5546# merged with this chunk of code?
5547
5548# Optimizer/debugger flags
5549# ------------------------
5550# (The following bit of code is complicated enough - please keep things
5551# indented properly. Just pretend you're editing Python code. ;-)
5552
5553# There are two parallel sets of case statements below, one that checks to
5554# see if OPT was set and one that does BASECFLAGS setting based upon
5555# compiler and platform. BASECFLAGS tweaks need to be made even if the
5556# user set OPT.
5557
5558# tweak OPT based on compiler and platform, only if the user didn't set
5559# it on the command line
5560
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005561if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005562then
5563 case $GCC in
5564 yes)
5565 if test "$CC" != 'g++' ; then
5566 STRICT_PROTO="-Wstrict-prototypes"
5567 fi
5568 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5569 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5570 WRAP="-fwrapv"
5571 fi
Stefan Krah962055d2011-09-14 15:14:08 +02005572
5573 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01005574 case $CC in
5575 *clang*) WRAP="-fwrapv"
5576 ;;
5577 esac
Stefan Krah962055d2011-09-14 15:14:08 +02005578
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005579 case $ac_cv_prog_cc_g in
5580 yes)
5581 if test "$Py_DEBUG" = 'true' ; then
5582 # Optimization messes up debuggers, so turn it off for
5583 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005584 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005585 else
5586 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5587 fi
5588 ;;
5589 *)
5590 OPT="-O3 -Wall $STRICT_PROTO"
5591 ;;
5592 esac
5593 case $ac_sys_system in
5594 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5595 ;;
5596 esac
5597 ;;
5598
5599 *)
5600 OPT="-O"
5601 ;;
5602 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005603fi
5604
5605
5606
5607# The -arch flags for universal builds on OSX
5608UNIVERSAL_ARCH_FLAGS=
5609
5610
5611# tweak BASECFLAGS based on compiler and platform
5612case $GCC in
5613yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005614 # Python doesn't violate C99 aliasing rules, but older versions of
5615 # GCC produce warnings for legal Python code. Enable
5616 # -fno-strict-aliasing on versions of GCC that support but produce
5617 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5619$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005620 ac_save_cc="$CC"
5621 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005622 save_CFLAGS="$CFLAGS"
Gregory P. Smith69140482012-01-16 02:05:55 -08005623 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005624 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005625else
Matthias Kloseb9621712010-04-24 17:59:49 +00005626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005627/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005628
Matthias Kloseb159a552010-04-25 21:00:44 +00005629
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005630int
5631main ()
5632{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005633
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005634 ;
5635 return 0;
5636}
Matthias Kloseb159a552010-04-25 21:00:44 +00005637
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005639if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005640
5641 CC="$ac_save_cc -fstrict-aliasing"
5642 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005644/* end confdefs.h. */
5645
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005646 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005647int
5648main ()
5649{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005650double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005651 ;
5652 return 0;
5653}
Matthias Kloseb159a552010-04-25 21:00:44 +00005654
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005655_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005656if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005657
5658 ac_cv_no_strict_aliasing=no
5659
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005660else
Matthias Kloseb159a552010-04-25 21:00:44 +00005661
5662 ac_cv_no_strict_aliasing=yes
5663
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005664fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005666
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005667else
Matthias Kloseb159a552010-04-25 21:00:44 +00005668
5669 ac_cv_no_strict_aliasing=no
5670
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005673fi
5674
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005675 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5678$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005679 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005680 then
5681 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5682 fi
5683
5684 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5685 # support. Without this, treatment of subnormals doesn't follow
5686 # the standard.
5687 case $ac_sys_machine in
5688 alpha*)
5689 BASECFLAGS="$BASECFLAGS -mieee"
5690 ;;
5691 esac
5692
5693 case $ac_sys_system in
5694 SCO_SV*)
5695 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5696 ;;
5697 # is there any other compiler on Darwin besides gcc?
5698 Darwin*)
5699 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5700 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005701 if test "${CC}" = gcc
5702 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5704$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005705 case "${UNIVERSALSDK}" in
5706 */MacOSX10.4u.sdk)
5707 # Build using 10.4 SDK, force usage of gcc when the
5708 # compiler is gcc, otherwise the user will get very
5709 # confusing error messages when building on OSX 10.6
5710 CC=gcc-4.0
5711 CPP=cpp-4.0
5712 ;;
5713 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5715$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005716 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717
5718
5719 if test "${enable_universalsdk}"; then
5720 UNIVERSAL_ARCH_FLAGS=""
5721 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5722 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5723 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005724 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5726 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005727 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005728 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729
5730 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5731 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005732 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005733 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005734
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005735 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5736 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005737 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005738 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005739
5740 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5741 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005742 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005743 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005744
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745 else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005746 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 +00005747
5748 fi
5749
5750
Ronald Oussoren666028b2010-04-18 19:07:43 +00005751 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5752 if test "${UNIVERSALSDK}" != "/"
5753 then
5754 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5755 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005756 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005757 fi
5758 fi
5759
5760 # Calculate the right deployment target for this build.
5761 #
5762 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5763 if test ${cur_target} '>' 10.2; then
5764 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005765 if test ${enable_universalsdk}; then
5766 if test "${UNIVERSAL_ARCHS}" = "all"; then
5767 # Ensure that the default platform for a
5768 # 4-way universal build is OSX 10.5,
5769 # that's the first OS release where
5770 # 4-way builds make sense.
5771 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005772
5773 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5774 cur_target='10.5'
5775
5776 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5777 cur_target='10.5'
5778
5779 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5780 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005781 fi
5782 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005783 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005784 # On Intel macs default to a deployment
5785 # target of 10.4, that's the first OSX
5786 # release with Intel support.
5787 cur_target="10.4"
5788 fi
5789 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790 fi
5791 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5792
5793 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5794 # environment with a value that is the same as what we'll use
5795 # in the Makefile to ensure that we'll get the same compiler
5796 # environment during configure and build time.
5797 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5798 export MACOSX_DEPLOYMENT_TARGET
5799 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5800
5801 ;;
5802 OSF*)
5803 BASECFLAGS="$BASECFLAGS -mieee"
5804 ;;
5805 esac
5806 ;;
5807
5808*)
5809 case $ac_sys_system in
5810 OpenUNIX*|UnixWare*)
5811 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5812 ;;
5813 OSF*)
5814 BASECFLAGS="$BASECFLAGS -ieee -std"
5815 ;;
5816 SCO_SV*)
5817 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5818 ;;
5819 esac
5820 ;;
5821esac
5822
5823if test "$Py_DEBUG" = 'true'; then
5824 :
5825else
5826 OPT="-DNDEBUG $OPT"
5827fi
5828
5829if test "$ac_arch_flags"
5830then
5831 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5832fi
5833
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834# Check whether GCC supports PyArg_ParseTuple format
5835if test "$GCC" = "yes"
5836then
Matthias Kloseb9621712010-04-24 17:59:49 +00005837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5838$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005839 save_CFLAGS=$CFLAGS
5840 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005842/* end confdefs.h. */
5843
5844 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005845int
5846main ()
5847{
5848
5849 ;
5850 return 0;
5851}
Matthias Kloseb159a552010-04-25 21:00:44 +00005852
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005854if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005855
Matthias Kloseb159a552010-04-25 21:00:44 +00005856
Matthias Kloseb9621712010-04-24 17:59:49 +00005857$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858
Matthias Kloseb159a552010-04-25 21:00:44 +00005859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005860$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005861
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005862else
Matthias Kloseb159a552010-04-25 21:00:44 +00005863
5864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005865$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005866
5867fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5869 CFLAGS=$save_CFLAGS
5870fi
5871
5872# On some compilers, pthreads are available without further options
5873# (e.g. MacOS X). On some of these systems, the compiler will not
5874# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5875# So we have to see first whether pthreads are available without
5876# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5878$as_echo_n "checking whether pthreads are available without options... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005879if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005880 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881else
Matthias Kloseb9621712010-04-24 17:59:49 +00005882 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883 ac_cv_pthread_is_default=no
5884else
Matthias Kloseb9621712010-04-24 17:59:49 +00005885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886/* end confdefs.h. */
5887
5888#include <pthread.h>
5889
5890void* routine(void* p){return NULL;}
5891
5892int main(){
5893 pthread_t p;
5894 if(pthread_create(&p,NULL,routine,NULL)!=0)
5895 return 1;
5896 (void)pthread_detach(p);
5897 return 0;
5898}
5899
5900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005901if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902
5903 ac_cv_pthread_is_default=yes
5904 ac_cv_kthread=no
5905 ac_cv_pthread=no
5906
5907else
Matthias Kloseb9621712010-04-24 17:59:49 +00005908 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005909fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005910rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5911 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912fi
5913
5914
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915fi
5916
Matthias Kloseb9621712010-04-24 17:59:49 +00005917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5918$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919
5920
5921if test $ac_cv_pthread_is_default = yes
5922then
5923 ac_cv_kpthread=no
5924else
5925# -Kpthread, if available, provides the right #defines
5926# and linker options to make pthread_create available
5927# Some compilers won't report that they do not support -Kpthread,
5928# so we need to run a program to see whether it really made the
5929# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5931$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005932if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005933 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934else
5935 ac_save_cc="$CC"
5936CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005937if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938 ac_cv_kpthread=no
5939else
Matthias Kloseb9621712010-04-24 17:59:49 +00005940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005941/* end confdefs.h. */
5942
5943#include <pthread.h>
5944
5945void* routine(void* p){return NULL;}
5946
5947int main(){
5948 pthread_t p;
5949 if(pthread_create(&p,NULL,routine,NULL)!=0)
5950 return 1;
5951 (void)pthread_detach(p);
5952 return 0;
5953}
5954
5955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005956if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005957 ac_cv_kpthread=yes
5958else
Matthias Kloseb9621712010-04-24 17:59:49 +00005959 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5962 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963fi
5964
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965CC="$ac_save_cc"
5966fi
5967
Matthias Kloseb9621712010-04-24 17:59:49 +00005968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5969$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005970fi
5971
5972if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5973then
5974# -Kthread, if available, provides the right #defines
5975# and linker options to make pthread_create available
5976# Some compilers won't report that they do not support -Kthread,
5977# so we need to run a program to see whether it really made the
5978# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5980$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005981if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005982 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005983else
5984 ac_save_cc="$CC"
5985CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005986if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005987 ac_cv_kthread=no
5988else
Matthias Kloseb9621712010-04-24 17:59:49 +00005989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990/* end confdefs.h. */
5991
5992#include <pthread.h>
5993
5994void* routine(void* p){return NULL;}
5995
5996int main(){
5997 pthread_t p;
5998 if(pthread_create(&p,NULL,routine,NULL)!=0)
5999 return 1;
6000 (void)pthread_detach(p);
6001 return 0;
6002}
6003
6004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006005if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006006 ac_cv_kthread=yes
6007else
Matthias Kloseb9621712010-04-24 17:59:49 +00006008 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006009fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006010rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6011 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006012fi
6013
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006014CC="$ac_save_cc"
6015fi
6016
Matthias Kloseb9621712010-04-24 17:59:49 +00006017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6018$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006019fi
6020
6021if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6022then
6023# -pthread, if available, provides the right #defines
6024# and linker options to make pthread_create available
6025# Some compilers won't report that they do not support -pthread,
6026# so we need to run a program to see whether it really made the
6027# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6029$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006030if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006031 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006032else
6033 ac_save_cc="$CC"
6034CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006035if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006036 ac_cv_pthread=no
6037else
Matthias Kloseb9621712010-04-24 17:59:49 +00006038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006039/* end confdefs.h. */
6040
6041#include <pthread.h>
6042
6043void* routine(void* p){return NULL;}
6044
6045int main(){
6046 pthread_t p;
6047 if(pthread_create(&p,NULL,routine,NULL)!=0)
6048 return 1;
6049 (void)pthread_detach(p);
6050 return 0;
6051}
6052
6053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006054if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006055 ac_cv_pthread=yes
6056else
Matthias Kloseb9621712010-04-24 17:59:49 +00006057 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006058fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006059rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6060 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006061fi
6062
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006063CC="$ac_save_cc"
6064fi
6065
Matthias Kloseb9621712010-04-24 17:59:49 +00006066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6067$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006068fi
6069
6070# If we have set a CC compiler flag for thread support then
6071# check if it works for CXX, too.
6072ac_cv_cxx_thread=no
6073if test ! -z "$CXX"
6074then
Matthias Kloseb9621712010-04-24 17:59:49 +00006075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6076$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006077ac_save_cxx="$CXX"
6078
6079if test "$ac_cv_kpthread" = "yes"
6080then
6081 CXX="$CXX -Kpthread"
6082 ac_cv_cxx_thread=yes
6083elif test "$ac_cv_kthread" = "yes"
6084then
6085 CXX="$CXX -Kthread"
6086 ac_cv_cxx_thread=yes
6087elif test "$ac_cv_pthread" = "yes"
6088then
6089 CXX="$CXX -pthread"
6090 ac_cv_cxx_thread=yes
6091fi
6092
6093if test $ac_cv_cxx_thread = yes
6094then
6095 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6096 $CXX -c conftest.$ac_ext 2>&5
6097 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6098 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6099 then
6100 ac_cv_cxx_thread=yes
6101 else
6102 ac_cv_cxx_thread=no
6103 fi
6104 rm -fr conftest*
6105fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6107$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006108fi
6109CXX="$ac_save_cxx"
6110
6111
6112# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6114$as_echo_n "checking for ANSI C header files... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006115if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006116 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006117else
Matthias Kloseb9621712010-04-24 17:59:49 +00006118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006119/* end confdefs.h. */
6120#include <stdlib.h>
6121#include <stdarg.h>
6122#include <string.h>
6123#include <float.h>
6124
6125int
6126main ()
6127{
6128
6129 ;
6130 return 0;
6131}
6132_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006133if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006134 ac_cv_header_stdc=yes
6135else
Matthias Kloseb9621712010-04-24 17:59:49 +00006136 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006137fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6139
6140if test $ac_cv_header_stdc = yes; then
6141 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006143/* end confdefs.h. */
6144#include <string.h>
6145
6146_ACEOF
6147if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006148 $EGREP "memchr" >/dev/null 2>&1; then :
6149
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006150else
6151 ac_cv_header_stdc=no
6152fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006153rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006154
6155fi
6156
6157if test $ac_cv_header_stdc = yes; then
6158 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006160/* end confdefs.h. */
6161#include <stdlib.h>
6162
6163_ACEOF
6164if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006165 $EGREP "free" >/dev/null 2>&1; then :
6166
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006167else
6168 ac_cv_header_stdc=no
6169fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006170rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006171
6172fi
6173
6174if test $ac_cv_header_stdc = yes; then
6175 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006176 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006177 :
6178else
Matthias Kloseb9621712010-04-24 17:59:49 +00006179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006180/* end confdefs.h. */
6181#include <ctype.h>
6182#include <stdlib.h>
6183#if ((' ' & 0x0FF) == 0x020)
6184# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6185# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6186#else
6187# define ISLOWER(c) \
6188 (('a' <= (c) && (c) <= 'i') \
6189 || ('j' <= (c) && (c) <= 'r') \
6190 || ('s' <= (c) && (c) <= 'z'))
6191# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6192#endif
6193
6194#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6195int
6196main ()
6197{
6198 int i;
6199 for (i = 0; i < 256; i++)
6200 if (XOR (islower (i), ISLOWER (i))
6201 || toupper (i) != TOUPPER (i))
6202 return 2;
6203 return 0;
6204}
6205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006206if ac_fn_c_try_run "$LINENO"; then :
6207
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006208else
Matthias Kloseb9621712010-04-24 17:59:49 +00006209 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006210fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006211rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6212 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006213fi
6214
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006215fi
6216fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6218$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006219if test $ac_cv_header_stdc = yes; then
6220
Matthias Kloseb9621712010-04-24 17:59:49 +00006221$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006222
6223fi
6224
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006225for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6226fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006227ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006228shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006229unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006230sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6231sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006232sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Gregory P. Smith8facece2012-01-21 14:01:08 -08006233sys/syscall.h sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006234sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00006235sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006236bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006237do :
6238 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6239ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006240if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006241 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006242#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006243_ACEOF
6244
6245fi
6246
Guido van Rossum627b2d71993-12-24 10:39:16 +00006247done
6248
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006249ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006250for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006251 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6253$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006254if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006255 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006256else
Matthias Kloseb9621712010-04-24 17:59:49 +00006257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006258/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006259#include <sys/types.h>
6260#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006261
Martin v. Löwis11437992002-04-12 09:54:03 +00006262int
6263main ()
6264{
6265if ((DIR *) 0)
6266return 0;
6267 ;
6268 return 0;
6269}
6270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006271if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006272 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006273else
Matthias Kloseb9621712010-04-24 17:59:49 +00006274 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006277fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006278eval ac_res=\$$as_ac_Header
6279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6280$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006281if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006282 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006283#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006284_ACEOF
6285
6286ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006287fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006288
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006289done
6290# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6291if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6293$as_echo_n "checking for library containing opendir... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006294if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006295 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006296else
Martin v. Löwis11437992002-04-12 09:54:03 +00006297 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006299/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006300
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006301/* Override any GCC internal prototype to avoid an error.
6302 Use char because int might match the return type of a GCC
6303 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006304#ifdef __cplusplus
6305extern "C"
6306#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006307char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006308int
6309main ()
6310{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006311return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006312 ;
6313 return 0;
6314}
6315_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006316for ac_lib in '' dir; do
6317 if test -z "$ac_lib"; then
6318 ac_res="none required"
6319 else
6320 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006321 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006322 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006323 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006324 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006325fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006326rm -f core conftest.err conftest.$ac_objext \
6327 conftest$ac_exeext
Gregory P. Smith69140482012-01-16 02:05:55 -08006328 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006329 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006330fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006331done
Gregory P. Smith69140482012-01-16 02:05:55 -08006332if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006333
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006334else
6335 ac_cv_search_opendir=no
6336fi
6337rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006338LIBS=$ac_func_search_save_LIBS
6339fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6341$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006342ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006343if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006344 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006345
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006346fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006347
Michael W. Hudson54241132001-12-07 15:38:26 +00006348else
Matthias Kloseb9621712010-04-24 17:59:49 +00006349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6350$as_echo_n "checking for library containing opendir... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006351if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006352 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006353else
6354 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006356/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006357
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006358/* Override any GCC internal prototype to avoid an error.
6359 Use char because int might match the return type of a GCC
6360 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006361#ifdef __cplusplus
6362extern "C"
6363#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006364char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006365int
6366main ()
6367{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006368return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006369 ;
6370 return 0;
6371}
6372_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006373for ac_lib in '' x; do
6374 if test -z "$ac_lib"; then
6375 ac_res="none required"
6376 else
6377 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006378 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006379 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006380 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006381 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006382fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006383rm -f core conftest.err conftest.$ac_objext \
6384 conftest$ac_exeext
Gregory P. Smith69140482012-01-16 02:05:55 -08006385 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006386 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006387fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006388done
Gregory P. Smith69140482012-01-16 02:05:55 -08006389if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006390
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006391else
6392 ac_cv_search_opendir=no
6393fi
6394rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006395LIBS=$ac_func_search_save_LIBS
6396fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6398$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006399ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006400if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006401 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006402
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006403fi
6404
6405fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006406
Matthias Kloseb9621712010-04-24 17:59:49 +00006407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6408$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006409if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006410 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006411else
Matthias Kloseb9621712010-04-24 17:59:49 +00006412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006413/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006414#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006415int
6416main ()
6417{
6418return makedev(0, 0);
6419 ;
6420 return 0;
6421}
6422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006423if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006424 ac_cv_header_sys_types_h_makedev=yes
6425else
Matthias Kloseb9621712010-04-24 17:59:49 +00006426 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006427fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006428rm -f core conftest.err conftest.$ac_objext \
6429 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006430
6431fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6433$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006434
6435if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006436ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006437if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006438
Matthias Kloseb9621712010-04-24 17:59:49 +00006439$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006440
6441fi
6442
6443
6444
6445 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006446 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006447if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006448
Matthias Kloseb9621712010-04-24 17:59:49 +00006449$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006450
6451fi
6452
6453
6454 fi
6455fi
6456
Michael W. Hudson54241132001-12-07 15:38:26 +00006457
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006458# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006459for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006460do :
6461 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006462#ifdef HAVE_CURSES_H
6463#include <curses.h>
6464#endif
6465
Matthias Kloseb9621712010-04-24 17:59:49 +00006466"
Gregory P. Smith69140482012-01-16 02:05:55 -08006467if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006468 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006469#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006470_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006471
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006472fi
6473
6474done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006475
6476
Martin v. Löwis11017b12006-01-14 18:12:57 +00006477# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006478for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006479do :
6480 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 +00006481#ifdef HAVE_ASM_TYPES_H
6482#include <asm/types.h>
6483#endif
6484#ifdef HAVE_SYS_SOCKET_H
6485#include <sys/socket.h>
6486#endif
6487
Matthias Kloseb9621712010-04-24 17:59:49 +00006488"
Gregory P. Smith69140482012-01-16 02:05:55 -08006489if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006490 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006491#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006492_ACEOF
6493
6494fi
6495
6496done
6497
6498
Guido van Rossum627b2d71993-12-24 10:39:16 +00006499# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006500was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6502$as_echo_n "checking for clock_t in time.h... " >&6; }
6503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006504/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006505#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006506
6507_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006508if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006509 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006510 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006511else
Martin v. Löwis11437992002-04-12 09:54:03 +00006512
6513
Matthias Kloseb9621712010-04-24 17:59:49 +00006514$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006515
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006516
Guido van Rossum627b2d71993-12-24 10:39:16 +00006517fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006518rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006519
Matthias Kloseb9621712010-04-24 17:59:49 +00006520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6521$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006522
Neal Norwitz11690112002-07-30 01:08:28 +00006523# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6525$as_echo_n "checking for makedev... " >&6; }
6526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006527/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006528
Jesus Cea740f53a2010-04-28 11:35:30 +00006529#if defined(MAJOR_IN_MKDEV)
6530#include <sys/mkdev.h>
6531#elif defined(MAJOR_IN_SYSMACROS)
6532#include <sys/sysmacros.h>
6533#else
6534#include <sys/types.h>
6535#endif
6536
Neal Norwitz11690112002-07-30 01:08:28 +00006537int
6538main ()
6539{
Jesus Cea740f53a2010-04-28 11:35:30 +00006540
6541 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006542 ;
6543 return 0;
6544}
Matthias Kloseb159a552010-04-25 21:00:44 +00006545
Neal Norwitz11690112002-07-30 01:08:28 +00006546_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006547if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006548 ac_cv_has_makedev=yes
6549else
Matthias Kloseb9621712010-04-24 17:59:49 +00006550 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006551fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006552rm -f core conftest.err conftest.$ac_objext \
6553 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006554if test "$ac_cv_has_makedev" = "no"; then
6555 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006557/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006558
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006559#define _OSF_SOURCE 1
6560#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006561
Neal Norwitz11690112002-07-30 01:08:28 +00006562int
6563main ()
6564{
6565 makedev(0, 0)
6566 ;
6567 return 0;
6568}
6569_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006570if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006571 ac_cv_has_makedev=yes
6572else
Matthias Kloseb9621712010-04-24 17:59:49 +00006573 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006574fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006575rm -f core conftest.err conftest.$ac_objext \
6576 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006577 if test "$ac_cv_has_makedev" = "yes"; then
6578
Matthias Kloseb9621712010-04-24 17:59:49 +00006579$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006580
6581 fi
6582fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6584$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006585if test "$ac_cv_has_makedev" = "yes"; then
6586
Matthias Kloseb9621712010-04-24 17:59:49 +00006587$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006588
6589fi
6590
Martin v. Löwis399a6892002-10-04 10:22:02 +00006591# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6592# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6593# defined, but the compiler does not support pragma redefine_extname,
6594# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6595# structures (such as rlimit64) without declaring them. As a
6596# work-around, disable LFS on such configurations
6597
6598use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6600$as_echo_n "checking Solaris LFS bug... " >&6; }
6601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006602/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006603
6604#define _LARGEFILE_SOURCE 1
6605#define _FILE_OFFSET_BITS 64
6606#include <sys/resource.h>
6607
Martin v. Löwis399a6892002-10-04 10:22:02 +00006608int
6609main ()
6610{
6611struct rlimit foo;
6612 ;
6613 return 0;
6614}
6615_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006616if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006617 sol_lfs_bug=no
6618else
Matthias Kloseb9621712010-04-24 17:59:49 +00006619 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006620fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6623$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006624if test "$sol_lfs_bug" = "yes"; then
6625 use_lfs=no
6626fi
6627
6628if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006629# Two defines needed to enable largefile support on various platforms
6630# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006631case $ac_sys_system/$ac_sys_release in
6632AIX*)
6633
6634$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6635
6636 ;;
6637esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006638
Matthias Kloseb9621712010-04-24 17:59:49 +00006639$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006640
6641
Matthias Kloseb9621712010-04-24 17:59:49 +00006642$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006643
Martin v. Löwis399a6892002-10-04 10:22:02 +00006644fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006645
Guido van Rossum84e7b241996-08-19 21:59:00 +00006646# Add some code to confdefs.h so that the test for off_t works on SCO
6647cat >> confdefs.h <<\EOF
6648#if defined(SCO_DS)
6649#undef _OFF_T
6650#endif
6651EOF
6652
Guido van Rossumef2255b2000-03-10 22:30:29 +00006653# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006654ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006655if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006656
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006657else
Martin v. Löwis11437992002-04-12 09:54:03 +00006658
6659cat >>confdefs.h <<_ACEOF
6660#define mode_t int
6661_ACEOF
6662
6663fi
6664
Matthias Kloseb9621712010-04-24 17:59:49 +00006665ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006666if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006667
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006668else
Martin v. Löwis11437992002-04-12 09:54:03 +00006669
6670cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006671#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006672_ACEOF
6673
6674fi
6675
Matthias Kloseb9621712010-04-24 17:59:49 +00006676ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006677if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006678
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006679else
Martin v. Löwis11437992002-04-12 09:54:03 +00006680
6681cat >>confdefs.h <<_ACEOF
6682#define pid_t int
6683_ACEOF
6684
6685fi
6686
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006687
Martin v. Löwis11437992002-04-12 09:54:03 +00006688cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006689#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006690_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006691
Matthias Kloseb9621712010-04-24 17:59:49 +00006692ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006693if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006694
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006695else
Martin v. Löwis11437992002-04-12 09:54:03 +00006696
6697cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006698#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006699_ACEOF
6700
6701fi
6702
Matthias Kloseb9621712010-04-24 17:59:49 +00006703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6704$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006705if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006706 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006707else
Matthias Kloseb9621712010-04-24 17:59:49 +00006708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006709/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006710#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006711
6712_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006713if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006714 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006715 ac_cv_type_uid_t=yes
6716else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006717 ac_cv_type_uid_t=no
6718fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006719rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006720
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6723$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006724if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006725
Matthias Kloseb9621712010-04-24 17:59:49 +00006726$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006727
6728
Matthias Kloseb9621712010-04-24 17:59:49 +00006729$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006730
6731fi
6732
Matthias Kloseb9621712010-04-24 17:59:49 +00006733ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6734case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006735 no|yes) ;; #(
6736 *)
6737
Matthias Kloseb9621712010-04-24 17:59:49 +00006738$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006739
6740
6741cat >>confdefs.h <<_ACEOF
6742#define uint32_t $ac_cv_c_uint32_t
6743_ACEOF
6744;;
6745 esac
6746
Matthias Kloseb9621712010-04-24 17:59:49 +00006747ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6748case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006749 no|yes) ;; #(
6750 *)
6751
Matthias Kloseb9621712010-04-24 17:59:49 +00006752$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006753
6754
6755cat >>confdefs.h <<_ACEOF
6756#define uint64_t $ac_cv_c_uint64_t
6757_ACEOF
6758;;
6759 esac
6760
Matthias Kloseb9621712010-04-24 17:59:49 +00006761ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6762case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006763 no|yes) ;; #(
6764 *)
6765
6766cat >>confdefs.h <<_ACEOF
6767#define int32_t $ac_cv_c_int32_t
6768_ACEOF
6769;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006770esac
6771
Matthias Kloseb9621712010-04-24 17:59:49 +00006772ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6773case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006774 no|yes) ;; #(
6775 *)
6776
6777cat >>confdefs.h <<_ACEOF
6778#define int64_t $ac_cv_c_int64_t
6779_ACEOF
6780;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006781esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006782
Matthias Kloseb9621712010-04-24 17:59:49 +00006783ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006784if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006785
Matthias Kloseb9621712010-04-24 17:59:49 +00006786$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006787
6788fi
6789
Jack Jansendd19cf82001-12-06 22:36:17 +00006790
Michael W. Hudson54241132001-12-07 15:38:26 +00006791# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006792# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006793# The cast to long int works around a bug in the HP C Compiler
6794# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6795# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6796# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6798$as_echo_n "checking size of int... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006799if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006800 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006801else
Matthias Kloseb9621712010-04-24 17:59:49 +00006802 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 +00006803
Martin v. Löwis11437992002-04-12 09:54:03 +00006804else
Matthias Kloseb9621712010-04-24 17:59:49 +00006805 if test "$ac_cv_type_int" = yes; then
6806 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6807$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006808as_fn_error 77 "cannot compute sizeof (int)
Gregory P. Smith69140482012-01-16 02:05:55 -08006809See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006810 else
6811 ac_cv_sizeof_int=0
6812 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006813fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006814
Martin v. Löwis11437992002-04-12 09:54:03 +00006815fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6817$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006818
6819
6820
Martin v. Löwis11437992002-04-12 09:54:03 +00006821cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006822#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006823_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006824
6825
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006826# The cast to long int works around a bug in the HP C Compiler
6827# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6828# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6829# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6831$as_echo_n "checking size of long... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006832if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006833 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006834else
Matthias Kloseb9621712010-04-24 17:59:49 +00006835 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 +00006836
Martin v. Löwis11437992002-04-12 09:54:03 +00006837else
Matthias Kloseb9621712010-04-24 17:59:49 +00006838 if test "$ac_cv_type_long" = yes; then
6839 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6840$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006841as_fn_error 77 "cannot compute sizeof (long)
Gregory P. Smith69140482012-01-16 02:05:55 -08006842See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006843 else
6844 ac_cv_sizeof_long=0
6845 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006847
Martin v. Löwis11437992002-04-12 09:54:03 +00006848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6850$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006851
6852
6853
Martin v. Löwis11437992002-04-12 09:54:03 +00006854cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006855#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006856_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006857
6858
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006859# The cast to long int works around a bug in the HP C Compiler
6860# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6861# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6862# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6864$as_echo_n "checking size of void *... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006865if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006866 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006867else
Matthias Kloseb9621712010-04-24 17:59:49 +00006868 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 +00006869
Martin v. Löwis11437992002-04-12 09:54:03 +00006870else
Matthias Kloseb9621712010-04-24 17:59:49 +00006871 if test "$ac_cv_type_void_p" = yes; then
6872 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6873$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006874as_fn_error 77 "cannot compute sizeof (void *)
Gregory P. Smith69140482012-01-16 02:05:55 -08006875See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006876 else
6877 ac_cv_sizeof_void_p=0
6878 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006879fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006880
Martin v. Löwis11437992002-04-12 09:54:03 +00006881fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6883$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006884
6885
6886
Martin v. Löwis11437992002-04-12 09:54:03 +00006887cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006888#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006889_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006890
6891
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006892# The cast to long int works around a bug in the HP C Compiler
6893# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6894# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6895# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6897$as_echo_n "checking size of short... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006898if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006899 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006900else
Matthias Kloseb9621712010-04-24 17:59:49 +00006901 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 +00006902
Martin v. Löwis11437992002-04-12 09:54:03 +00006903else
Matthias Kloseb9621712010-04-24 17:59:49 +00006904 if test "$ac_cv_type_short" = yes; then
6905 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6906$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006907as_fn_error 77 "cannot compute sizeof (short)
Gregory P. Smith69140482012-01-16 02:05:55 -08006908See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006909 else
6910 ac_cv_sizeof_short=0
6911 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006913
Martin v. Löwis11437992002-04-12 09:54:03 +00006914fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6916$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006917
6918
6919
Martin v. Löwis11437992002-04-12 09:54:03 +00006920cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006921#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006922_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006923
6924
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006925# The cast to long int works around a bug in the HP C Compiler
6926# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6927# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6928# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6930$as_echo_n "checking size of float... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006931if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006932 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006933else
Matthias Kloseb9621712010-04-24 17:59:49 +00006934 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 +00006935
Martin v. Löwis11437992002-04-12 09:54:03 +00006936else
Matthias Kloseb9621712010-04-24 17:59:49 +00006937 if test "$ac_cv_type_float" = yes; then
6938 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6939$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006940as_fn_error 77 "cannot compute sizeof (float)
Gregory P. Smith69140482012-01-16 02:05:55 -08006941See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006942 else
6943 ac_cv_sizeof_float=0
6944 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006945fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006946
Martin v. Löwis11437992002-04-12 09:54:03 +00006947fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6949$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006950
6951
6952
Martin v. Löwis11437992002-04-12 09:54:03 +00006953cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006954#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006955_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006956
6957
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006958# The cast to long int works around a bug in the HP C Compiler
6959# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6960# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6961# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6963$as_echo_n "checking size of double... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006964if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006965 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006966else
Matthias Kloseb9621712010-04-24 17:59:49 +00006967 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 +00006968
Martin v. Löwis11437992002-04-12 09:54:03 +00006969else
Matthias Kloseb9621712010-04-24 17:59:49 +00006970 if test "$ac_cv_type_double" = yes; then
6971 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6972$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006973as_fn_error 77 "cannot compute sizeof (double)
Gregory P. Smith69140482012-01-16 02:05:55 -08006974See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006975 else
6976 ac_cv_sizeof_double=0
6977 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006978fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006979
Martin v. Löwis11437992002-04-12 09:54:03 +00006980fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6982$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006983
6984
6985
Martin v. Löwis11437992002-04-12 09:54:03 +00006986cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006987#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006988_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006989
6990
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006991# The cast to long int works around a bug in the HP C Compiler
6992# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6993# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6994# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6996$as_echo_n "checking size of fpos_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006997if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006998 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006999else
Matthias Kloseb9621712010-04-24 17:59:49 +00007000 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 +00007001
Martin v. Löwis11437992002-04-12 09:54:03 +00007002else
Matthias Kloseb9621712010-04-24 17:59:49 +00007003 if test "$ac_cv_type_fpos_t" = yes; then
7004 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7005$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007006as_fn_error 77 "cannot compute sizeof (fpos_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007007See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007008 else
7009 ac_cv_sizeof_fpos_t=0
7010 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007011fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007012
Martin v. Löwis11437992002-04-12 09:54:03 +00007013fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7015$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007016
7017
7018
Martin v. Löwis11437992002-04-12 09:54:03 +00007019cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007020#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007021_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007022
Michael W. Hudson54241132001-12-07 15:38:26 +00007023
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007024# The cast to long int works around a bug in the HP C Compiler
7025# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7026# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7027# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7029$as_echo_n "checking size of size_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007030if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007031 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007032else
Matthias Kloseb9621712010-04-24 17:59:49 +00007033 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 +00007034
Martin v. Löwis18e16552006-02-15 17:27:45 +00007035else
Matthias Kloseb9621712010-04-24 17:59:49 +00007036 if test "$ac_cv_type_size_t" = yes; then
7037 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7038$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007039as_fn_error 77 "cannot compute sizeof (size_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007040See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007041 else
7042 ac_cv_sizeof_size_t=0
7043 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007044fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007045
Martin v. Löwis18e16552006-02-15 17:27:45 +00007046fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7048$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007049
7050
7051
Martin v. Löwis18e16552006-02-15 17:27:45 +00007052cat >>confdefs.h <<_ACEOF
7053#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7054_ACEOF
7055
7056
Christian Heimes400adb02008-02-01 08:12:03 +00007057# The cast to long int works around a bug in the HP C Compiler
7058# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7059# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7060# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7062$as_echo_n "checking size of pid_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007063if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007064 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007065else
Matthias Kloseb9621712010-04-24 17:59:49 +00007066 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 +00007067
Christian Heimes400adb02008-02-01 08:12:03 +00007068else
Matthias Kloseb9621712010-04-24 17:59:49 +00007069 if test "$ac_cv_type_pid_t" = yes; then
7070 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7071$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007072as_fn_error 77 "cannot compute sizeof (pid_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007073See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007074 else
7075 ac_cv_sizeof_pid_t=0
7076 fi
7077fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007078
Christian Heimes400adb02008-02-01 08:12:03 +00007079fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7081$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007082
7083
7084
7085cat >>confdefs.h <<_ACEOF
7086#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7087_ACEOF
7088
7089
Michael W. Hudson54241132001-12-07 15:38:26 +00007090
Matthias Kloseb9621712010-04-24 17:59:49 +00007091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7092$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007093have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007095/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007096
Martin v. Löwis11437992002-04-12 09:54:03 +00007097int
7098main ()
7099{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007100long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007101 ;
7102 return 0;
7103}
7104_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007105if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007106
7107
Matthias Kloseb9621712010-04-24 17:59:49 +00007108$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007109
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007110 have_long_long=yes
7111
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007112fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7115$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007116if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007117# The cast to long int works around a bug in the HP C Compiler
7118# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7119# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7120# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7122$as_echo_n "checking size of long long... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007123if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007124 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007125else
Matthias Kloseb9621712010-04-24 17:59:49 +00007126 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 +00007127
Martin v. Löwis11437992002-04-12 09:54:03 +00007128else
Matthias Kloseb9621712010-04-24 17:59:49 +00007129 if test "$ac_cv_type_long_long" = yes; then
7130 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7131$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007132as_fn_error 77 "cannot compute sizeof (long long)
Gregory P. Smith69140482012-01-16 02:05:55 -08007133See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007134 else
7135 ac_cv_sizeof_long_long=0
7136 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007137fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007138
Martin v. Löwis11437992002-04-12 09:54:03 +00007139fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7141$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007142
7143
7144
Martin v. Löwis11437992002-04-12 09:54:03 +00007145cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007146#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007147_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007148
Michael W. Hudson54241132001-12-07 15:38:26 +00007149
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007150fi
7151
Matthias Kloseb9621712010-04-24 17:59:49 +00007152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7153$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007154have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007156/* end confdefs.h. */
7157
7158int
7159main ()
7160{
7161long double x; x = (long double)0;
7162 ;
7163 return 0;
7164}
7165_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007166if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007167
7168
Matthias Kloseb9621712010-04-24 17:59:49 +00007169$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007170
7171 have_long_double=yes
7172
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007173fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7176$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007177if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007178# The cast to long int works around a bug in the HP C Compiler
7179# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7180# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7181# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7183$as_echo_n "checking size of long double... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007184if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007185 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007186else
Matthias Kloseb9621712010-04-24 17:59:49 +00007187 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 +00007188
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007189else
Matthias Kloseb9621712010-04-24 17:59:49 +00007190 if test "$ac_cv_type_long_double" = yes; then
7191 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7192$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007193as_fn_error 77 "cannot compute sizeof (long double)
Gregory P. Smith69140482012-01-16 02:05:55 -08007194See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007195 else
7196 ac_cv_sizeof_long_double=0
7197 fi
7198fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007199
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007200fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7202$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007203
7204
7205
7206cat >>confdefs.h <<_ACEOF
7207#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7208_ACEOF
7209
7210
7211fi
7212
7213
Matthias Kloseb9621712010-04-24 17:59:49 +00007214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7215$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007216have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007218/* end confdefs.h. */
7219
7220int
7221main ()
7222{
7223_Bool x; x = (_Bool)0;
7224 ;
7225 return 0;
7226}
7227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007228if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007229
7230
Matthias Kloseb9621712010-04-24 17:59:49 +00007231$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007232
7233 have_c99_bool=yes
7234
Thomas Woutersb2137042007-02-01 18:02:27 +00007235fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7238$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007239if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007240# The cast to long int works around a bug in the HP C Compiler
7241# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7242# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7243# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7245$as_echo_n "checking size of _Bool... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007246if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007247 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007248else
Matthias Kloseb9621712010-04-24 17:59:49 +00007249 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 +00007250
Thomas Woutersb2137042007-02-01 18:02:27 +00007251else
Matthias Kloseb9621712010-04-24 17:59:49 +00007252 if test "$ac_cv_type__Bool" = yes; then
7253 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7254$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007255as_fn_error 77 "cannot compute sizeof (_Bool)
Gregory P. Smith69140482012-01-16 02:05:55 -08007256See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007257 else
7258 ac_cv_sizeof__Bool=0
7259 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007260fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007261
Thomas Woutersb2137042007-02-01 18:02:27 +00007262fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7264$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007265
7266
7267
Thomas Woutersb2137042007-02-01 18:02:27 +00007268cat >>confdefs.h <<_ACEOF
7269#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7270_ACEOF
7271
7272
7273fi
7274
Matthias Kloseb9621712010-04-24 17:59:49 +00007275ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007276 #include <stdint.h>
7277 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007278 #ifdef HAVE_INTTYPES_H
7279 #include <inttypes.h>
7280 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007281"
Gregory P. Smith69140482012-01-16 02:05:55 -08007282if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007283
7284cat >>confdefs.h <<_ACEOF
7285#define HAVE_UINTPTR_T 1
7286_ACEOF
7287
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007288# The cast to long int works around a bug in the HP C Compiler
7289# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7290# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7291# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7293$as_echo_n "checking size of uintptr_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007294if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007295 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007296else
Matthias Kloseb9621712010-04-24 17:59:49 +00007297 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 +00007298
Martin v. Löwis11437992002-04-12 09:54:03 +00007299else
Matthias Kloseb9621712010-04-24 17:59:49 +00007300 if test "$ac_cv_type_uintptr_t" = yes; then
7301 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7302$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007303as_fn_error 77 "cannot compute sizeof (uintptr_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007304See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007305 else
7306 ac_cv_sizeof_uintptr_t=0
7307 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007308fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007309
Martin v. Löwis11437992002-04-12 09:54:03 +00007310fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7312$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007313
7314
7315
Martin v. Löwis11437992002-04-12 09:54:03 +00007316cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007317#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007318_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007319
Michael W. Hudson54241132001-12-07 15:38:26 +00007320
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007321fi
7322
Thomas Wouters89f507f2006-12-13 04:49:30 +00007323
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007324# The cast to long int works around a bug in the HP C Compiler
7325# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7326# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7327# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7329$as_echo_n "checking size of off_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007330if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007331 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007332else
Matthias Kloseb9621712010-04-24 17:59:49 +00007333 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007334#ifdef HAVE_SYS_TYPES_H
7335#include <sys/types.h>
7336#endif
7337
Matthias Kloseb9621712010-04-24 17:59:49 +00007338"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007339
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007340else
Matthias Kloseb9621712010-04-24 17:59:49 +00007341 if test "$ac_cv_type_off_t" = yes; then
7342 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7343$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007344as_fn_error 77 "cannot compute sizeof (off_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007345See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007346 else
7347 ac_cv_sizeof_off_t=0
7348 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007349fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007350
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007351fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7353$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007354
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007355
7356
Martin v. Löwis11437992002-04-12 09:54:03 +00007357cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007358#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007359_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007360
Michael W. Hudson54241132001-12-07 15:38:26 +00007361
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007362
Matthias Kloseb9621712010-04-24 17:59:49 +00007363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7364$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007365if test "$have_long_long" = yes
7366then
7367if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007368 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007369
Matthias Kloseb9621712010-04-24 17:59:49 +00007370$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007371
Matthias Kloseb9621712010-04-24 17:59:49 +00007372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7373$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007374else
Matthias Kloseb9621712010-04-24 17:59:49 +00007375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7376$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007377fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007378else
Matthias Kloseb9621712010-04-24 17:59:49 +00007379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7380$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007381fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007382
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007383# The cast to long int works around a bug in the HP C Compiler
7384# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7385# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7386# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7388$as_echo_n "checking size of time_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007389if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007390 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007391else
Matthias Kloseb9621712010-04-24 17:59:49 +00007392 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007393#ifdef HAVE_SYS_TYPES_H
7394#include <sys/types.h>
7395#endif
7396#ifdef HAVE_TIME_H
7397#include <time.h>
7398#endif
7399
Matthias Kloseb9621712010-04-24 17:59:49 +00007400"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007401
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007402else
Matthias Kloseb9621712010-04-24 17:59:49 +00007403 if test "$ac_cv_type_time_t" = yes; then
7404 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7405$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007406as_fn_error 77 "cannot compute sizeof (time_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007407See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007408 else
7409 ac_cv_sizeof_time_t=0
7410 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007411fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007412
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007413fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7415$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007416
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007417
7418
Martin v. Löwis11437992002-04-12 09:54:03 +00007419cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007420#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007421_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007422
Michael W. Hudson54241132001-12-07 15:38:26 +00007423
7424
Trent Mick635f6fb2000-08-23 21:33:05 +00007425# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007426ac_save_cc="$CC"
7427if test "$ac_cv_kpthread" = "yes"
7428then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007429elif test "$ac_cv_kthread" = "yes"
7430then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007431elif test "$ac_cv_pthread" = "yes"
7432then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007433fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007434
Matthias Kloseb9621712010-04-24 17:59:49 +00007435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7436$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007437have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007439/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007440
7441 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007442int
7443main ()
7444{
Guido van Rossum12580492000-09-24 16:47:19 +00007445pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007446 ;
7447 return 0;
7448}
Matthias Kloseb159a552010-04-25 21:00:44 +00007449
Martin v. Löwis11437992002-04-12 09:54:03 +00007450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007451if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007452 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7456$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007457if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007458 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007459# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7460# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7461# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7463$as_echo_n "checking size of pthread_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007464if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007465 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007466else
Matthias Kloseb9621712010-04-24 17:59:49 +00007467 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007468#ifdef HAVE_PTHREAD_H
7469#include <pthread.h>
7470#endif
7471
Matthias Kloseb9621712010-04-24 17:59:49 +00007472"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007473
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007474else
Matthias Kloseb9621712010-04-24 17:59:49 +00007475 if test "$ac_cv_type_pthread_t" = yes; then
7476 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7477$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007478as_fn_error 77 "cannot compute sizeof (pthread_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007479See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007480 else
7481 ac_cv_sizeof_pthread_t=0
7482 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007483fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007484
Trent Mick635f6fb2000-08-23 21:33:05 +00007485fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7487$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007488
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007489
7490
Martin v. Löwis11437992002-04-12 09:54:03 +00007491cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007492#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007493_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007494
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007495
Trent Mick635f6fb2000-08-23 21:33:05 +00007496fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007497CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007498
Michael W. Hudson54241132001-12-07 15:38:26 +00007499
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007500case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007501 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007502 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7503 ;;
7504 Darwin/*)
7505 OTHER_LIBTOOL_OPT=""
7506 ;;
7507esac
7508
7509
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007510ARCH_RUN_32BIT=""
7511
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007512case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007513 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007514 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7515 if test "${enable_universalsdk}"; then
7516 :
7517 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007518 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007519 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007520 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007521 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007522 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007523 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007524 if test ${gcc_version} '<' 4.0
7525 then
7526 LIBTOOL_CRUFT="-lcc_dynamic"
7527 else
7528 LIBTOOL_CRUFT=""
7529 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007530 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007531 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007532else
Matthias Kloseb9621712010-04-24 17:59:49 +00007533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007534/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007535
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007536 #include <unistd.h>
7537 int main(int argc, char*argv[])
7538 {
7539 if (sizeof(long) == 4) {
7540 return 0;
7541 } else {
7542 return 1;
7543 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007544 }
7545
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007546_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007547if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007548 ac_osx_32bit=yes
7549else
Matthias Kloseb9621712010-04-24 17:59:49 +00007550 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007551fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007552rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7553 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007554fi
7555
7556
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007557 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007558 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007559 i386)
7560 MACOSX_DEFAULT_ARCH="i386"
7561 ;;
7562 ppc)
7563 MACOSX_DEFAULT_ARCH="ppc"
7564 ;;
7565 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007566 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007567 ;;
7568 esac
7569 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007570 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007571 i386)
7572 MACOSX_DEFAULT_ARCH="x86_64"
7573 ;;
7574 ppc)
7575 MACOSX_DEFAULT_ARCH="ppc64"
7576 ;;
7577 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007578 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007579 ;;
7580 esac
7581
7582 #ARCH_RUN_32BIT="true"
7583 fi
7584
7585 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007586 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007587 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007588esac
7589
Matthias Kloseb9621712010-04-24 17:59:49 +00007590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7591$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007592if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007593then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007594 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007595 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007596 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007597
Matthias Kloseb9621712010-04-24 17:59:49 +00007598$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007599
Matthias Kloseb9621712010-04-24 17:59:49 +00007600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7601$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007602 if test $enable_shared = "yes"
7603 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007604 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 +00007605 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007606else
Matthias Kloseb9621712010-04-24 17:59:49 +00007607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7608$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007609fi
7610
Matthias Kloseb9621712010-04-24 17:59:49 +00007611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7612$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007613case $ac_sys_system/$ac_sys_release in
7614 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007615
Matthias Kloseb9621712010-04-24 17:59:49 +00007616$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007617
Matthias Kloseb9621712010-04-24 17:59:49 +00007618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7619$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007620 ;;
7621 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7623$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007624 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007625esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007626
Guido van Rossum0a516c91994-09-12 10:58:40 +00007627# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007628
Michael W. Hudson54241132001-12-07 15:38:26 +00007629
7630
7631
7632
Benjamin Peterson99f03762010-04-11 22:15:28 +00007633
Thomas Wouters477c8d52006-05-27 19:21:47 +00007634
Georg Brandlb1441c72009-01-03 22:33:39 +00007635
Thomas Wouters477c8d52006-05-27 19:21:47 +00007636cat >>confdefs.h <<_ACEOF
7637#define SHLIB_EXT "$SO"
7638_ACEOF
7639
Guido van Rossum0a516c91994-09-12 10:58:40 +00007640# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007641# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007642# (Shared libraries in this instance are shared modules to be loaded into
7643# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7645$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007646if test -z "$LDSHARED"
7647then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007648 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007649 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007650 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007651 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007652 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007653 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007654 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007655 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007656 if test "$GCC" = "yes" ; then
7657 LDSHARED='$(CC) -shared'
7658 LDCXXSHARED='$(CXX) -shared'
7659 else
7660 LDSHARED='$(CC) -G'
7661 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007662 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007663 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007664 if test "$GCC" = "yes" ; then
7665 LDSHARED='$(CC) -shared'
7666 LDCXXSHARED='$(CXX) -shared'
7667 else
7668 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007669 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007670 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007671 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007672 LDSHARED='$(CC) -bundle'
7673 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007674 if test "$enable_framework" ; then
7675 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007676 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7677 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007678 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007679 else
7680 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007681 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007682 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007683 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007684 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007685 LDSHARED='$(CC) -bundle'
7686 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007687 if test "$enable_framework" ; then
7688 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007689 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7690 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007691 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007692 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007693 # No framework, use the Python app as bundle-loader
7694 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007695 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007696 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007697 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007698 Darwin/*)
7699 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7700 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007701
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007702 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007703 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007704 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007705 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007706 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007707 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7708 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007709 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007710 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007711 LDSHARED='$(CC) -bundle'
7712 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007713 if test "$enable_framework" ; then
7714 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007715 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7716 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007717 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007718 else
7719 # No framework, use the Python app as bundle-loader
7720 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7721 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007722 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007723 fi
7724 fi
7725 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007726 Linux*|GNU*|QNX*)
7727 LDSHARED='$(CC) -shared'
7728 LDCXXSHARED='$(CXX) -shared';;
7729 BSD/OS*/4*)
7730 LDSHARED="gcc -shared"
7731 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007732 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007733 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007734 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007735 LDSHARED='$(CC) -shared'
7736 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007737 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007738 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007739 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007740 OpenBSD*)
7741 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7742 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007743 LDSHARED='$(CC) -shared $(CCSHARED)'
7744 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007745 else
7746 case `uname -r` in
7747 [01].* | 2.[0-7] | 2.[0-7].*)
7748 LDSHARED="ld -Bshareable ${LDFLAGS}"
7749 ;;
7750 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007751 LDSHARED='$(CC) -shared $(CCSHARED)'
7752 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007753 ;;
7754 esac
7755 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007756 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007757 LDSHARED='$(CC) -shared'
7758 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007759 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007760 if test "$GCC" = "yes" ; then
7761 LDSHARED='$(CC) -shared'
7762 LDCXXSHARED='$(CXX) -shared'
7763 else
7764 LDSHARED='$(CC) -G'
7765 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007766 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007767 SCO_SV*)
7768 LDSHARED='$(CC) -Wl,-G,-Bexport'
7769 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7770 CYGWIN*)
7771 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7772 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007773 *) LDSHARED="ld";;
7774 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7777$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007778LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007779BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007780# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007781# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7783$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007784if test -z "$CCSHARED"
7785then
Guido van Rossum07397971997-04-29 21:49:50 +00007786 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007787 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007788 then CCSHARED="-fPIC";
7789 elif test `uname -p` = sparc;
7790 then CCSHARED="-xcode=pic32";
7791 else CCSHARED="-Kpic";
7792 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007793 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007794 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007795 else CCSHARED="+z";
7796 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007797 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007798 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007799 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007800 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007801 if test "$GCC" = "yes"
7802 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007803 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007804 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007805 SCO_SV*)
7806 if test "$GCC" = "yes"
7807 then CCSHARED="-fPIC"
7808 else CCSHARED="-Kpic -belf"
7809 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007810 IRIX*/6*) case $CC in
7811 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007812 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007813 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007814 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007815fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7817$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007818# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007819# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7821$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007822if test -z "$LINKFORSHARED"
7823then
Guido van Rossum07397971997-04-29 21:49:50 +00007824 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007825 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007826 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007827 LINKFORSHARED="-Wl,-E -Wl,+s";;
7828# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007829 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007830 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007831 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007832 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007833 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007834 if test "$enable_framework"
7835 then
Jack Jansenda49e192005-01-07 13:08:22 +00007836 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007837 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007838 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007839 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007840 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007841 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007842 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007843 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7844 then
7845 LINKFORSHARED="-Wl,--export-dynamic"
7846 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007847 SunOS/5*) case $CC in
7848 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007849 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007850 then
7851 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007852 fi;;
7853 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007854 CYGWIN*)
7855 if test $enable_shared = "no"
7856 then
7857 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7858 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007859 QNX*)
7860 # -Wl,-E causes the symbols to be added to the dynamic
7861 # symbol table so that they can be found when a module
7862 # is loaded. -N 2048K causes the stack size to be set
7863 # to 2048 kilobytes so that the stack doesn't overflow
7864 # when running test_compile.py.
7865 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007866 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007867fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7869$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007870
Michael W. Hudson54241132001-12-07 15:38:26 +00007871
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007872
Matthias Kloseb9621712010-04-24 17:59:49 +00007873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7874$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007875if test ! "$LIBRARY" = "$LDLIBRARY"
7876then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007877 case $ac_sys_system in
7878 CYGWIN*)
7879 # Cygwin needs CCSHARED when building extension DLLs
7880 # but not when building the interpreter DLL.
7881 CFLAGSFORSHARED='';;
7882 *)
7883 CFLAGSFORSHARED='$(CCSHARED)'
7884 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007885fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7887$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007888
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007889# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7890# library (with --enable-shared).
7891# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007892# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7893# if it is not required, since it creates a dependency of the shared library
7894# to LIBS. This, in turn, means that applications linking the shared libpython
7895# don't need to link LIBS explicitly. The default should be only changed
7896# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007897
Matthias Kloseb9621712010-04-24 17:59:49 +00007898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7899$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007900case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007901 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007902 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007903esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7905$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007906
7907
Guido van Rossum627b2d71993-12-24 10:39:16 +00007908# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7910$as_echo_n "checking for dlopen in -ldl... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007911if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007912 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007913else
Martin v. Löwis11437992002-04-12 09:54:03 +00007914 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007915LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007917/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007918
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007919/* Override any GCC internal prototype to avoid an error.
7920 Use char because int might match the return type of a GCC
7921 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007922#ifdef __cplusplus
7923extern "C"
7924#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007925char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007926int
7927main ()
7928{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007929return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007930 ;
7931 return 0;
7932}
7933_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007934if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007935 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007936else
Matthias Kloseb9621712010-04-24 17:59:49 +00007937 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007938fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007939rm -f core conftest.err conftest.$ac_objext \
7940 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007941LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007942fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7944$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007945if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007946 cat >>confdefs.h <<_ACEOF
7947#define HAVE_LIBDL 1
7948_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007949
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007950 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007951
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007952fi
7953 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7955$as_echo_n "checking for shl_load in -ldld... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007956if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007957 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007958else
Martin v. Löwis11437992002-04-12 09:54:03 +00007959 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007960LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007961cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007962/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007963
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007964/* Override any GCC internal prototype to avoid an error.
7965 Use char because int might match the return type of a GCC
7966 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007967#ifdef __cplusplus
7968extern "C"
7969#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007970char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007971int
7972main ()
7973{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007974return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007975 ;
7976 return 0;
7977}
7978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007979if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007980 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007981else
Matthias Kloseb9621712010-04-24 17:59:49 +00007982 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007983fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007984rm -f core conftest.err conftest.$ac_objext \
7985 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007986LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007987fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7989$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007990if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007991 cat >>confdefs.h <<_ACEOF
7992#define HAVE_LIBDLD 1
7993_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007994
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007995 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007996
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007997fi
7998 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007999
Georg Brandlb1441c72009-01-03 22:33:39 +00008000# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008001if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8003$as_echo_n "checking for library containing sem_init... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008004if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008005 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008006else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008007 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008009/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008010
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008011/* Override any GCC internal prototype to avoid an error.
8012 Use char because int might match the return type of a GCC
8013 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008014#ifdef __cplusplus
8015extern "C"
8016#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008017char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008018int
8019main ()
8020{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008021return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008022 ;
8023 return 0;
8024}
8025_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008026for ac_lib in '' pthread rt posix4; do
8027 if test -z "$ac_lib"; then
8028 ac_res="none required"
8029 else
8030 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008031 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008032 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008033 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008034 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008035fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008036rm -f core conftest.err conftest.$ac_objext \
8037 conftest$ac_exeext
Gregory P. Smith69140482012-01-16 02:05:55 -08008038 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008039 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008040fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008041done
Gregory P. Smith69140482012-01-16 02:05:55 -08008042if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008043
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008044else
8045 ac_cv_search_sem_init=no
8046fi
8047rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008048LIBS=$ac_func_search_save_LIBS
8049fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8051$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008052ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008053if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008054 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008055
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008056fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008057 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008058 # posix4 on Solaris 2.6
8059 # pthread (first!) on Linux
8060fi
8061
Martin v. Löwis19d17342003-06-14 21:03:05 +00008062# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8064$as_echo_n "checking for textdomain in -lintl... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008065if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008066 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008067else
8068 ac_check_lib_save_LIBS=$LIBS
8069LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008071/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008072
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008073/* Override any GCC internal prototype to avoid an error.
8074 Use char because int might match the return type of a GCC
8075 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008076#ifdef __cplusplus
8077extern "C"
8078#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008079char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008080int
8081main ()
8082{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008083return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008084 ;
8085 return 0;
8086}
8087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008088if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008089 ac_cv_lib_intl_textdomain=yes
8090else
Matthias Kloseb9621712010-04-24 17:59:49 +00008091 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008092fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008093rm -f core conftest.err conftest.$ac_objext \
8094 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008095LIBS=$ac_check_lib_save_LIBS
8096fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8098$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008099if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008100
Matthias Kloseb9621712010-04-24 17:59:49 +00008101$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008102
Brett Cannonc6d936e2009-06-07 20:09:53 +00008103 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008104fi
8105
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008106
8107# checks for system dependent C++ extensions support
8108case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008109 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8110$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008112/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008113
Georg Brandl59e87bd2011-02-15 19:48:59 +00008114 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008115int
8116main ()
8117{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008118loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008119 ;
8120 return 0;
8121}
Matthias Kloseb159a552010-04-25 21:00:44 +00008122
Martin v. Löwis11437992002-04-12 09:54:03 +00008123_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008124if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008125
Matthias Kloseb159a552010-04-25 21:00:44 +00008126
Matthias Kloseb9621712010-04-24 17:59:49 +00008127$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008128
Matthias Kloseb159a552010-04-25 21:00:44 +00008129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008130$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008131
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008132else
Matthias Kloseb159a552010-04-25 21:00:44 +00008133
8134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008135$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008136
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008137fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008138rm -f core conftest.err conftest.$ac_objext \
8139 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008140 *) ;;
8141esac
8142
Guido van Rossum70c7f481998-03-26 18:44:10 +00008143# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8145$as_echo_n "checking for t_open in -lnsl... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008146if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008147 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008148else
Martin v. Löwis11437992002-04-12 09:54:03 +00008149 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008150LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008152/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008153
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008154/* Override any GCC internal prototype to avoid an error.
8155 Use char because int might match the return type of a GCC
8156 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008157#ifdef __cplusplus
8158extern "C"
8159#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008160char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008161int
8162main ()
8163{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008164return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008165 ;
8166 return 0;
8167}
8168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008169if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008170 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008171else
Matthias Kloseb9621712010-04-24 17:59:49 +00008172 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008173fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008174rm -f core conftest.err conftest.$ac_objext \
8175 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008176LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008177fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8179$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008180if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008181 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008182fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008183 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8185$as_echo_n "checking for socket in -lsocket... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008186if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008187 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008188else
Martin v. Löwis11437992002-04-12 09:54:03 +00008189 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008190LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008192/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008193
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008194/* Override any GCC internal prototype to avoid an error.
8195 Use char because int might match the return type of a GCC
8196 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008197#ifdef __cplusplus
8198extern "C"
8199#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008200char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008201int
8202main ()
8203{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008204return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008205 ;
8206 return 0;
8207}
8208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008209if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008210 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008211else
Matthias Kloseb9621712010-04-24 17:59:49 +00008212 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008213fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008214rm -f core conftest.err conftest.$ac_objext \
8215 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008216LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008217fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8219$as_echo "$ac_cv_lib_socket_socket" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008220if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008221 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008222fi
8223 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008224
Matthias Kloseb9621712010-04-24 17:59:49 +00008225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8226$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008227
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008228# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008229if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008230 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8232$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008233LIBS="$withval $LIBS"
8234
8235else
Matthias Kloseb9621712010-04-24 17:59:49 +00008236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8237$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008238fi
8239
Guido van Rossum7f43da71994-08-01 12:15:30 +00008240
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008241if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008242 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8243set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8245$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008246if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008247 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008248else
8249 case $PKG_CONFIG in
8250 [\\/]* | ?:[\\/]*)
8251 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8252 ;;
8253 *)
8254 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8255for as_dir in $PATH
8256do
8257 IFS=$as_save_IFS
8258 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008259 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008260 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8261 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008262 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008263 break 2
8264 fi
8265done
Matthias Kloseb9621712010-04-24 17:59:49 +00008266 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008267IFS=$as_save_IFS
8268
8269 ;;
8270esac
8271fi
8272PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8273if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8275$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008276else
Matthias Kloseb9621712010-04-24 17:59:49 +00008277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8278$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008279fi
8280
8281
8282fi
8283if test -z "$ac_cv_path_PKG_CONFIG"; then
8284 ac_pt_PKG_CONFIG=$PKG_CONFIG
8285 # Extract the first word of "pkg-config", so it can be a program name with args.
8286set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8288$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008289if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008290 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008291else
8292 case $ac_pt_PKG_CONFIG in
8293 [\\/]* | ?:[\\/]*)
8294 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8295 ;;
8296 *)
8297 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8298for as_dir in $PATH
8299do
8300 IFS=$as_save_IFS
8301 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008302 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008303 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8304 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008305 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008306 break 2
8307 fi
8308done
Matthias Kloseb9621712010-04-24 17:59:49 +00008309 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008310IFS=$as_save_IFS
8311
8312 ;;
8313esac
8314fi
8315ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8316if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8318$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008319else
Matthias Kloseb9621712010-04-24 17:59:49 +00008320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8321$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008322fi
8323
8324 if test "x$ac_pt_PKG_CONFIG" = x; then
8325 PKG_CONFIG=""
8326 else
8327 case $cross_compiling:$ac_tool_warned in
8328yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008329{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8330$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008331ac_tool_warned=yes ;;
8332esac
8333 PKG_CONFIG=$ac_pt_PKG_CONFIG
8334 fi
8335else
8336 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8337fi
8338
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008339
8340# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8342$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008343
8344# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008345if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008346 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008347else
8348 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008349fi
8350
8351
Matthias Kloseb9621712010-04-24 17:59:49 +00008352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8353$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008354
8355# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8357$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008358
8359# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008360if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008361 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008362else
8363 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008364fi
8365
8366
8367if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008368 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8369else
8370 LIBFFI_INCLUDEDIR=""
8371fi
8372
8373
Matthias Kloseb9621712010-04-24 17:59:49 +00008374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8375$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008376
Benjamin Peterson076ed002010-10-31 17:11:02 +00008377# Check for support for loadable sqlite extensions
8378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8379$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8380# Check whether --enable-loadable-sqlite-extensions was given.
8381if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8382 enableval=$enable_loadable_sqlite_extensions;
8383else
8384 enable_loadable_sqlite_extensions="no"
8385fi
8386
8387
8388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8389$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8390
Matthias Klose55708cc2009-04-30 08:06:49 +00008391# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8393$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008394
8395# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008396if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008397 withval=$with_dbmliborder;
8398if test x$with_dbmliborder = xyes
8399then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008400as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008401else
8402 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8403 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8404 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008405 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008406 fi
8407 done
8408fi
8409fi
8410
Matthias Kloseb9621712010-04-24 17:59:49 +00008411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8412$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008413
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008414# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008415
8416
Matthias Kloseb9621712010-04-24 17:59:49 +00008417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8418$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008419
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008420# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008421if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008422 withval=$with_signal_module;
8423fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008424
8425
8426if test -z "$with_signal_module"
8427then with_signal_module="yes"
8428fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8430$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008431
8432if test "${with_signal_module}" = "yes"; then
8433 USE_SIGNAL_MODULE=""
8434 SIGNAL_OBJS=""
8435else
8436 USE_SIGNAL_MODULE="#"
8437 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8438fi
8439
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008440# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008441
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008442USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008443
Matthias Kloseb9621712010-04-24 17:59:49 +00008444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8445$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008446
Guido van Rossumec2f0731997-01-22 20:54:01 +00008447
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008448# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008449if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008450 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8452$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008453LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008454if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008455 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008456fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008457else
Matthias Kloseb9621712010-04-24 17:59:49 +00008458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8459$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008460fi
8461
Martin v. Löwis11437992002-04-12 09:54:03 +00008462
8463# Templates for things AC_DEFINEd more than once.
8464# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008465
8466
Martin v. Löwis11437992002-04-12 09:54:03 +00008467
8468
Matthias Kloseb9621712010-04-24 17:59:49 +00008469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8470$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008471
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008472# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008473if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008474 withval=$with_threads;
8475fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008476
8477
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008478# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008479
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008480# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008481if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008482 withval=$with_thread; with_threads=$with_thread
8483fi
8484
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008485
8486if test -z "$with_threads"
8487then with_threads="yes"
8488fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8490$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008491
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008492
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008493if test "$with_threads" = "no"
8494then
8495 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008496elif test "$ac_cv_pthread_is_default" = yes
8497then
Matthias Kloseb9621712010-04-24 17:59:49 +00008498 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008499
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008500 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008501 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008502
8503 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008504 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008505elif test "$ac_cv_kpthread" = "yes"
8506then
8507 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008508 if test "$ac_cv_cxx_thread" = "yes"; then
8509 CXX="$CXX -Kpthread"
8510 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008511 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008512
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008513 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008514 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008515elif test "$ac_cv_kthread" = "yes"
8516then
8517 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008518 if test "$ac_cv_cxx_thread" = "yes"; then
8519 CXX="$CXX -Kthread"
8520 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008521 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008522
8523 posix_threads=yes
8524 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008525elif test "$ac_cv_pthread" = "yes"
8526then
8527 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008528 if test "$ac_cv_cxx_thread" = "yes"; then
8529 CXX="$CXX -pthread"
8530 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008531 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008532
8533 posix_threads=yes
8534 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008535else
8536 if test ! -z "$with_threads" -a -d "$with_threads"
8537 then LDFLAGS="$LDFLAGS -L$with_threads"
8538 fi
8539 if test ! -z "$withval" -a -d "$withval"
8540 then LDFLAGS="$LDFLAGS -L$withval"
8541 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008542
8543 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008544 # define _POSIX_THREADS in unistd.h. Some apparently don't
8545 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8547$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008549/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008550
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008551#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008552#ifdef _POSIX_THREADS
8553yes
8554#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008555
8556_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008557if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008558 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008559 unistd_defines_pthreads=yes
8560else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008561 unistd_defines_pthreads=no
8562fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008563rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008564
Matthias Kloseb9621712010-04-24 17:59:49 +00008565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8566$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008567
Matthias Kloseb9621712010-04-24 17:59:49 +00008568 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008569
Matthias Kloseb9621712010-04-24 17:59:49 +00008570 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08008571if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008572 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008573
Matthias Kloseb9621712010-04-24 17:59:49 +00008574 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008575
Martin v. Löwis11437992002-04-12 09:54:03 +00008576
Matthias Kloseb9621712010-04-24 17:59:49 +00008577$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008578
8579 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008580 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008581else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008582
Matthias Kloseb9621712010-04-24 17:59:49 +00008583 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08008584if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008585 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008586
Matthias Kloseb9621712010-04-24 17:59:49 +00008587 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008588
Martin v. Löwis11437992002-04-12 09:54:03 +00008589
Matthias Kloseb9621712010-04-24 17:59:49 +00008590$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008591
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008592 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008593else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008594
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008595 # Just looking for pthread_create in libpthread is not enough:
8596 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8597 # So we really have to include pthread.h, and then link.
8598 _libs=$LIBS
8599 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8601$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008603/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008604#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008605
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008606void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008607int
8608main ()
8609{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008610
8611pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008612 ;
8613 return 0;
8614}
8615_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008616if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008617
Matthias Kloseb9621712010-04-24 17:59:49 +00008618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8619$as_echo "yes" >&6; }
8620 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008621
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008622 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008623 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008624else
Martin v. Löwis11437992002-04-12 09:54:03 +00008625
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008626 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008627 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Gregory P. Smith69140482012-01-16 02:05:55 -08008628if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008629 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008630
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008631 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008632 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008633else
Guido van Rossumad678af1998-10-02 14:42:15 +00008634
Matthias Kloseb9621712010-04-24 17:59:49 +00008635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8636$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008637if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008638 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008639else
Martin v. Löwis11437992002-04-12 09:54:03 +00008640 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008641LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008643/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008645/* Override any GCC internal prototype to avoid an error.
8646 Use char because int might match the return type of a GCC
8647 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008648#ifdef __cplusplus
8649extern "C"
8650#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008651char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008652int
8653main ()
8654{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008655return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008656 ;
8657 return 0;
8658}
8659_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008660if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008661 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008662else
Matthias Kloseb9621712010-04-24 17:59:49 +00008663 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008664fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008665rm -f core conftest.err conftest.$ac_objext \
8666 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008667LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008668fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8670$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008671if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008672 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008673
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008674 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008675 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008676 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008677else
Greg Steinadf63d62000-07-05 10:38:09 +00008678
Matthias Kloseb9621712010-04-24 17:59:49 +00008679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8680$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008681if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008682 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008683else
Martin v. Löwis11437992002-04-12 09:54:03 +00008684 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008685LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008687/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008688
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008689/* Override any GCC internal prototype to avoid an error.
8690 Use char because int might match the return type of a GCC
8691 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008692#ifdef __cplusplus
8693extern "C"
8694#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008695char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008696int
8697main ()
8698{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008699return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008700 ;
8701 return 0;
8702}
8703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008704if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008705 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008706else
Matthias Kloseb9621712010-04-24 17:59:49 +00008707 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008709rm -f core conftest.err conftest.$ac_objext \
8710 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008711LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008712fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8714$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008715if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008716 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008717
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008718 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008719 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008720 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008721else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008722
Matthias Kloseb9621712010-04-24 17:59:49 +00008723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8724$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008725if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008726 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008727else
Martin v. Löwis11437992002-04-12 09:54:03 +00008728 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008729LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008730cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008731/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008732
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008733/* Override any GCC internal prototype to avoid an error.
8734 Use char because int might match the return type of a GCC
8735 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008736#ifdef __cplusplus
8737extern "C"
8738#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008739char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008740int
8741main ()
8742{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008743return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008744 ;
8745 return 0;
8746}
8747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008748if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008749 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008750else
Matthias Kloseb9621712010-04-24 17:59:49 +00008751 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008753rm -f core conftest.err conftest.$ac_objext \
8754 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008755LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8758$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008759if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008760 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008761
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008762 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008763 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008764 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008765else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008766
Matthias Kloseb9621712010-04-24 17:59:49 +00008767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8768$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008769if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008770 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008771else
Martin v. Löwis11437992002-04-12 09:54:03 +00008772 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008773LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008775/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008777/* Override any GCC internal prototype to avoid an error.
8778 Use char because int might match the return type of a GCC
8779 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008780#ifdef __cplusplus
8781extern "C"
8782#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008783char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008784int
8785main ()
8786{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008787return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008788 ;
8789 return 0;
8790}
8791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008792if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008793 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008794else
Matthias Kloseb9621712010-04-24 17:59:49 +00008795 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008796fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008797rm -f core conftest.err conftest.$ac_objext \
8798 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008799LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8802$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008803if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008804 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008805
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008806 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008807 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008808 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008809else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008810
Martin v. Löwis130fb172001-07-19 11:00:41 +00008811 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008812fi
8813
Guido van Rossum627b2d71993-12-24 10:39:16 +00008814
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008815fi
8816
Guido van Rossum0be3e491997-05-22 20:33:33 +00008817fi
8818
Guido van Rossum49545951997-12-02 19:28:29 +00008819fi
8820
Guido van Rossumb93a8621998-05-07 13:27:32 +00008821fi
8822
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008824rm -f core conftest.err conftest.$ac_objext \
8825 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008826fi
8827
Martin v. Löwis11437992002-04-12 09:54:03 +00008828
8829fi
8830
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008831
Michael W. Hudson54241132001-12-07 15:38:26 +00008832
Matthias Kloseb9621712010-04-24 17:59:49 +00008833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8834$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008835if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008836 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008837else
Martin v. Löwis11437992002-04-12 09:54:03 +00008838 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008839LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008841/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008842
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008843/* Override any GCC internal prototype to avoid an error.
8844 Use char because int might match the return type of a GCC
8845 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008846#ifdef __cplusplus
8847extern "C"
8848#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008849char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008850int
8851main ()
8852{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008853return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008854 ;
8855 return 0;
8856}
8857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008858if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008859 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008860else
Matthias Kloseb9621712010-04-24 17:59:49 +00008861 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008863rm -f core conftest.err conftest.$ac_objext \
8864 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008865LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8868$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008869if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008870 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008871
Martin v. Löwis130fb172001-07-19 11:00:41 +00008872 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008873 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008874 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008875fi
8876
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008877
Neal Norwitza978ab02002-11-02 16:58:05 +00008878 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8880$as_echo_n "checking for thr_create in -lthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008881if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008882 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008883else
Martin v. Löwis11437992002-04-12 09:54:03 +00008884 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008885LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008887/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008888
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008889/* Override any GCC internal prototype to avoid an error.
8890 Use char because int might match the return type of a GCC
8891 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008892#ifdef __cplusplus
8893extern "C"
8894#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008895char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008896int
8897main ()
8898{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008899return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008900 ;
8901 return 0;
8902}
8903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008904if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008905 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008906else
Matthias Kloseb9621712010-04-24 17:59:49 +00008907 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008908fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008909rm -f core conftest.err conftest.$ac_objext \
8910 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008911LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8914$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008915if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008916 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008917
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008918 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008919 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008920 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008921fi
8922
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008923 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008924
Martin v. Löwis130fb172001-07-19 11:00:41 +00008925 if test "$USE_THREAD_MODULE" != "#"
8926 then
8927 # If the above checks didn't disable threads, (at least) OSF1
8928 # needs this '-threads' argument during linking.
8929 case $ac_sys_system in
8930 OSF1) LDLAST=-threads;;
8931 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008932 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008933fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008934
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008935if test "$posix_threads" = "yes"; then
8936 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008937
Matthias Kloseb9621712010-04-24 17:59:49 +00008938$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008939
8940 fi
8941
8942 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8943 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02008944 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008945$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008946
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008947 ;;
8948 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008949$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008950
8951 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02008952 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00008953$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008954
8955 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008956 esac
8957
Matthias Kloseb9621712010-04-24 17:59:49 +00008958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8959$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008960 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008961 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008962else
Matthias Kloseb9621712010-04-24 17:59:49 +00008963 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008964 ac_cv_pthread_system_supported=no
8965else
Matthias Kloseb9621712010-04-24 17:59:49 +00008966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008967/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008968#include <pthread.h>
8969 void *foo(void *parm) {
8970 return NULL;
8971 }
8972 main() {
8973 pthread_attr_t attr;
8974 pthread_t id;
8975 if (pthread_attr_init(&attr)) exit(-1);
8976 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8977 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8978 exit(0);
8979 }
8980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008981if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008982 ac_cv_pthread_system_supported=yes
8983else
Matthias Kloseb9621712010-04-24 17:59:49 +00008984 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008985fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008986rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8987 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008988fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008989
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008990
Guido van Rossum627b2d71993-12-24 10:39:16 +00008991fi
8992
Matthias Kloseb9621712010-04-24 17:59:49 +00008993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8994$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008995 if test "$ac_cv_pthread_system_supported" = "yes"; then
8996
Matthias Kloseb9621712010-04-24 17:59:49 +00008997$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008998
8999 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009000 for ac_func in pthread_sigmask
9001do :
9002 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Gregory P. Smith69140482012-01-16 02:05:55 -08009003if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009004 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009005#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009006_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009007 case $ac_sys_system in
9008 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009009
Matthias Kloseb9621712010-04-24 17:59:49 +00009010$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009011
9012 ;;
9013 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009014fi
9015done
9016
9017fi
9018
9019
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009020# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009021
Matthias Kloseb9621712010-04-24 17:59:49 +00009022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9023$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009024# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009025if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009026 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009027 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9029$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009030 ipv6=no
9031 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009032 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9033$as_echo "yes" >&6; }
9034 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009035
9036 ipv6=yes
9037 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009038 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009039else
Martin v. Löwis11437992002-04-12 09:54:03 +00009040
Matthias Kloseb9621712010-04-24 17:59:49 +00009041 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009042
Matthias Kloseb9621712010-04-24 17:59:49 +00009043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9044$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009045 ipv6=no
9046
9047else
Matthias Kloseb9621712010-04-24 17:59:49 +00009048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009049/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009050 /* AF_INET6 available check */
9051#include <sys/types.h>
9052#include <sys/socket.h>
9053main()
9054{
9055 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9056 exit(1);
9057 else
9058 exit(0);
9059}
9060
Martin v. Löwis11437992002-04-12 09:54:03 +00009061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009062if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009063
Matthias Kloseb9621712010-04-24 17:59:49 +00009064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9065$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009066 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009067
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009068else
Matthias Kloseb159a552010-04-25 21:00:44 +00009069
Matthias Kloseb9621712010-04-24 17:59:49 +00009070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9071$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009072 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009073
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009074fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009075rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9076 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009077fi
9078
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009079
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009080if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9082$as_echo_n "checking if RFC2553 API is available... " >&6; }
9083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009084/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009085
9086 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009087#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009088int
9089main ()
9090{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009091struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009092 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009093 ;
9094 return 0;
9095}
Matthias Kloseb159a552010-04-25 21:00:44 +00009096
Martin v. Löwis11437992002-04-12 09:54:03 +00009097_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009098if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009099
9100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009101$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009102 ipv6=yes
9103
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009104else
Matthias Kloseb159a552010-04-25 21:00:44 +00009105
9106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009107$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009108 ipv6=no
9109
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009110fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009112fi
9113
9114if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009115 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009116
9117fi
9118
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009119fi
9120
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009121
9122ipv6type=unknown
9123ipv6lib=none
9124ipv6trylibc=no
9125
9126if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9128$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009129 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9130 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009131 case $i in
9132 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009134/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009135
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009136#include <netinet/in.h>
9137#ifdef IPV6_INRIA_VERSION
9138yes
9139#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009140_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009141if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009142 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009143 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009144fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009145rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009146
9147 ;;
9148 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009150/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009151
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009152#include <netinet/in.h>
9153#ifdef __KAME__
9154yes
9155#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009156_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009157if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009158 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009159 ipv6type=$i;
9160 ipv6lib=inet6
9161 ipv6libdir=/usr/local/v6/lib
9162 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009163fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009164rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009165
9166 ;;
9167 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009169/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009170
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009171#include <features.h>
9172#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9173yes
9174#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009175_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009176if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009177 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009178 ipv6type=$i;
9179 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009180fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009181rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009182
9183 ;;
9184 linux-inet6)
9185 if test -d /usr/inet6; then
9186 ipv6type=$i
9187 ipv6lib=inet6
9188 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009189 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009190 fi
9191 ;;
9192 solaris)
9193 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009194 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009195 ipv6type=$i
9196 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009197 fi
9198 fi
9199 ;;
9200 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009202/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009203
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009204#include <sys/param.h>
9205#ifdef _TOSHIBA_INET6
9206yes
9207#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009208_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009209if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009210 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009211 ipv6type=$i;
9212 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009213 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009214fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009215rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009216
9217 ;;
9218 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009220/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009221
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009222#include </usr/local/v6/include/sys/v6config.h>
9223#ifdef __V6D__
9224yes
9225#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009226_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009227if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009228 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009229 ipv6type=$i;
9230 ipv6lib=v6;
9231 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009232 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009233fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009234rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009235
9236 ;;
9237 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009239/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009240
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009241#include <sys/param.h>
9242#ifdef _ZETA_MINAMI_INET6
9243yes
9244#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009245_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009246if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009247 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009248 ipv6type=$i;
9249 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009250 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009251fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009252rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009253
9254 ;;
9255 esac
9256 if test "$ipv6type" != "unknown"; then
9257 break
9258 fi
9259 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9261$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009262fi
9263
9264if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9265 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9266 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9267 echo "using lib$ipv6lib"
9268 else
9269 if test $ipv6trylibc = "yes"; then
9270 echo "using libc"
9271 else
9272 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9273 echo "You need to fetch lib$ipv6lib.a from appropriate"
9274 echo 'ipv6 kit and compile beforehand.'
9275 exit 1
9276 fi
9277 fi
9278fi
9279
Matthias Kloseb9621712010-04-24 17:59:49 +00009280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9281$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009283/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009284
9285 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009286int
9287main ()
9288{
9289FSIORefNum fRef = 0
9290 ;
9291 return 0;
9292}
Matthias Kloseb159a552010-04-25 21:00:44 +00009293
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009295if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009296
Matthias Kloseb159a552010-04-25 21:00:44 +00009297
Matthias Kloseb9621712010-04-24 17:59:49 +00009298$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009299
Matthias Kloseb9621712010-04-24 17:59:49 +00009300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9301$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009302
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009303else
Matthias Kloseb159a552010-04-25 21:00:44 +00009304
Matthias Kloseb9621712010-04-24 17:59:49 +00009305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9306$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009307
9308fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9310
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009311# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9313$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009314
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009315# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009316if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009317 withval=$with_doc_strings;
9318fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009319
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009320
9321if test -z "$with_doc_strings"
9322then with_doc_strings="yes"
9323fi
9324if test "$with_doc_strings" != "no"
9325then
9326
Matthias Kloseb9621712010-04-24 17:59:49 +00009327$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009328
9329fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9331$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009332
Antoine Pitrou042b1282010-08-13 21:15:58 +00009333# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9335$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009336
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009337# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009338if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009339 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009340if test "$withval" != no
9341then
9342
Matthias Kloseb9621712010-04-24 17:59:49 +00009343$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009344
Matthias Kloseb9621712010-04-24 17:59:49 +00009345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9346$as_echo "yes" >&6; }
9347else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9348$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009349fi
9350else
Matthias Kloseb9621712010-04-24 17:59:49 +00009351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9352$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009353fi
9354
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009355
9356# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9358$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009359
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009360# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009361if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009362 withval=$with_pymalloc;
9363fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009364
Neil Schemenauera35c6882001-02-27 04:45:05 +00009365
Neil Schemenauer16c22972002-03-22 15:34:49 +00009366if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009367then
9368 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009369 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009370fi
9371if test "$with_pymalloc" != "no"
9372then
Martin v. Löwis11437992002-04-12 09:54:03 +00009373
Matthias Kloseb9621712010-04-24 17:59:49 +00009374$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009375
9376fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9378$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009379
Benjamin Peterson05159c42009-12-03 03:01:27 +00009380# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9382$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009383
9384# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009385if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009386 withval=$with_valgrind;
9387else
9388 with_valgrind=no
9389fi
9390
Matthias Kloseb9621712010-04-24 17:59:49 +00009391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9392$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009393if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009394 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08009395if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009396
Matthias Kloseb9621712010-04-24 17:59:49 +00009397$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009398
9399else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009400 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009401
9402fi
9403
9404
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009405 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009406fi
9407
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009408# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009409
Guido van Rossum98935bf2001-09-05 19:13:16 +00009410DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009411
Guido van Rossume97ee181999-12-20 21:27:22 +00009412# the dlopen() function means we might want to use dynload_shlib.o. some
9413# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009414for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009415do :
9416 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Gregory P. Smith69140482012-01-16 02:05:55 -08009417if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009418 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009419#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009420_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009421
Guido van Rossume97ee181999-12-20 21:27:22 +00009422fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009423done
Guido van Rossume97ee181999-12-20 21:27:22 +00009424
Michael W. Hudson54241132001-12-07 15:38:26 +00009425
Guido van Rossume97ee181999-12-20 21:27:22 +00009426# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9427# loading of modules.
9428
Matthias Kloseb9621712010-04-24 17:59:49 +00009429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9430$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009431if test -z "$DYNLOADFILE"
9432then
9433 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009434 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9435 if test "$ac_cv_func_dlopen" = yes
9436 then DYNLOADFILE="dynload_shlib.o"
9437 else DYNLOADFILE="dynload_aix.o"
9438 fi
9439 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009440 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009441 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9442 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009443 *)
9444 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9445 # out any dynamic loading
9446 if test "$ac_cv_func_dlopen" = yes
9447 then DYNLOADFILE="dynload_shlib.o"
9448 else DYNLOADFILE="dynload_stub.o"
9449 fi
9450 ;;
9451 esac
9452fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9454$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009455if test "$DYNLOADFILE" != "dynload_stub.o"
9456then
Martin v. Löwis11437992002-04-12 09:54:03 +00009457
Matthias Kloseb9621712010-04-24 17:59:49 +00009458$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009459
9460fi
9461
Neil Schemenauer4e425612001-06-19 15:44:15 +00009462# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9463
Michael W. Hudson54241132001-12-07 15:38:26 +00009464
Matthias Kloseb9621712010-04-24 17:59:49 +00009465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9466$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009467if test -z "$MACHDEP_OBJS"
9468then
Jack Jansene578a632001-08-15 01:27:14 +00009469 MACHDEP_OBJS=$extra_machdep_objs
9470else
9471 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009472fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9474$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009475
Guido van Rossum627b2d71993-12-24 10:39:16 +00009476# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009477for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smithdf300d52012-01-21 18:20:15 -08009478 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009479 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009480 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009481 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009482 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009483 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009484 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9485 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009486 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009487 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009488 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009489 truncate uname unsetenv utimes waitpid wait3 wait4 \
9490 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009491do :
9492 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9493ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009494if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009495 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009496#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009497_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009498
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009499fi
9500done
9501
Michael W. Hudson54241132001-12-07 15:38:26 +00009502
Gregory P. Smithdf300d52012-01-21 18:20:15 -08009503ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
9504 #include <dirent.h>
9505"
9506if test "x$ac_cv_have_decl_dirfd" = xyes; then :
9507
9508$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
9509
9510fi
9511
9512
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009513# For some functions, having a definition is not sufficient, since
9514# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9516$as_echo_n "checking for chroot... " >&6; }
9517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009518/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009519#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009520int
9521main ()
9522{
9523void *x=chroot
9524 ;
9525 return 0;
9526}
9527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009528if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009529
Matthias Kloseb9621712010-04-24 17:59:49 +00009530$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009531
Matthias Kloseb159a552010-04-25 21:00:44 +00009532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009533$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009534else
Matthias Kloseb9621712010-04-24 17:59:49 +00009535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9536$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009537
9538fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9541$as_echo_n "checking for link... " >&6; }
9542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009543/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009544#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009545int
9546main ()
9547{
9548void *x=link
9549 ;
9550 return 0;
9551}
9552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009553if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009554
Matthias Kloseb9621712010-04-24 17:59:49 +00009555$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009556
Matthias Kloseb159a552010-04-25 21:00:44 +00009557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009558$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009559else
Matthias Kloseb9621712010-04-24 17:59:49 +00009560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9561$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009562
9563fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9566$as_echo_n "checking for symlink... " >&6; }
9567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009568/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009569#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009570int
9571main ()
9572{
9573void *x=symlink
9574 ;
9575 return 0;
9576}
9577_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009578if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009579
Matthias Kloseb9621712010-04-24 17:59:49 +00009580$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009581
Matthias Kloseb159a552010-04-25 21:00:44 +00009582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009583$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009584else
Matthias Kloseb9621712010-04-24 17:59:49 +00009585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9586$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009587
9588fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9591$as_echo_n "checking for fchdir... " >&6; }
9592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009593/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009594#include <unistd.h>
9595int
9596main ()
9597{
9598void *x=fchdir
9599 ;
9600 return 0;
9601}
9602_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009603if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009604
Matthias Kloseb9621712010-04-24 17:59:49 +00009605$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009606
Matthias Kloseb159a552010-04-25 21:00:44 +00009607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009608$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009609else
Matthias Kloseb9621712010-04-24 17:59:49 +00009610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9611$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009612
9613fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9616$as_echo_n "checking for fsync... " >&6; }
9617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009618/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009619#include <unistd.h>
9620int
9621main ()
9622{
9623void *x=fsync
9624 ;
9625 return 0;
9626}
9627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009628if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009629
Matthias Kloseb9621712010-04-24 17:59:49 +00009630$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009631
Matthias Kloseb159a552010-04-25 21:00:44 +00009632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009633$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009634else
Matthias Kloseb9621712010-04-24 17:59:49 +00009635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9636$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009637
9638fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9641$as_echo_n "checking for fdatasync... " >&6; }
9642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009643/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009644#include <unistd.h>
9645int
9646main ()
9647{
9648void *x=fdatasync
9649 ;
9650 return 0;
9651}
9652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009653if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009654
Matthias Kloseb9621712010-04-24 17:59:49 +00009655$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009656
Matthias Kloseb159a552010-04-25 21:00:44 +00009657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009658$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009659else
Matthias Kloseb9621712010-04-24 17:59:49 +00009660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9661$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009662
9663fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9666$as_echo_n "checking for epoll... " >&6; }
9667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009668/* end confdefs.h. */
9669#include <sys/epoll.h>
9670int
9671main ()
9672{
9673void *x=epoll_create
9674 ;
9675 return 0;
9676}
9677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009678if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009679
Matthias Kloseb9621712010-04-24 17:59:49 +00009680$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009681
Matthias Kloseb159a552010-04-25 21:00:44 +00009682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009683$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009684else
Matthias Kloseb9621712010-04-24 17:59:49 +00009685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9686$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009687
9688fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9691$as_echo_n "checking for kqueue... " >&6; }
9692cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009693/* end confdefs.h. */
9694
9695#include <sys/types.h>
9696#include <sys/event.h>
9697
9698int
9699main ()
9700{
9701int x=kqueue()
9702 ;
9703 return 0;
9704}
9705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009706if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009707
Matthias Kloseb9621712010-04-24 17:59:49 +00009708$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009709
Matthias Kloseb159a552010-04-25 21:00:44 +00009710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009711$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009712else
Matthias Kloseb9621712010-04-24 17:59:49 +00009713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9714$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009715
9716fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009718# On some systems (eg. FreeBSD 5), we would find a definition of the
9719# functions ctermid_r, setgroups in the library, but no prototype
9720# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9721# address to avoid compiler warnings and potential miscompilations
9722# because of the missing prototypes.
9723
Matthias Kloseb9621712010-04-24 17:59:49 +00009724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9725$as_echo_n "checking for ctermid_r... " >&6; }
9726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009727/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009728
Martin v. Löwisd5843682002-11-21 20:41:28 +00009729#include <stdio.h>
9730
Martin v. Löwisd5843682002-11-21 20:41:28 +00009731int
9732main ()
9733{
9734void* p = ctermid_r
9735 ;
9736 return 0;
9737}
9738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009739if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009740
Matthias Kloseb9621712010-04-24 17:59:49 +00009741$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009742
Matthias Kloseb159a552010-04-25 21:00:44 +00009743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009744$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009745else
Matthias Kloseb9621712010-04-24 17:59:49 +00009746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9747$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009748
9749fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9751
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9753$as_echo_n "checking for flock declaration... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009754if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009755 $as_echo_n "(cached) " >&6
9756else
9757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009758/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009759#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009760int
9761main ()
9762{
9763void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009764
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009765 ;
9766 return 0;
9767}
9768_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009769if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009770 ac_cv_flock_decl=yes
9771else
9772 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009773
9774fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009776
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009777fi
9778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9779$as_echo "$ac_cv_flock_decl" >&6; }
9780if test "x${ac_cv_flock_decl}" = xyes; then
9781 for ac_func in flock
9782do :
9783 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Gregory P. Smith69140482012-01-16 02:05:55 -08009784if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009785 cat >>confdefs.h <<_ACEOF
9786#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009787_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009788
Antoine Pitroua3000072010-09-07 14:52:42 +00009789else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009791$as_echo_n "checking for flock in -lbsd... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009792if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009793 $as_echo_n "(cached) " >&6
9794else
9795 ac_check_lib_save_LIBS=$LIBS
9796LIBS="-lbsd $LIBS"
9797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9798/* end confdefs.h. */
9799
9800/* Override any GCC internal prototype to avoid an error.
9801 Use char because int might match the return type of a GCC
9802 builtin and then its argument prototype would still apply. */
9803#ifdef __cplusplus
9804extern "C"
9805#endif
9806char flock ();
9807int
9808main ()
9809{
9810return flock ();
9811 ;
9812 return 0;
9813}
9814_ACEOF
9815if ac_fn_c_try_link "$LINENO"; then :
9816 ac_cv_lib_bsd_flock=yes
9817else
9818 ac_cv_lib_bsd_flock=no
9819fi
9820rm -f core conftest.err conftest.$ac_objext \
9821 conftest$ac_exeext conftest.$ac_ext
9822LIBS=$ac_check_lib_save_LIBS
9823fi
9824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9825$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009826if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009827 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009828
9829
9830$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9831
9832
9833fi
9834
9835
9836fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009837done
9838
Antoine Pitroua3000072010-09-07 14:52:42 +00009839fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009840
Matthias Kloseb9621712010-04-24 17:59:49 +00009841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9842$as_echo_n "checking for getpagesize... " >&6; }
9843cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009844/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009845
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009846#include <unistd.h>
9847
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009848int
9849main ()
9850{
9851void* p = getpagesize
9852 ;
9853 return 0;
9854}
9855_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009856if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009857
Matthias Kloseb9621712010-04-24 17:59:49 +00009858$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009859
Matthias Kloseb159a552010-04-25 21:00:44 +00009860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009861$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009862else
Matthias Kloseb9621712010-04-24 17:59:49 +00009863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9864$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009865
9866fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009868
Charles-François Natali6613c182011-11-27 12:41:06 +01009869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
9870$as_echo_n "checking for broken unsetenv... " >&6; }
9871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9872/* end confdefs.h. */
9873
9874#include <stdlib.h>
9875
9876int
9877main ()
9878{
9879int res = unsetenv("DUMMY")
9880 ;
9881 return 0;
9882}
9883_ACEOF
9884if ac_fn_c_try_compile "$LINENO"; then :
9885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9886$as_echo "no" >&6; }
9887else
9888
9889$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
9890
9891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9892$as_echo "yes" >&6; }
9893
9894fi
9895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9896
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009897for ac_prog in true
9898do
9899 # Extract the first word of "$ac_prog", so it can be a program name with args.
9900set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9902$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009903if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009904 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009905else
9906 if test -n "$TRUE"; then
9907 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9908else
9909as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9910for as_dir in $PATH
9911do
9912 IFS=$as_save_IFS
9913 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009914 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009915 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 +00009916 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009917 $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 +00009918 break 2
9919 fi
9920done
Matthias Kloseb9621712010-04-24 17:59:49 +00009921 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009922IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009923
9924fi
9925fi
9926TRUE=$ac_cv_prog_TRUE
9927if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9929$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009930else
Matthias Kloseb9621712010-04-24 17:59:49 +00009931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9932$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009933fi
9934
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009935
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009936 test -n "$TRUE" && break
9937done
9938test -n "$TRUE" || TRUE="/bin/true"
9939
9940
Matthias Kloseb9621712010-04-24 17:59:49 +00009941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9942$as_echo_n "checking for inet_aton in -lc... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009943if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009944 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009945else
9946 ac_check_lib_save_LIBS=$LIBS
9947LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009949/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009950
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009951/* Override any GCC internal prototype to avoid an error.
9952 Use char because int might match the return type of a GCC
9953 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009954#ifdef __cplusplus
9955extern "C"
9956#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009957char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009958int
9959main ()
9960{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009961return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009962 ;
9963 return 0;
9964}
9965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009966if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009967 ac_cv_lib_c_inet_aton=yes
9968else
Matthias Kloseb9621712010-04-24 17:59:49 +00009969 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009970fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009971rm -f core conftest.err conftest.$ac_objext \
9972 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009973LIBS=$ac_check_lib_save_LIBS
9974fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9976$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009977if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009978 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009979else
Matthias Kloseb9621712010-04-24 17:59:49 +00009980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9981$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009982if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009983 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009984else
9985 ac_check_lib_save_LIBS=$LIBS
9986LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009988/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009989
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009990/* Override any GCC internal prototype to avoid an error.
9991 Use char because int might match the return type of a GCC
9992 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009993#ifdef __cplusplus
9994extern "C"
9995#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009996char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009997int
9998main ()
9999{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010000return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010001 ;
10002 return 0;
10003}
10004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010005if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010006 ac_cv_lib_resolv_inet_aton=yes
10007else
Matthias Kloseb9621712010-04-24 17:59:49 +000010008 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010009fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010010rm -f core conftest.err conftest.$ac_objext \
10011 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010012LIBS=$ac_check_lib_save_LIBS
10013fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10015$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010016if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010017 cat >>confdefs.h <<_ACEOF
10018#define HAVE_LIBRESOLV 1
10019_ACEOF
10020
10021 LIBS="-lresolv $LIBS"
10022
10023fi
10024
10025
10026fi
10027
10028
Christian Heimesd0764e22007-12-04 15:00:33 +000010029# On Tru64, chflags seems to be present, but calling it will
10030# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10032$as_echo_n "checking for chflags... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010033if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010034 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010035else
Matthias Kloseb9621712010-04-24 17:59:49 +000010036 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010037 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010038else
Matthias Kloseb9621712010-04-24 17:59:49 +000010039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010040/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010041
Christian Heimesd0764e22007-12-04 15:00:33 +000010042#include <sys/stat.h>
10043#include <unistd.h>
10044int main(int argc, char*argv[])
10045{
10046 if(chflags(argv[0], 0) != 0)
10047 return 1;
10048 return 0;
10049}
Ned Deily3eb67d52011-06-28 00:00:28 -070010050
Christian Heimesd0764e22007-12-04 15:00:33 +000010051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010052if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010053 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010054else
Matthias Kloseb9621712010-04-24 17:59:49 +000010055 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010056fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010057rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10058 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010059fi
10060
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010061
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010062fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10064$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010065if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010066 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Gregory P. Smith69140482012-01-16 02:05:55 -080010067if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010068 ac_cv_have_chflags="yes"
10069else
10070 ac_cv_have_chflags="no"
10071fi
10072
10073fi
10074if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010075
Matthias Kloseb9621712010-04-24 17:59:49 +000010076$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010077
10078fi
10079
Matthias Kloseb9621712010-04-24 17:59:49 +000010080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10081$as_echo_n "checking for lchflags... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010082if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010083 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010084else
Matthias Kloseb9621712010-04-24 17:59:49 +000010085 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010086 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010087else
Matthias Kloseb9621712010-04-24 17:59:49 +000010088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010089/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010090
Christian Heimesd0764e22007-12-04 15:00:33 +000010091#include <sys/stat.h>
10092#include <unistd.h>
10093int main(int argc, char*argv[])
10094{
10095 if(lchflags(argv[0], 0) != 0)
10096 return 1;
10097 return 0;
10098}
Ned Deily3eb67d52011-06-28 00:00:28 -070010099
Christian Heimesd0764e22007-12-04 15:00:33 +000010100_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010101if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010102 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010103else
Matthias Kloseb9621712010-04-24 17:59:49 +000010104 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010105fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010106rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10107 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010108fi
10109
10110
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010111fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10113$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010114if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010115 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Gregory P. Smith69140482012-01-16 02:05:55 -080010116if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010117 ac_cv_have_lchflags="yes"
10118else
10119 ac_cv_have_lchflags="no"
10120fi
10121
10122fi
10123if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010124
Matthias Kloseb9621712010-04-24 17:59:49 +000010125$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010126
10127fi
10128
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010129case $ac_sys_system/$ac_sys_release in
10130Darwin/*)
10131 _CUR_CFLAGS="${CFLAGS}"
10132 _CUR_LDFLAGS="${LDFLAGS}"
10133 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10134 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10135 ;;
10136esac
10137
Matthias Kloseb9621712010-04-24 17:59:49 +000010138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10139$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010140if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010141 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010142else
10143 ac_check_lib_save_LIBS=$LIBS
10144LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010146/* end confdefs.h. */
10147
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010148/* Override any GCC internal prototype to avoid an error.
10149 Use char because int might match the return type of a GCC
10150 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010151#ifdef __cplusplus
10152extern "C"
10153#endif
10154char inflateCopy ();
10155int
10156main ()
10157{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010158return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010159 ;
10160 return 0;
10161}
10162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010163if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010164 ac_cv_lib_z_inflateCopy=yes
10165else
Matthias Kloseb9621712010-04-24 17:59:49 +000010166 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010167fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010168rm -f core conftest.err conftest.$ac_objext \
10169 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010170LIBS=$ac_check_lib_save_LIBS
10171fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10173$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010174if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010175
Matthias Kloseb9621712010-04-24 17:59:49 +000010176$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010177
10178fi
10179
10180
10181case $ac_sys_system/$ac_sys_release in
10182Darwin/*)
10183 CFLAGS="${_CUR_CFLAGS}"
10184 LDFLAGS="${_CUR_LDFLAGS}"
10185 ;;
10186esac
10187
Matthias Kloseb9621712010-04-24 17:59:49 +000010188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10189$as_echo_n "checking for hstrerror... " >&6; }
10190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010191/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010192
Martin v. Löwise9416172003-05-03 10:12:45 +000010193#include <netdb.h>
10194
Martin v. Löwise9416172003-05-03 10:12:45 +000010195int
10196main ()
10197{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010198void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010199 ;
10200 return 0;
10201}
10202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010203if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010204
Matthias Kloseb9621712010-04-24 17:59:49 +000010205$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010206
Matthias Kloseb159a552010-04-25 21:00:44 +000010207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010208$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010209else
Matthias Kloseb9621712010-04-24 17:59:49 +000010210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10211$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010212
10213fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010214rm -f core conftest.err conftest.$ac_objext \
10215 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010216
Matthias Kloseb9621712010-04-24 17:59:49 +000010217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10218$as_echo_n "checking for inet_aton... " >&6; }
10219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010220/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010221
Martin v. Löwis86d66262006-02-17 08:40:11 +000010222#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010223#include <sys/socket.h>
10224#include <netinet/in.h>
10225#include <arpa/inet.h>
10226
Martin v. Löwise9416172003-05-03 10:12:45 +000010227int
10228main ()
10229{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010230void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010231 ;
10232 return 0;
10233}
10234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010235if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010236
Matthias Kloseb9621712010-04-24 17:59:49 +000010237$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010238
Matthias Kloseb159a552010-04-25 21:00:44 +000010239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010240$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010241else
Matthias Kloseb9621712010-04-24 17:59:49 +000010242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10243$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010244
10245fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010246rm -f core conftest.err conftest.$ac_objext \
10247 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010248
Matthias Kloseb9621712010-04-24 17:59:49 +000010249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10250$as_echo_n "checking for inet_pton... " >&6; }
10251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010252/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010253
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010254#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010255#include <sys/socket.h>
10256#include <netinet/in.h>
10257#include <arpa/inet.h>
10258
Martin v. Löwise9416172003-05-03 10:12:45 +000010259int
10260main ()
10261{
10262void* p = inet_pton
10263 ;
10264 return 0;
10265}
10266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010267if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010268
Matthias Kloseb9621712010-04-24 17:59:49 +000010269$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010270
Matthias Kloseb159a552010-04-25 21:00:44 +000010271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010272$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010273else
Matthias Kloseb9621712010-04-24 17:59:49 +000010274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10275$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010276
10277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010279
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010280# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10282$as_echo_n "checking for setgroups... " >&6; }
10283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010284/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010285
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010286#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010287#ifdef HAVE_GRP_H
10288#include <grp.h>
10289#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010290
Martin v. Löwisd5843682002-11-21 20:41:28 +000010291int
10292main ()
10293{
10294void* p = setgroups
10295 ;
10296 return 0;
10297}
10298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010299if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010300
Matthias Kloseb9621712010-04-24 17:59:49 +000010301$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010302
Matthias Kloseb159a552010-04-25 21:00:44 +000010303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010304$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010305else
Matthias Kloseb9621712010-04-24 17:59:49 +000010306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10307$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010308
10309fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010311
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010312# check for openpty and forkpty
10313
10314for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010315do :
10316 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Gregory P. Smith69140482012-01-16 02:05:55 -080010317if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010318 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010319#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010320_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010321
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010322else
Matthias Kloseb9621712010-04-24 17:59:49 +000010323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10324$as_echo_n "checking for openpty in -lutil... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010325if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010326 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010327else
Martin v. Löwis11437992002-04-12 09:54:03 +000010328 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010329LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010330cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010331/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010332
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010333/* Override any GCC internal prototype to avoid an error.
10334 Use char because int might match the return type of a GCC
10335 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010336#ifdef __cplusplus
10337extern "C"
10338#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010339char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010340int
10341main ()
10342{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010343return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010344 ;
10345 return 0;
10346}
10347_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010348if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010349 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010350else
Matthias Kloseb9621712010-04-24 17:59:49 +000010351 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010352fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010353rm -f core conftest.err conftest.$ac_objext \
10354 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010355LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010356fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10358$as_echo "$ac_cv_lib_util_openpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010359if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010360 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010361 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010362else
Matthias Kloseb9621712010-04-24 17:59:49 +000010363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10364$as_echo_n "checking for openpty in -lbsd... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010365if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010366 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010367else
10368 ac_check_lib_save_LIBS=$LIBS
10369LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010371/* end confdefs.h. */
10372
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010373/* Override any GCC internal prototype to avoid an error.
10374 Use char because int might match the return type of a GCC
10375 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010376#ifdef __cplusplus
10377extern "C"
10378#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010379char openpty ();
10380int
10381main ()
10382{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010383return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010384 ;
10385 return 0;
10386}
10387_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010388if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010389 ac_cv_lib_bsd_openpty=yes
10390else
Matthias Kloseb9621712010-04-24 17:59:49 +000010391 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010392fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010393rm -f core conftest.err conftest.$ac_objext \
10394 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010395LIBS=$ac_check_lib_save_LIBS
10396fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10398$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010399if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010400 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010401 LIBS="$LIBS -lbsd"
10402fi
10403
10404
10405fi
10406
Fred Drake8cef4cf2000-06-28 16:40:38 +000010407
10408fi
10409done
10410
10411for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010412do :
10413 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Gregory P. Smith69140482012-01-16 02:05:55 -080010414if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010415 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010416#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010417_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010418
Fred Drake8cef4cf2000-06-28 16:40:38 +000010419else
Matthias Kloseb9621712010-04-24 17:59:49 +000010420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10421$as_echo_n "checking for forkpty in -lutil... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010422if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010423 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010424else
Martin v. Löwis11437992002-04-12 09:54:03 +000010425 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010426LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010428/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010429
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010430/* Override any GCC internal prototype to avoid an error.
10431 Use char because int might match the return type of a GCC
10432 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010433#ifdef __cplusplus
10434extern "C"
10435#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010436char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010437int
10438main ()
10439{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010440return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010441 ;
10442 return 0;
10443}
10444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010445if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010446 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010447else
Matthias Kloseb9621712010-04-24 17:59:49 +000010448 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010449fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010450rm -f core conftest.err conftest.$ac_objext \
10451 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010452LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010453fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10455$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010456if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010457 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010458 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010459else
Matthias Kloseb9621712010-04-24 17:59:49 +000010460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10461$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010462if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010463 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010464else
10465 ac_check_lib_save_LIBS=$LIBS
10466LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010468/* end confdefs.h. */
10469
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010470/* Override any GCC internal prototype to avoid an error.
10471 Use char because int might match the return type of a GCC
10472 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010473#ifdef __cplusplus
10474extern "C"
10475#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010476char forkpty ();
10477int
10478main ()
10479{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010480return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010481 ;
10482 return 0;
10483}
10484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010485if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010486 ac_cv_lib_bsd_forkpty=yes
10487else
Matthias Kloseb9621712010-04-24 17:59:49 +000010488 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010489fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010490rm -f core conftest.err conftest.$ac_objext \
10491 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010492LIBS=$ac_check_lib_save_LIBS
10493fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10495$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010496if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010497 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010498 LIBS="$LIBS -lbsd"
10499fi
10500
10501
10502fi
10503
Fred Drake8cef4cf2000-06-28 16:40:38 +000010504
10505fi
10506done
10507
Jack Jansendd19cf82001-12-06 22:36:17 +000010508
Christian Heimesb186d002008-03-18 15:15:01 +000010509# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010510for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010511do :
10512 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Gregory P. Smith69140482012-01-16 02:05:55 -080010513if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010514 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010515#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010516_ACEOF
10517
10518fi
10519done
10520
10521
Michael W. Hudson54241132001-12-07 15:38:26 +000010522# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010523for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010524do :
10525 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10526ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010527if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010528 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010529#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010530_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010531
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010532fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010533done
10534
Michael W. Hudson54241132001-12-07 15:38:26 +000010535
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010536ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Gregory P. Smith69140482012-01-16 02:05:55 -080010537if test "x$ac_cv_func_dup2" = xyes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010538 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010539
Martin v. Löwis1142de32002-03-29 16:28:31 +000010540else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010541 case " $LIBOBJS " in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010542 *" dup2.$ac_objext "* ) ;;
10543 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010544 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010545esac
10546
Martin v. Löwis1142de32002-03-29 16:28:31 +000010547fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010548
10549ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Gregory P. Smith69140482012-01-16 02:05:55 -080010550if test "x$ac_cv_func_getcwd" = xyes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010551 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10552
10553else
10554 case " $LIBOBJS " in
10555 *" getcwd.$ac_objext "* ) ;;
10556 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10557 ;;
10558esac
10559
10560fi
10561
10562ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Gregory P. Smith69140482012-01-16 02:05:55 -080010563if test "x$ac_cv_func_strdup" = xyes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010564 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10565
10566else
10567 case " $LIBOBJS " in
10568 *" strdup.$ac_objext "* ) ;;
10569 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10570 ;;
10571esac
10572
10573fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010574
10575
10576for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010577do :
10578 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Gregory P. Smith69140482012-01-16 02:05:55 -080010579if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010580 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010581#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010582_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010584/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010585#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010586int
10587main ()
10588{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010589getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010590 ;
10591 return 0;
10592}
10593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010594if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010595
Matthias Kloseb9621712010-04-24 17:59:49 +000010596$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010597
Guido van Rossum627b2d71993-12-24 10:39:16 +000010598fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010600
Guido van Rossum627b2d71993-12-24 10:39:16 +000010601fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010602done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010603
Jack Jansen150753c2003-03-29 22:07:47 +000010604for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010605do :
10606 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Gregory P. Smith69140482012-01-16 02:05:55 -080010607if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010608 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010609#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010612/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010613#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010614int
10615main ()
10616{
10617setpgrp(0,0);
10618 ;
10619 return 0;
10620}
10621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010622if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010623
Matthias Kloseb9621712010-04-24 17:59:49 +000010624$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010625
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010626fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010628
10629fi
10630done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010631
Thomas Wouters3a584202000-08-05 23:28:51 +000010632for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010633do :
10634 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Gregory P. Smith69140482012-01-16 02:05:55 -080010635if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010636 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010637#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010640/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010641#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010642int
10643main ()
10644{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010645gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010646 ;
10647 return 0;
10648}
10649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010650if ac_fn_c_try_compile "$LINENO"; then :
10651
Guido van Rossum627b2d71993-12-24 10:39:16 +000010652else
Skip Montanaro6dead952003-09-25 14:50:04 +000010653
Matthias Kloseb9621712010-04-24 17:59:49 +000010654$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010655
Martin v. Löwis11437992002-04-12 09:54:03 +000010656
Guido van Rossum627b2d71993-12-24 10:39:16 +000010657fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010659
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010660fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010661done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010662
Michael W. Hudson54241132001-12-07 15:38:26 +000010663
Matthias Kloseb9621712010-04-24 17:59:49 +000010664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10665$as_echo_n "checking for major... " >&6; }
10666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010667/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010668
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010669#if defined(MAJOR_IN_MKDEV)
10670#include <sys/mkdev.h>
10671#elif defined(MAJOR_IN_SYSMACROS)
10672#include <sys/sysmacros.h>
10673#else
10674#include <sys/types.h>
10675#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010676
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010677int
10678main ()
10679{
10680
10681 makedev(major(0),minor(0));
10682
10683 ;
10684 return 0;
10685}
10686_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010687if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010688
10689
Matthias Kloseb9621712010-04-24 17:59:49 +000010690$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010691
Matthias Kloseb9621712010-04-24 17:59:49 +000010692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10693$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010694
10695else
Skip Montanaro6dead952003-09-25 14:50:04 +000010696
Matthias Kloseb9621712010-04-24 17:59:49 +000010697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10698$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010699
10700fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010701rm -f core conftest.err conftest.$ac_objext \
10702 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010703
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010704# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010705# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10707$as_echo_n "checking for getaddrinfo... " >&6; }
10708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010709/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010710
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010711#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010712#include <sys/socket.h>
10713#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010714#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010715
Martin v. Löwis11437992002-04-12 09:54:03 +000010716int
10717main ()
10718{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010719getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010720 ;
10721 return 0;
10722}
10723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010724if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010725 have_getaddrinfo=yes
10726else
Matthias Kloseb9621712010-04-24 17:59:49 +000010727 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010728fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010729rm -f core conftest.err conftest.$ac_objext \
10730 conftest$ac_exeext conftest.$ac_ext
10731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10732$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010733if test $have_getaddrinfo = yes
10734then
Matthias Kloseb9621712010-04-24 17:59:49 +000010735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10736$as_echo_n "checking getaddrinfo bug... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010737 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010738 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010739else
Matthias Kloseb9621712010-04-24 17:59:49 +000010740 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010741 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010742else
Matthias Kloseb9621712010-04-24 17:59:49 +000010743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010744/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010745
10746#include <sys/types.h>
10747#include <netdb.h>
10748#include <string.h>
10749#include <sys/socket.h>
10750#include <netinet/in.h>
10751
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010752int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010753{
10754 int passive, gaierr, inet4 = 0, inet6 = 0;
10755 struct addrinfo hints, *ai, *aitop;
10756 char straddr[INET6_ADDRSTRLEN], strport[16];
10757
10758 for (passive = 0; passive <= 1; passive++) {
10759 memset(&hints, 0, sizeof(hints));
10760 hints.ai_family = AF_UNSPEC;
10761 hints.ai_flags = passive ? AI_PASSIVE : 0;
10762 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010763 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010764 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10765 (void)gai_strerror(gaierr);
10766 goto bad;
10767 }
10768 for (ai = aitop; ai; ai = ai->ai_next) {
10769 if (ai->ai_addr == NULL ||
10770 ai->ai_addrlen == 0 ||
10771 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10772 straddr, sizeof(straddr), strport, sizeof(strport),
10773 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10774 goto bad;
10775 }
10776 switch (ai->ai_family) {
10777 case AF_INET:
10778 if (strcmp(strport, "54321") != 0) {
10779 goto bad;
10780 }
10781 if (passive) {
10782 if (strcmp(straddr, "0.0.0.0") != 0) {
10783 goto bad;
10784 }
10785 } else {
10786 if (strcmp(straddr, "127.0.0.1") != 0) {
10787 goto bad;
10788 }
10789 }
10790 inet4++;
10791 break;
10792 case AF_INET6:
10793 if (strcmp(strport, "54321") != 0) {
10794 goto bad;
10795 }
10796 if (passive) {
10797 if (strcmp(straddr, "::") != 0) {
10798 goto bad;
10799 }
10800 } else {
10801 if (strcmp(straddr, "::1") != 0) {
10802 goto bad;
10803 }
10804 }
10805 inet6++;
10806 break;
10807 case AF_UNSPEC:
10808 goto bad;
10809 break;
10810 default:
10811 /* another family support? */
10812 break;
10813 }
10814 }
10815 }
10816
10817 if (!(inet4 == 0 || inet4 == 2))
10818 goto bad;
10819 if (!(inet6 == 0 || inet6 == 2))
10820 goto bad;
10821
10822 if (aitop)
10823 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010824 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010825
10826 bad:
10827 if (aitop)
10828 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010829 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010830}
10831
Martin v. Löwis11437992002-04-12 09:54:03 +000010832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010833if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010834 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010835else
Matthias Kloseb9621712010-04-24 17:59:49 +000010836 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010837fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010838rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10839 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010840fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010841
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010842fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010843
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010844fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010845
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10847$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10848
Mark Dickinson2df5d282009-12-31 21:22:50 +000010849if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010850then
10851 if test $ipv6 = yes
10852 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010853 echo 'Fatal: You must get working getaddrinfo() function.'
10854 echo ' or you can specify "--disable-ipv6"'.
10855 exit 1
10856 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010857else
Martin v. Löwis11437992002-04-12 09:54:03 +000010858
Matthias Kloseb9621712010-04-24 17:59:49 +000010859$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010860
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010861fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010862
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010863for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010864do :
10865 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Gregory P. Smith69140482012-01-16 02:05:55 -080010866if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010867 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010868#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010869_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010870
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010871fi
10872done
10873
Michael W. Hudson54241132001-12-07 15:38:26 +000010874
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010875# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10877$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010878if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010879 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010880else
Matthias Kloseb9621712010-04-24 17:59:49 +000010881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010882/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010883#include <sys/types.h>
10884#include <sys/time.h>
10885#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010886
Martin v. Löwis11437992002-04-12 09:54:03 +000010887int
10888main ()
10889{
10890if ((struct tm *) 0)
10891return 0;
10892 ;
10893 return 0;
10894}
10895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010896if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010897 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010898else
Matthias Kloseb9621712010-04-24 17:59:49 +000010899 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010902fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10904$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010905if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010906
Matthias Kloseb9621712010-04-24 17:59:49 +000010907$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010908
10909fi
10910
Matthias Kloseb9621712010-04-24 17:59:49 +000010911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10912$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010913if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010914 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010915else
Matthias Kloseb9621712010-04-24 17:59:49 +000010916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010917/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010918#include <sys/types.h>
10919#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010920
Martin v. Löwis11437992002-04-12 09:54:03 +000010921int
10922main ()
10923{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010924struct tm tm;
10925 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010926 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010927 ;
10928 return 0;
10929}
10930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010931if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010932 ac_cv_struct_tm=time.h
10933else
Matthias Kloseb9621712010-04-24 17:59:49 +000010934 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010937fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10939$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010940if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010941
Matthias Kloseb9621712010-04-24 17:59:49 +000010942$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010943
10944fi
10945
Matthias Kloseb9621712010-04-24 17:59:49 +000010946ac_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 +000010947#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010948
Matthias Kloseb9621712010-04-24 17:59:49 +000010949"
Gregory P. Smith69140482012-01-16 02:05:55 -080010950if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010951
10952cat >>confdefs.h <<_ACEOF
10953#define HAVE_STRUCT_TM_TM_ZONE 1
10954_ACEOF
10955
10956
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010957fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010958
Martin v. Löwis11437992002-04-12 09:54:03 +000010959if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10960
Matthias Kloseb9621712010-04-24 17:59:49 +000010961$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010962
10963else
Matthias Kloseb9621712010-04-24 17:59:49 +000010964 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10965"
Gregory P. Smith69140482012-01-16 02:05:55 -080010966if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010967 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010968else
Matthias Kloseb9621712010-04-24 17:59:49 +000010969 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010970fi
10971
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010972cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010973#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010974_ACEOF
10975
Matthias Kloseb9621712010-04-24 17:59:49 +000010976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10977$as_echo_n "checking for tzname... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010978if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010979 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010980else
Matthias Kloseb9621712010-04-24 17:59:49 +000010981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010982/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010983#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010984#if !HAVE_DECL_TZNAME
10985extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010986#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010987
Martin v. Löwis11437992002-04-12 09:54:03 +000010988int
10989main ()
10990{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010991return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010992 ;
10993 return 0;
10994}
10995_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010996if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010997 ac_cv_var_tzname=yes
10998else
Matthias Kloseb9621712010-04-24 17:59:49 +000010999 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011000fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011001rm -f core conftest.err conftest.$ac_objext \
11002 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011003fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11005$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011006 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011007
Matthias Kloseb9621712010-04-24 17:59:49 +000011008$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011009
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011010 fi
11011fi
11012
Matthias Kloseb9621712010-04-24 17:59:49 +000011013ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -080011014if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011015
11016cat >>confdefs.h <<_ACEOF
11017#define HAVE_STRUCT_STAT_ST_RDEV 1
11018_ACEOF
11019
11020
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011021fi
11022
Matthias Kloseb9621712010-04-24 17:59:49 +000011023ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -080011024if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011025
Martin v. Löwis11437992002-04-12 09:54:03 +000011026cat >>confdefs.h <<_ACEOF
11027#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11028_ACEOF
11029
11030
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011031fi
11032
Matthias Kloseb9621712010-04-24 17:59:49 +000011033ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -080011034if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011035
11036cat >>confdefs.h <<_ACEOF
11037#define HAVE_STRUCT_STAT_ST_FLAGS 1
11038_ACEOF
11039
11040
11041fi
11042
Matthias Kloseb9621712010-04-24 17:59:49 +000011043ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -080011044if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011045
11046cat >>confdefs.h <<_ACEOF
11047#define HAVE_STRUCT_STAT_ST_GEN 1
11048_ACEOF
11049
11050
11051fi
11052
Matthias Kloseb9621712010-04-24 17:59:49 +000011053ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -080011054if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011055
11056cat >>confdefs.h <<_ACEOF
11057#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11058_ACEOF
11059
11060
11061fi
11062
Matthias Kloseb9621712010-04-24 17:59:49 +000011063ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -080011064if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011065
Martin v. Löwis11437992002-04-12 09:54:03 +000011066cat >>confdefs.h <<_ACEOF
11067#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11068_ACEOF
11069
11070
Matthias Kloseb9621712010-04-24 17:59:49 +000011071$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011072
11073else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011074 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011075 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011076 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11077 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011078esac
11079
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011080fi
11081
Michael W. Hudson54241132001-12-07 15:38:26 +000011082
Martin v. Löwis11437992002-04-12 09:54:03 +000011083
Matthias Kloseb9621712010-04-24 17:59:49 +000011084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11085$as_echo_n "checking for time.h that defines altzone... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011086if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011087 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011088else
Matthias Kloseb159a552010-04-25 21:00:44 +000011089
Matthias Kloseb9621712010-04-24 17:59:49 +000011090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011091/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011092#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011093int
11094main ()
11095{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011096return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011097 ;
11098 return 0;
11099}
11100_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011101if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011102 ac_cv_header_time_altzone=yes
11103else
Matthias Kloseb9621712010-04-24 17:59:49 +000011104 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011105fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011108fi
11109
Matthias Kloseb9621712010-04-24 17:59:49 +000011110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11111$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011112if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011113
Matthias Kloseb9621712010-04-24 17:59:49 +000011114$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011115
11116fi
11117
Guido van Rossumda88dad1995-01-26 00:46:29 +000011118was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11120$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011122/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011123
11124#include <sys/types.h>
11125#include <sys/select.h>
11126#include <sys/time.h>
11127
Martin v. Löwis11437992002-04-12 09:54:03 +000011128int
11129main ()
11130{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011131;
Martin v. Löwis11437992002-04-12 09:54:03 +000011132 ;
11133 return 0;
11134}
11135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011136if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011137
11138
Matthias Kloseb9621712010-04-24 17:59:49 +000011139$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011140
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011141 was_it_defined=yes
11142
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011143fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11146$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011147
Matthias Kloseb9621712010-04-24 17:59:49 +000011148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11149$as_echo_n "checking for addrinfo... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011150if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011151 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011152else
Matthias Kloseb9621712010-04-24 17:59:49 +000011153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011154/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011155#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011156int
11157main ()
11158{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011159struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011160 ;
11161 return 0;
11162}
11163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011164if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011165 ac_cv_struct_addrinfo=yes
11166else
Matthias Kloseb9621712010-04-24 17:59:49 +000011167 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011168fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11170fi
11171
Matthias Kloseb9621712010-04-24 17:59:49 +000011172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11173$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011174if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011175
Matthias Kloseb9621712010-04-24 17:59:49 +000011176$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011177
11178fi
11179
Matthias Kloseb9621712010-04-24 17:59:49 +000011180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11181$as_echo_n "checking for sockaddr_storage... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011182if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011183 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011184else
Matthias Kloseb9621712010-04-24 17:59:49 +000011185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011186/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011187
11188# include <sys/types.h>
11189# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011190int
11191main ()
11192{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011193struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011194 ;
11195 return 0;
11196}
11197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011198if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011199 ac_cv_struct_sockaddr_storage=yes
11200else
Matthias Kloseb9621712010-04-24 17:59:49 +000011201 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011202fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11204fi
11205
Matthias Kloseb9621712010-04-24 17:59:49 +000011206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11207$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011208if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011209
Matthias Kloseb9621712010-04-24 17:59:49 +000011210$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011211
11212fi
11213
Guido van Rossum627b2d71993-12-24 10:39:16 +000011214# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011215
Matthias Kloseb9621712010-04-24 17:59:49 +000011216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11217$as_echo_n "checking whether char is unsigned... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011218if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011219 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011220else
Matthias Kloseb9621712010-04-24 17:59:49 +000011221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011222/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011223$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011224int
11225main ()
11226{
11227static int test_array [1 - 2 * !(((char) -1) < 0)];
11228test_array [0] = 0
11229
11230 ;
11231 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011232}
Martin v. Löwis11437992002-04-12 09:54:03 +000011233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011234if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011235 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011236else
Matthias Kloseb9621712010-04-24 17:59:49 +000011237 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011238fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011240fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11242$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011243if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011244 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011245
11246fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011247
Matthias Kloseb9621712010-04-24 17:59:49 +000011248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11249$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011250if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011251 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011252else
Matthias Kloseb9621712010-04-24 17:59:49 +000011253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011254/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011255
Martin v. Löwis11437992002-04-12 09:54:03 +000011256int
11257main ()
11258{
11259/* FIXME: Include the comments suggested by Paul. */
11260#ifndef __cplusplus
11261 /* Ultrix mips cc rejects this. */
11262 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011263 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011264 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011265 char const *const *pcpcc;
11266 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011267 /* NEC SVR4.0.2 mips cc rejects this. */
11268 struct point {int x, y;};
11269 static struct point const zero = {0,0};
11270 /* AIX XL C 1.02.0.0 rejects this.
11271 It does not let you subtract one const X* pointer from another in
11272 an arm of an if-expression whose if-part is not a constant
11273 expression */
11274 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011275 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011276 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011277 ++pcpcc;
11278 ppc = (char**) pcpcc;
11279 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011280 { /* SCO 3.2v4 cc rejects this. */
11281 char *t;
11282 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011283
Martin v. Löwis11437992002-04-12 09:54:03 +000011284 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011285 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011286 }
11287 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11288 int x[] = {25, 17};
11289 const int *foo = &x[0];
11290 ++foo;
11291 }
11292 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11293 typedef const int *iptr;
11294 iptr p = 0;
11295 ++p;
11296 }
11297 { /* AIX XL C 1.02.0.0 rejects this saying
11298 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11299 struct s { int j; const int *ap[3]; };
11300 struct s *b; b->j = 5;
11301 }
11302 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11303 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011304 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011305 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011306 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011307#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011308
Martin v. Löwis11437992002-04-12 09:54:03 +000011309 ;
11310 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011311}
Martin v. Löwis11437992002-04-12 09:54:03 +000011312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011313if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011314 ac_cv_c_const=yes
11315else
Matthias Kloseb9621712010-04-24 17:59:49 +000011316 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011317fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011319fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11321$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011322if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011323
Matthias Kloseb9621712010-04-24 17:59:49 +000011324$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011325
11326fi
11327
Michael W. Hudson54241132001-12-07 15:38:26 +000011328
Guido van Rossumda88dad1995-01-26 00:46:29 +000011329works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11331$as_echo_n "checking for working volatile... " >&6; }
11332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011333/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011334
Martin v. Löwis11437992002-04-12 09:54:03 +000011335int
11336main ()
11337{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011338volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011339 ;
11340 return 0;
11341}
11342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011343if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011344 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011345else
Skip Montanaro6dead952003-09-25 14:50:04 +000011346
Matthias Kloseb9621712010-04-24 17:59:49 +000011347$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011348
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011349
Guido van Rossum627b2d71993-12-24 10:39:16 +000011350fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11353$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011354
Guido van Rossumda88dad1995-01-26 00:46:29 +000011355works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11357$as_echo_n "checking for working signed char... " >&6; }
11358cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011359/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011360
Martin v. Löwis11437992002-04-12 09:54:03 +000011361int
11362main ()
11363{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011364signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011365 ;
11366 return 0;
11367}
11368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011369if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011370 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011371else
Skip Montanaro6dead952003-09-25 14:50:04 +000011372
Matthias Kloseb9621712010-04-24 17:59:49 +000011373$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011374
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011375
Guido van Rossum7f43da71994-08-01 12:15:30 +000011376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11379$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011380
Guido van Rossumda88dad1995-01-26 00:46:29 +000011381have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11383$as_echo_n "checking for prototypes... " >&6; }
11384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011385/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011386int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011387int
11388main ()
11389{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011390return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011391 ;
11392 return 0;
11393}
11394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011395if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011396
Matthias Kloseb9621712010-04-24 17:59:49 +000011397$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011398
Matthias Kloseb159a552010-04-25 21:00:44 +000011399 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011400fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11403$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011404
Guido van Rossumda88dad1995-01-26 00:46:29 +000011405works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11407$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011409/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011410
11411#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011412int foo(int x, ...) {
11413 va_list va;
11414 va_start(va, x);
11415 va_arg(va, int);
11416 va_arg(va, char *);
11417 va_arg(va, double);
11418 return 0;
11419}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011420
Martin v. Löwis11437992002-04-12 09:54:03 +000011421int
11422main ()
11423{
Guido van Rossum90eea071996-08-30 20:58:57 +000011424return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011425 ;
11426 return 0;
11427}
11428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011429if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011430
11431
Matthias Kloseb9621712010-04-24 17:59:49 +000011432$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011433
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011434 works=yes
11435
Guido van Rossum627b2d71993-12-24 10:39:16 +000011436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11439$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011440
Martin v. Löwisd6320502004-08-12 13:45:08 +000011441# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11443$as_echo_n "checking for socketpair... " >&6; }
11444cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011445/* end confdefs.h. */
11446
11447#include <sys/types.h>
11448#include <sys/socket.h>
11449
11450int
11451main ()
11452{
11453void *x=socketpair
11454 ;
11455 return 0;
11456}
11457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011458if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011459
Matthias Kloseb9621712010-04-24 17:59:49 +000011460$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011461
Matthias Kloseb159a552010-04-25 21:00:44 +000011462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011463$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011464else
Matthias Kloseb9621712010-04-24 17:59:49 +000011465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11466$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011467
11468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011470
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011471# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11473$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011475/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011476#include <sys/types.h>
11477#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011478int
11479main ()
11480{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011481struct sockaddr x;
11482x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011483 ;
11484 return 0;
11485}
11486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011487if ac_fn_c_try_compile "$LINENO"; then :
11488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11489$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011490
Matthias Kloseb9621712010-04-24 17:59:49 +000011491$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011492
11493else
Matthias Kloseb9621712010-04-24 17:59:49 +000011494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11495$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011496
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011497fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011499
Guido van Rossumda88dad1995-01-26 00:46:29 +000011500va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11502$as_echo_n "checking whether va_list is an array... " >&6; }
11503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011504/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011505
11506#ifdef HAVE_STDARG_PROTOTYPES
11507#include <stdarg.h>
11508#else
11509#include <varargs.h>
11510#endif
11511
Martin v. Löwis11437992002-04-12 09:54:03 +000011512int
11513main ()
11514{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011515va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011516 ;
11517 return 0;
11518}
11519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011520if ac_fn_c_try_compile "$LINENO"; then :
11521
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011522else
Skip Montanaro6dead952003-09-25 14:50:04 +000011523
Martin v. Löwis11437992002-04-12 09:54:03 +000011524
Matthias Kloseb9621712010-04-24 17:59:49 +000011525$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011526
Guido van Rossumda88dad1995-01-26 00:46:29 +000011527 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011528
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011529fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11532$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011533
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011534# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011535
11536
Matthias Kloseb9621712010-04-24 17:59:49 +000011537ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Gregory P. Smith69140482012-01-16 02:05:55 -080011538if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011539
Matthias Kloseb9621712010-04-24 17:59:49 +000011540 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011541
Matthias Kloseb9621712010-04-24 17:59:49 +000011542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11543$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011544 OLD_CFLAGS=$CFLAGS
11545 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011547/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011548
11549# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011550
Martin v. Löwis11437992002-04-12 09:54:03 +000011551int
11552main ()
11553{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011554
11555 char *name;
11556 struct hostent *he, *res;
11557 char buffer[2048];
11558 int buflen = 2048;
11559 int h_errnop;
11560
11561 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011562
11563 ;
11564 return 0;
11565}
11566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011567if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011568
Matthias Kloseb9621712010-04-24 17:59:49 +000011569 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011570
Martin v. Löwis11437992002-04-12 09:54:03 +000011571
Matthias Kloseb9621712010-04-24 17:59:49 +000011572$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011573
Matthias Kloseb9621712010-04-24 17:59:49 +000011574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11575$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011576
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011577else
Skip Montanaro6dead952003-09-25 14:50:04 +000011578
Matthias Kloseb9621712010-04-24 17:59:49 +000011579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11580$as_echo "no" >&6; }
11581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11582$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011584/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011585
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011586# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011587
Martin v. Löwis11437992002-04-12 09:54:03 +000011588int
11589main ()
11590{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011591
11592 char *name;
11593 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011594 char buffer[2048];
11595 int buflen = 2048;
11596 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011597
Matthias Kloseb159a552010-04-25 21:00:44 +000011598 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011599
11600 ;
11601 return 0;
11602}
11603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011604if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011605
Matthias Kloseb9621712010-04-24 17:59:49 +000011606 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011607
Martin v. Löwis11437992002-04-12 09:54:03 +000011608
Matthias Kloseb159a552010-04-25 21:00:44 +000011609$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011610
Matthias Kloseb9621712010-04-24 17:59:49 +000011611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11612$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011613
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011614else
Skip Montanaro6dead952003-09-25 14:50:04 +000011615
Matthias Kloseb9621712010-04-24 17:59:49 +000011616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11617$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11619$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11621/* end confdefs.h. */
11622
11623# include <netdb.h>
11624
11625int
11626main ()
11627{
11628
11629 char *name;
11630 struct hostent *he;
11631 struct hostent_data data;
11632
11633 (void) gethostbyname_r(name, he, &data);
11634
11635 ;
11636 return 0;
11637}
11638_ACEOF
11639if ac_fn_c_try_compile "$LINENO"; then :
11640
11641 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11642
11643
11644$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11645
11646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11647$as_echo "yes" >&6; }
11648
11649else
11650
11651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11652$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011653
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011654fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011656
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011657fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011659
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011660fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011662 CFLAGS=$OLD_CFLAGS
11663
11664else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011665
Matthias Kloseb9621712010-04-24 17:59:49 +000011666 for ac_func in gethostbyname
11667do :
11668 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Gregory P. Smith69140482012-01-16 02:05:55 -080011669if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011670 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011671#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011672_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011673
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011674fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011675done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011676
Michael W. Hudson54241132001-12-07 15:38:26 +000011677
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011678fi
11679
Michael W. Hudson54241132001-12-07 15:38:26 +000011680
11681
11682
11683
11684
11685
Guido van Rossum627b2d71993-12-24 10:39:16 +000011686# checks for system services
11687# (none yet)
11688
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011689# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011690ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Gregory P. Smith69140482012-01-16 02:05:55 -080011691if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011692
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011693else
Matthias Kloseb9621712010-04-24 17:59:49 +000011694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11695$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011696if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011697 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011698else
Martin v. Löwis11437992002-04-12 09:54:03 +000011699 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011700LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011702/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011703
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011704/* Override any GCC internal prototype to avoid an error.
11705 Use char because int might match the return type of a GCC
11706 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011707#ifdef __cplusplus
11708extern "C"
11709#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011710char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011711int
11712main ()
11713{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011714return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011715 ;
11716 return 0;
11717}
11718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011719if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011720 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011721else
Matthias Kloseb9621712010-04-24 17:59:49 +000011722 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011723fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011724rm -f core conftest.err conftest.$ac_objext \
11725 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011726LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011727fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11729$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011730if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011731 cat >>confdefs.h <<_ACEOF
11732#define HAVE_LIBIEEE 1
11733_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011734
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011735 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011736
Guido van Rossum627b2d71993-12-24 10:39:16 +000011737fi
11738
Michael W. Hudson54241132001-12-07 15:38:26 +000011739
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011740fi
11741
Michael W. Hudson54241132001-12-07 15:38:26 +000011742
Guido van Rossum7f253911997-05-09 02:42:48 +000011743# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11745$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011746
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011747# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011748if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011749 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011750if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011751then
11752
Matthias Kloseb9621712010-04-24 17:59:49 +000011753$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011754
Matthias Kloseb9621712010-04-24 17:59:49 +000011755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11756$as_echo "yes" >&6; }
11757else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11758$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011759fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011760else
Matthias Kloseb9621712010-04-24 17:59:49 +000011761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11762$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011763fi
11764
Guido van Rossum7f253911997-05-09 02:42:48 +000011765
Guido van Rossum7f43da71994-08-01 12:15:30 +000011766# check for --with-libm=...
11767
Guido van Rossum563e7081996-09-10 18:20:48 +000011768case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011769Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011770*) LIBM=-lm
11771esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11773$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011774
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011775# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011776if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011777 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011778if test "$withval" = no
11779then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11781$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011782elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011783then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11785$as_echo "set LIBM=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011786else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011787fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011788else
Matthias Kloseb9621712010-04-24 17:59:49 +000011789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11790$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011791fi
11792
Guido van Rossum7f43da71994-08-01 12:15:30 +000011793
11794# check for --with-libc=...
11795
Matthias Kloseb9621712010-04-24 17:59:49 +000011796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11797$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011798
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011799# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011800if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011801 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011802if test "$withval" = no
11803then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11805$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011806elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011807then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11809$as_echo "set LIBC=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011810else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011811fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011812else
Matthias Kloseb9621712010-04-24 17:59:49 +000011813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11814$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011815fi
11816
Guido van Rossum7f43da71994-08-01 12:15:30 +000011817
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011818# **************************************************
11819# * Check for various properties of floating point *
11820# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011821
Matthias Kloseb9621712010-04-24 17:59:49 +000011822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11823$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011824if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011825 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011826else
11827
Matthias Kloseb9621712010-04-24 17:59:49 +000011828if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011829 ac_cv_little_endian_double=no
11830else
Matthias Kloseb9621712010-04-24 17:59:49 +000011831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011832/* end confdefs.h. */
11833
11834#include <string.h>
11835int main() {
11836 double x = 9006104071832581.0;
11837 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11838 return 0;
11839 else
11840 return 1;
11841}
11842
11843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011844if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011845 ac_cv_little_endian_double=yes
11846else
Matthias Kloseb9621712010-04-24 17:59:49 +000011847 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011848fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011849rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11850 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011851fi
11852
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011853fi
11854
Matthias Kloseb9621712010-04-24 17:59:49 +000011855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11856$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011857if test "$ac_cv_little_endian_double" = yes
11858then
11859
Matthias Kloseb9621712010-04-24 17:59:49 +000011860$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011861
11862fi
11863
Matthias Kloseb9621712010-04-24 17:59:49 +000011864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11865$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011866if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011867 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011868else
11869
Matthias Kloseb9621712010-04-24 17:59:49 +000011870if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011871 ac_cv_big_endian_double=no
11872else
Matthias Kloseb9621712010-04-24 17:59:49 +000011873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011874/* end confdefs.h. */
11875
11876#include <string.h>
11877int main() {
11878 double x = 9006104071832581.0;
11879 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11880 return 0;
11881 else
11882 return 1;
11883}
11884
11885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011886if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011887 ac_cv_big_endian_double=yes
11888else
Matthias Kloseb9621712010-04-24 17:59:49 +000011889 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011890fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011891rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11892 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011893fi
11894
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011895fi
11896
Matthias Kloseb9621712010-04-24 17:59:49 +000011897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11898$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011899if test "$ac_cv_big_endian_double" = yes
11900then
11901
Matthias Kloseb9621712010-04-24 17:59:49 +000011902$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011903
11904fi
11905
11906# Some ARM platforms use a mixed-endian representation for doubles.
11907# While Python doesn't currently have full support for these platforms
11908# (see e.g., issue 1762561), we can at least make sure that float <-> string
11909# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11911$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011912if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011913 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011914else
11915
Matthias Kloseb9621712010-04-24 17:59:49 +000011916if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011917 ac_cv_mixed_endian_double=no
11918else
Matthias Kloseb9621712010-04-24 17:59:49 +000011919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011920/* end confdefs.h. */
11921
11922#include <string.h>
11923int main() {
11924 double x = 9006104071832581.0;
11925 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11926 return 0;
11927 else
11928 return 1;
11929}
11930
11931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011932if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011933 ac_cv_mixed_endian_double=yes
11934else
Matthias Kloseb9621712010-04-24 17:59:49 +000011935 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011936fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011937rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11938 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011939fi
11940
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011941fi
11942
Matthias Kloseb9621712010-04-24 17:59:49 +000011943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11944$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011945if test "$ac_cv_mixed_endian_double" = yes
11946then
11947
Matthias Kloseb9621712010-04-24 17:59:49 +000011948$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011949
11950fi
11951
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011952# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011953# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011954# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011955# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011956# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011957# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011958
11959# This inline assembler syntax may also work for suncc and icc,
11960# so we try it on all platforms.
11961
Matthias Kloseb9621712010-04-24 17:59:49 +000011962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11963$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011965/* end confdefs.h. */
11966
11967int
11968main ()
11969{
11970
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011971 unsigned short cw;
11972 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11973 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011974
11975 ;
11976 return 0;
11977}
11978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011979if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011980 have_gcc_asm_for_x87=yes
11981else
Matthias Kloseb9621712010-04-24 17:59:49 +000011982 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011983fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11986$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011987if test "$have_gcc_asm_for_x87" = yes
11988then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011989
Matthias Kloseb9621712010-04-24 17:59:49 +000011990$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011991
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011992fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011993
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011994# Detect whether system arithmetic is subject to x87-style double
11995# rounding issues. The result of this test has little meaning on non
11996# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11997# mode is round-to-nearest and double rounding issues are present, and
11998# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12000$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012001# $BASECFLAGS may affect the result
12002ac_save_cc="$CC"
12003CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012004if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012005 ac_cv_x87_double_rounding=no
12006else
Matthias Kloseb9621712010-04-24 17:59:49 +000012007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012008/* end confdefs.h. */
12009
12010#include <stdlib.h>
12011#include <math.h>
12012int main() {
12013 volatile double x, y, z;
12014 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12015 x = 0.99999999999999989; /* 1-2**-53 */
12016 y = 1./x;
12017 if (y != 1.)
12018 exit(0);
12019 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12020 x = 1e16;
12021 y = 2.99999;
12022 z = x + y;
12023 if (z != 1e16+4.)
12024 exit(0);
12025 /* both tests show evidence of double rounding */
12026 exit(1);
12027}
12028
12029_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012030if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012031 ac_cv_x87_double_rounding=no
12032else
Matthias Kloseb9621712010-04-24 17:59:49 +000012033 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012034fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012035rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12036 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012037fi
12038
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012039CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12041$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012042if test "$ac_cv_x87_double_rounding" = yes
12043then
12044
Matthias Kloseb9621712010-04-24 17:59:49 +000012045$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012046
12047fi
12048
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012049# ************************************
12050# * Check for mathematical functions *
12051# ************************************
12052
12053LIBS_SAVE=$LIBS
12054LIBS="$LIBS $LIBM"
12055
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012056for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12057do :
12058 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12059ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012060if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012061 cat >>confdefs.h <<_ACEOF
12062#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12063_ACEOF
12064
12065fi
12066done
12067
12068for ac_func in hypot lgamma log1p round tgamma
12069do :
12070 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12071ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012072if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012073 cat >>confdefs.h <<_ACEOF
12074#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12075_ACEOF
12076
12077fi
12078done
12079
12080ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12081"
Gregory P. Smith69140482012-01-16 02:05:55 -080012082if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012083 ac_have_decl=1
12084else
12085 ac_have_decl=0
12086fi
12087
12088cat >>confdefs.h <<_ACEOF
12089#define HAVE_DECL_ISINF $ac_have_decl
12090_ACEOF
12091ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12092"
Gregory P. Smith69140482012-01-16 02:05:55 -080012093if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012094 ac_have_decl=1
12095else
12096 ac_have_decl=0
12097fi
12098
12099cat >>confdefs.h <<_ACEOF
12100#define HAVE_DECL_ISNAN $ac_have_decl
12101_ACEOF
12102ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12103"
Gregory P. Smith69140482012-01-16 02:05:55 -080012104if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012105 ac_have_decl=1
12106else
12107 ac_have_decl=0
12108fi
12109
12110cat >>confdefs.h <<_ACEOF
12111#define HAVE_DECL_ISFINITE $ac_have_decl
12112_ACEOF
12113
12114
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012115# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12116# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12118$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012119if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012120 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012121else
12122
Matthias Kloseb9621712010-04-24 17:59:49 +000012123if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012124 ac_cv_tanh_preserves_zero_sign=no
12125else
Matthias Kloseb9621712010-04-24 17:59:49 +000012126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012127/* end confdefs.h. */
12128
12129#include <math.h>
12130#include <stdlib.h>
12131int main() {
12132 /* return 0 if either negative zeros don't exist
12133 on this platform or if negative zeros exist
12134 and tanh(-0.) == -0. */
12135 if (atan2(0., -1.) == atan2(-0., -1.) ||
12136 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12137 else exit(1);
12138}
12139
12140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012141if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012142 ac_cv_tanh_preserves_zero_sign=yes
12143else
Matthias Kloseb9621712010-04-24 17:59:49 +000012144 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012145fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012146rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12147 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012148fi
12149
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012150fi
12151
Matthias Kloseb9621712010-04-24 17:59:49 +000012152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12153$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012154if test "$ac_cv_tanh_preserves_zero_sign" = yes
12155then
12156
Matthias Kloseb9621712010-04-24 17:59:49 +000012157$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012158
12159fi
12160
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012161if test "$ac_cv_func_log1p" = yes
12162then
12163 # On some versions of AIX, log1p(-0.) returns 0. instead of
12164 # -0. See issue #9920.
12165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12166$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012167 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012168 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012169else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012170
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012171 if test "$cross_compiling" = yes; then :
12172 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012173else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12175/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012176
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012177 #include <math.h>
12178 #include <stdlib.h>
12179 int main() {
12180 /* Fail if the signs of log1p(-0.) and -0. can be
12181 distinguished. */
12182 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12183 return 0;
12184 else
12185 return 1;
12186 }
12187
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012188_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012189if ac_fn_c_try_run "$LINENO"; then :
12190 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012191else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012192 ac_cv_log1p_drops_zero_sign=yes
12193fi
12194rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12195 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012196fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012197
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012198fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012199
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12201$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12202fi
12203if test "$ac_cv_log1p_drops_zero_sign" = yes
12204then
12205
12206$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12207
12208fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012209
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012210LIBS=$LIBS_SAVE
12211
Mark Dickinsona614f042009-11-28 12:48:43 +000012212# For multiprocessing module, check that sem_open
12213# actually works. For FreeBSD versions <= 7.2,
12214# the kernel module that provides POSIX semaphores
12215# isn't loaded by default, so an attempt to call
12216# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12218$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012219if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012220 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012221else
Matthias Kloseb9621712010-04-24 17:59:49 +000012222 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012223 ac_cv_posix_semaphores_enabled=yes
12224else
Matthias Kloseb9621712010-04-24 17:59:49 +000012225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012226/* end confdefs.h. */
12227
12228#include <unistd.h>
12229#include <fcntl.h>
12230#include <stdio.h>
12231#include <semaphore.h>
12232#include <sys/stat.h>
12233
12234int main(void) {
12235 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12236 if (a == SEM_FAILED) {
12237 perror("sem_open");
12238 return 1;
12239 }
12240 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012241 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012242 return 0;
12243}
12244
12245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012246if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012247 ac_cv_posix_semaphores_enabled=yes
12248else
Matthias Kloseb9621712010-04-24 17:59:49 +000012249 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012250fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012251rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12252 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012253fi
12254
12255
Mark Dickinsona614f042009-11-28 12:48:43 +000012256fi
12257
Matthias Kloseb9621712010-04-24 17:59:49 +000012258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12259$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012260if test $ac_cv_posix_semaphores_enabled = no
12261then
12262
Matthias Kloseb9621712010-04-24 17:59:49 +000012263$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012264
12265fi
12266
Mark Dickinson10683072009-04-18 21:18:19 +000012267# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12269$as_echo_n "checking for broken sem_getvalue... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012270if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012271 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012272else
Matthias Kloseb9621712010-04-24 17:59:49 +000012273 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012274 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012275else
Matthias Kloseb9621712010-04-24 17:59:49 +000012276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012277/* end confdefs.h. */
12278
12279#include <unistd.h>
12280#include <fcntl.h>
12281#include <stdio.h>
12282#include <semaphore.h>
12283#include <sys/stat.h>
12284
12285int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012286 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012287 int count;
12288 int res;
12289 if(a==SEM_FAILED){
12290 perror("sem_open");
12291 return 1;
12292
12293 }
12294 res = sem_getvalue(a, &count);
12295 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012296 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012297 return res==-1 ? 1 : 0;
12298}
12299
Mark Dickinson10683072009-04-18 21:18:19 +000012300_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012301if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012302 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012303else
Matthias Kloseb9621712010-04-24 17:59:49 +000012304 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012305fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012306rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12307 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012308fi
12309
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012310
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012311fi
12312
Matthias Kloseb9621712010-04-24 17:59:49 +000012313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12314$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012315if test $ac_cv_broken_sem_getvalue = yes
12316then
12317
Matthias Kloseb9621712010-04-24 17:59:49 +000012318$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012319
12320fi
12321
Mark Dickinsonbd792642009-03-18 20:06:12 +000012322# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12324$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012325# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012326if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012327 enableval=$enable_big_digits; case $enable_big_digits in
12328yes)
12329 enable_big_digits=30 ;;
12330no)
12331 enable_big_digits=15 ;;
1233215|30)
12333 ;;
12334*)
Gregory P. Smith69140482012-01-16 02:05:55 -080012335 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 +000012336esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12338$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012339
12340cat >>confdefs.h <<_ACEOF
12341#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12342_ACEOF
12343
12344
12345else
Matthias Kloseb9621712010-04-24 17:59:49 +000012346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12347$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012348fi
12349
12350
Guido van Rossumef2255b2000-03-10 22:30:29 +000012351# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012352ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -080012353if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012354
12355
Matthias Kloseb9621712010-04-24 17:59:49 +000012356$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012357
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012358 wchar_h="yes"
12359
Guido van Rossumef2255b2000-03-10 22:30:29 +000012360else
Martin v. Löwis11437992002-04-12 09:54:03 +000012361 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012362
12363fi
12364
Michael W. Hudson54241132001-12-07 15:38:26 +000012365
Martin v. Löwis11437992002-04-12 09:54:03 +000012366
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012367# determine wchar_t size
12368if test "$wchar_h" = yes
12369then
Matthias Kloseb9621712010-04-24 17:59:49 +000012370 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012371# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12372# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12373# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12375$as_echo_n "checking size of wchar_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012376if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012377 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012378else
Matthias Kloseb9621712010-04-24 17:59:49 +000012379 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12380"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012381
Martin v. Löwis11437992002-04-12 09:54:03 +000012382else
Matthias Kloseb9621712010-04-24 17:59:49 +000012383 if test "$ac_cv_type_wchar_t" = yes; then
12384 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12385$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012386as_fn_error 77 "cannot compute sizeof (wchar_t)
Gregory P. Smith69140482012-01-16 02:05:55 -080012387See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012388 else
12389 ac_cv_sizeof_wchar_t=0
12390 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012391fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012392
Martin v. Löwis11437992002-04-12 09:54:03 +000012393fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12395$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012396
12397
12398
Martin v. Löwis11437992002-04-12 09:54:03 +000012399cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012400#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012401_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012402
Michael W. Hudson54241132001-12-07 15:38:26 +000012403
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012404fi
12405
Matthias Kloseb9621712010-04-24 17:59:49 +000012406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12407$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012408have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012409cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012410/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012411
12412#include <tcl.h>
12413#if TCL_UTF_MAX != 6
12414# error "NOT UCS4_TCL"
12415#endif
12416int
12417main ()
12418{
12419
12420 ;
12421 return 0;
12422}
12423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012424if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012425
12426
Matthias Kloseb9621712010-04-24 17:59:49 +000012427$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012428
12429 have_ucs4_tcl=yes
12430
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012431fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12434$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012435
Skip Montanaro6dead952003-09-25 14:50:04 +000012436# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012437if test "$wchar_h" = yes
12438then
12439 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12441$as_echo_n "checking whether wchar_t is signed... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012442 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012443 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012444else
12445
Matthias Kloseb9621712010-04-24 17:59:49 +000012446 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012447 ac_cv_wchar_t_signed=yes
12448else
Matthias Kloseb9621712010-04-24 17:59:49 +000012449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012450/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012451
12452 #include <wchar.h>
12453 int main()
12454 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012455 /* Success: exit code 0 */
12456 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012457 }
12458
12459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012460if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012461 ac_cv_wchar_t_signed=yes
12462else
Matthias Kloseb9621712010-04-24 17:59:49 +000012463 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012464fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012465rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12466 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012467fi
12468
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012469fi
12470
Matthias Kloseb9621712010-04-24 17:59:49 +000012471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12472$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012473fi
12474
Matthias Kloseb9621712010-04-24 17:59:49 +000012475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12476$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012477
12478# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012479if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012480 withval=$with_wide_unicode;
12481if test "$withval" != no
12482then unicode_size="4"
12483else unicode_size="2"
12484fi
12485
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012486else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012487
Georg Brandl52d168a2008-01-07 18:10:24 +000012488case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012489 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012490 *) unicode_size="2" ;;
12491esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012492
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012493fi
12494
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012495
12496
Georg Brandl52d168a2008-01-07 18:10:24 +000012497case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012498 4)
12499 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12500
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012501 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012502 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012503 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012504 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012505esac
12506
Michael W. Hudson54241132001-12-07 15:38:26 +000012507
Martin v. Löwis11437992002-04-12 09:54:03 +000012508
Georg Brandl52d168a2008-01-07 18:10:24 +000012509# wchar_t is only usable if it maps to an unsigned type
12510if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012511 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012512then
12513 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012514
Matthias Kloseb9621712010-04-24 17:59:49 +000012515$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012516
Matthias Kloseb9621712010-04-24 17:59:49 +000012517 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012518
Georg Brandl52d168a2008-01-07 18:10:24 +000012519elif test "$ac_cv_sizeof_short" = "$unicode_size"
12520then
12521 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012522 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012523
Georg Brandl52d168a2008-01-07 18:10:24 +000012524elif test "$ac_cv_sizeof_long" = "$unicode_size"
12525then
12526 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012527 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012528
Georg Brandl52d168a2008-01-07 18:10:24 +000012529else
12530 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012531fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12533$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012534
12535# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12537$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012538if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012539 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012540else
Matthias Kloseb9621712010-04-24 17:59:49 +000012541 ac_cv_c_bigendian=unknown
12542 # See if we're dealing with a universal compiler.
12543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12544/* end confdefs.h. */
12545#ifndef __APPLE_CC__
12546 not a universal capable compiler
12547 #endif
12548 typedef int dummy;
12549
Skip Montanaro6dead952003-09-25 14:50:04 +000012550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012551if ac_fn_c_try_compile "$LINENO"; then :
12552
12553 # Check for potential -arch flags. It is not universal unless
12554 # there are at least two -arch flags with different values.
12555 ac_arch=
12556 ac_prev=
12557 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12558 if test -n "$ac_prev"; then
12559 case $ac_word in
12560 i?86 | x86_64 | ppc | ppc64)
12561 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12562 ac_arch=$ac_word
12563 else
12564 ac_cv_c_bigendian=universal
12565 break
12566 fi
12567 ;;
12568 esac
12569 ac_prev=
12570 elif test "x$ac_word" = "x-arch"; then
12571 ac_prev=arch
12572 fi
12573 done
12574fi
12575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12576 if test $ac_cv_c_bigendian = unknown; then
12577 # See if sys/param.h defines the BYTE_ORDER macro.
12578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012579/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012580#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012581 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012582
Martin v. Löwis11437992002-04-12 09:54:03 +000012583int
12584main ()
12585{
Matthias Kloseb9621712010-04-24 17:59:49 +000012586#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12587 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12588 && LITTLE_ENDIAN)
12589 bogus endian macros
12590 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012591
12592 ;
12593 return 0;
12594}
12595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012596if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012597 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012599/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012600#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012601 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012602
Martin v. Löwis11437992002-04-12 09:54:03 +000012603int
12604main ()
12605{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012606#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012607 not big endian
12608 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012609
12610 ;
12611 return 0;
12612}
12613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012614if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012615 ac_cv_c_bigendian=yes
12616else
Matthias Kloseb9621712010-04-24 17:59:49 +000012617 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012618fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012620fi
12621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12622 fi
12623 if test $ac_cv_c_bigendian = unknown; then
12624 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012626/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012627#include <limits.h>
12628
Martin v. Löwis11437992002-04-12 09:54:03 +000012629int
12630main ()
12631{
Matthias Kloseb9621712010-04-24 17:59:49 +000012632#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12633 bogus endian macros
12634 #endif
12635
Martin v. Löwis11437992002-04-12 09:54:03 +000012636 ;
12637 return 0;
12638}
12639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012640if ac_fn_c_try_compile "$LINENO"; then :
12641 # It does; now see whether it defined to _BIG_ENDIAN or not.
12642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12643/* end confdefs.h. */
12644#include <limits.h>
12645
12646int
12647main ()
12648{
12649#ifndef _BIG_ENDIAN
12650 not big endian
12651 #endif
12652
12653 ;
12654 return 0;
12655}
12656_ACEOF
12657if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012658 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012659else
Matthias Kloseb9621712010-04-24 17:59:49 +000012660 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012661fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12663fi
12664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12665 fi
12666 if test $ac_cv_c_bigendian = unknown; then
12667 # Compile a test program.
12668 if test "$cross_compiling" = yes; then :
12669 # Try to guess by grepping values from an object file.
12670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12671/* end confdefs.h. */
12672short int ascii_mm[] =
12673 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12674 short int ascii_ii[] =
12675 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12676 int use_ascii (int i) {
12677 return ascii_mm[i] + ascii_ii[i];
12678 }
12679 short int ebcdic_ii[] =
12680 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12681 short int ebcdic_mm[] =
12682 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12683 int use_ebcdic (int i) {
12684 return ebcdic_mm[i] + ebcdic_ii[i];
12685 }
12686 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012687
Matthias Kloseb9621712010-04-24 17:59:49 +000012688int
12689main ()
12690{
12691return use_ascii (foo) == use_ebcdic (foo);
12692 ;
12693 return 0;
12694}
12695_ACEOF
12696if ac_fn_c_try_compile "$LINENO"; then :
12697 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12698 ac_cv_c_bigendian=yes
12699 fi
12700 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12701 if test "$ac_cv_c_bigendian" = unknown; then
12702 ac_cv_c_bigendian=no
12703 else
12704 # finding both strings is unlikely to happen, but who knows?
12705 ac_cv_c_bigendian=unknown
12706 fi
12707 fi
12708fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012710else
Matthias Kloseb9621712010-04-24 17:59:49 +000012711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012712/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012713$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012714int
12715main ()
12716{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012717
Matthias Kloseb9621712010-04-24 17:59:49 +000012718 /* Are we little or big endian? From Harbison&Steele. */
12719 union
12720 {
12721 long int l;
12722 char c[sizeof (long int)];
12723 } u;
12724 u.l = 1;
12725 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012726
12727 ;
12728 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012729}
Martin v. Löwis11437992002-04-12 09:54:03 +000012730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012731if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012732 ac_cv_c_bigendian=no
12733else
Matthias Kloseb9621712010-04-24 17:59:49 +000012734 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012735fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012736rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12737 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012738fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012739
Matthias Kloseb9621712010-04-24 17:59:49 +000012740 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012741fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12743$as_echo "$ac_cv_c_bigendian" >&6; }
12744 case $ac_cv_c_bigendian in #(
12745 yes)
12746 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12747;; #(
12748 no)
12749 ;; #(
12750 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012751
Matthias Kloseb9621712010-04-24 17:59:49 +000012752$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012753
Matthias Kloseb9621712010-04-24 17:59:49 +000012754 ;; #(
12755 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012756 as_fn_error $? "unknown endianness
Gregory P. Smith69140482012-01-16 02:05:55 -080012757 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012758 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012759
Michael W. Hudson54241132001-12-07 15:38:26 +000012760
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012761# ABI version string for Python extension modules. This appears between the
12762# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12763# from the following attributes which affect the ABI of this Python build (in
12764# this order):
12765#
12766# * The Python implementation (always 'cpython-' for us)
12767# * The major and minor version numbers
12768# * --with-pydebug (adds a 'd')
12769# * --with-pymalloc (adds a 'm')
12770# * --with-wide-unicode (adds a 'u')
12771#
12772# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012773# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12774# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012775
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12777$as_echo_n "checking ABIFLAGS... " >&6; }
12778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12779$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12781$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012782SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12784$as_echo "$SOABI" >&6; }
12785
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12787$as_echo_n "checking LDVERSION... " >&6; }
12788LDVERSION='$(VERSION)$(ABIFLAGS)'
12789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12790$as_echo "$LDVERSION" >&6; }
12791
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012792# SO is the extension of shared libraries `(including the dot!)
12793# -- usually .so, .sl on HP-UX, .dll on Cygwin
12794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12795$as_echo_n "checking SO... " >&6; }
12796if test -z "$SO"
12797then
12798 case $ac_sys_system in
12799 hp*|HP*)
12800 case `uname -m` in
12801 ia64) SO=.so;;
12802 *) SO=.sl;;
12803 esac
12804 ;;
12805 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012806 Linux*|GNU*)
12807 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012808 *) SO=.so;;
12809 esac
12810else
12811 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012812 echo
12813 echo '====================================================================='
12814 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012815 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012816 echo '+ Do you really mean to change the extension for shared libraries? +'
12817 echo '+ Continuing in 10 seconds to let you to ponder. +'
12818 echo '+ +'
12819 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012820 sleep 10
12821fi
12822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12823$as_echo "$SO" >&6; }
12824
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012825# Check whether right shifting a negative integer extends the sign bit
12826# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12828$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012829if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012830 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012831else
Martin v. Löwis11437992002-04-12 09:54:03 +000012832
Matthias Kloseb9621712010-04-24 17:59:49 +000012833if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012834 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012835else
Matthias Kloseb9621712010-04-24 17:59:49 +000012836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012837/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012838
12839int main()
12840{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012841 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012842}
12843
Martin v. Löwis11437992002-04-12 09:54:03 +000012844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012845if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012846 ac_cv_rshift_extends_sign=yes
12847else
Matthias Kloseb9621712010-04-24 17:59:49 +000012848 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012849fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012850rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12851 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012852fi
12853
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012854fi
12855
Matthias Kloseb9621712010-04-24 17:59:49 +000012856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12857$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012858if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012859then
Martin v. Löwis11437992002-04-12 09:54:03 +000012860
Matthias Kloseb9621712010-04-24 17:59:49 +000012861$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012862
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012863fi
12864
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012865# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12867$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012868if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012869 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012870else
Martin v. Löwis11437992002-04-12 09:54:03 +000012871
Matthias Kloseb9621712010-04-24 17:59:49 +000012872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012873/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012874#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012875int
12876main ()
12877{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012878
12879 FILE *f = fopen("/dev/null", "r");
12880 flockfile(f);
12881 getc_unlocked(f);
12882 funlockfile(f);
12883
Martin v. Löwis11437992002-04-12 09:54:03 +000012884 ;
12885 return 0;
12886}
12887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012888if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012889 ac_cv_have_getc_unlocked=yes
12890else
Matthias Kloseb9621712010-04-24 17:59:49 +000012891 ac_cv_have_getc_unlocked=no
12892fi
12893rm -f core conftest.err conftest.$ac_objext \
12894 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012895fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012896
Matthias Kloseb9621712010-04-24 17:59:49 +000012897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12898$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012899if test "$ac_cv_have_getc_unlocked" = yes
12900then
Martin v. Löwis11437992002-04-12 09:54:03 +000012901
Matthias Kloseb9621712010-04-24 17:59:49 +000012902$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012903
12904fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012905
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012906# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012907# save the value of LIBS so we don't actually link Python with readline
12908LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012909
Gregory P. Smith18820942008-09-07 06:24:49 +000012910# On some systems we need to link readline to a termcap compatible
12911# library. NOTE: Keep the precedence of listed libraries synchronised
12912# with setup.py.
12913py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12915$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012916for py_libtermcap in "" ncursesw ncurses curses termcap; do
12917 if test -z "$py_libtermcap"; then
12918 READLINE_LIBS="-lreadline"
12919 else
12920 READLINE_LIBS="-lreadline -l$py_libtermcap"
12921 fi
12922 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012924/* end confdefs.h. */
12925
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012926/* Override any GCC internal prototype to avoid an error.
12927 Use char because int might match the return type of a GCC
12928 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012929#ifdef __cplusplus
12930extern "C"
12931#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012932char readline ();
12933int
12934main ()
12935{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012936return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012937 ;
12938 return 0;
12939}
12940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012941if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012942 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012943fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012944rm -f core conftest.err conftest.$ac_objext \
12945 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012946 if test $py_cv_lib_readline = yes; then
12947 break
12948 fi
12949done
12950# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12951#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012952if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12954$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012955else
Matthias Kloseb9621712010-04-24 17:59:49 +000012956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12957$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012958
Matthias Kloseb9621712010-04-24 17:59:49 +000012959$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012960
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012961fi
12962
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012963# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12965$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012966if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012967 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012968else
12969 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012970LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012972/* end confdefs.h. */
12973
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012974/* Override any GCC internal prototype to avoid an error.
12975 Use char because int might match the return type of a GCC
12976 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012977#ifdef __cplusplus
12978extern "C"
12979#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012980char rl_callback_handler_install ();
12981int
12982main ()
12983{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012984return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012985 ;
12986 return 0;
12987}
12988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012989if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012990 ac_cv_lib_readline_rl_callback_handler_install=yes
12991else
Matthias Kloseb9621712010-04-24 17:59:49 +000012992 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012993fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012994rm -f core conftest.err conftest.$ac_objext \
12995 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012996LIBS=$ac_check_lib_save_LIBS
12997fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12999$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013000if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013001
Matthias Kloseb9621712010-04-24 17:59:49 +000013002$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013003
13004fi
13005
13006
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013007# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013009/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013010#include <readline/readline.h>
13011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013012if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013013 have_readline=yes
13014else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013015 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013016
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013017fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013018rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013019if test $have_readline = yes
13020then
Matthias Kloseb9621712010-04-24 17:59:49 +000013021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013022/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013023#include <readline/readline.h>
13024
13025_ACEOF
13026if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013027 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013028
Matthias Kloseb9621712010-04-24 17:59:49 +000013029$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013030
13031fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013032rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013033
Matthias Kloseb9621712010-04-24 17:59:49 +000013034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013035/* end confdefs.h. */
13036#include <readline/readline.h>
13037
13038_ACEOF
13039if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013040 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013041
Matthias Kloseb9621712010-04-24 17:59:49 +000013042$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013043
13044fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013045rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013046
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013047fi
13048
Martin v. Löwis0daad592001-09-30 21:09:59 +000013049# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13051$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013052if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013053 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013054else
Martin v. Löwis11437992002-04-12 09:54:03 +000013055 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013056LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013058/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013059
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013060/* Override any GCC internal prototype to avoid an error.
13061 Use char because int might match the return type of a GCC
13062 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013063#ifdef __cplusplus
13064extern "C"
13065#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013066char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013067int
13068main ()
13069{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013070return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013071 ;
13072 return 0;
13073}
13074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013075if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013076 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013077else
Matthias Kloseb9621712010-04-24 17:59:49 +000013078 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013079fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013080rm -f core conftest.err conftest.$ac_objext \
13081 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013082LIBS=$ac_check_lib_save_LIBS
13083fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13085$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013086if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013087
Matthias Kloseb9621712010-04-24 17:59:49 +000013088$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013089
Martin v. Löwis0daad592001-09-30 21:09:59 +000013090fi
13091
Michael W. Hudson54241132001-12-07 15:38:26 +000013092
Thomas Wouters89d996e2007-09-08 17:39:28 +000013093# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13095$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013096if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013097 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013098else
13099 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013100LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013102/* end confdefs.h. */
13103
13104/* Override any GCC internal prototype to avoid an error.
13105 Use char because int might match the return type of a GCC
13106 builtin and then its argument prototype would still apply. */
13107#ifdef __cplusplus
13108extern "C"
13109#endif
13110char rl_completion_display_matches_hook ();
13111int
13112main ()
13113{
13114return rl_completion_display_matches_hook ();
13115 ;
13116 return 0;
13117}
13118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013119if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013120 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13121else
Matthias Kloseb9621712010-04-24 17:59:49 +000013122 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013123fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013124rm -f core conftest.err conftest.$ac_objext \
13125 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013126LIBS=$ac_check_lib_save_LIBS
13127fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13129$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013130if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013131
Matthias Kloseb9621712010-04-24 17:59:49 +000013132$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013133
13134fi
13135
13136
Martin v. Löwis0daad592001-09-30 21:09:59 +000013137# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13139$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013140if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013141 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013142else
Martin v. Löwis11437992002-04-12 09:54:03 +000013143 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013144LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013146/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013147
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013148/* Override any GCC internal prototype to avoid an error.
13149 Use char because int might match the return type of a GCC
13150 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013151#ifdef __cplusplus
13152extern "C"
13153#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013154char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013155int
13156main ()
13157{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013158return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013159 ;
13160 return 0;
13161}
13162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013163if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013164 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013165else
Matthias Kloseb9621712010-04-24 17:59:49 +000013166 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013167fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013168rm -f core conftest.err conftest.$ac_objext \
13169 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013170LIBS=$ac_check_lib_save_LIBS
13171fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13173$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013174if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013175
Matthias Kloseb9621712010-04-24 17:59:49 +000013176$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013177
Guido van Rossum353ae582001-07-10 16:45:32 +000013178fi
13179
Jack Jansendd19cf82001-12-06 22:36:17 +000013180
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013181# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013183/* end confdefs.h. */
13184#include <readline/readline.h>
13185_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013186if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013187 have_readline=yes
13188else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013189 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013190
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013191fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013192rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013193if test $have_readline = yes
13194then
Matthias Kloseb9621712010-04-24 17:59:49 +000013195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013196/* end confdefs.h. */
13197#include <readline/readline.h>
13198
13199_ACEOF
13200if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013201 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013202
Matthias Kloseb9621712010-04-24 17:59:49 +000013203$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013204
13205fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013206rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013207
13208fi
13209
Martin v. Löwis82bca632006-02-10 20:49:30 +000013210# End of readline checks: restore LIBS
13211LIBS=$LIBS_no_readline
13212
Matthias Kloseb9621712010-04-24 17:59:49 +000013213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13214$as_echo_n "checking for broken nice()... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013215if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013216 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013217else
Martin v. Löwis11437992002-04-12 09:54:03 +000013218
Matthias Kloseb9621712010-04-24 17:59:49 +000013219if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013220 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013221else
Matthias Kloseb9621712010-04-24 17:59:49 +000013222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013223/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013224
13225int main()
13226{
13227 int val1 = nice(1);
13228 if (val1 != -1 && val1 == nice(2))
13229 exit(0);
13230 exit(1);
13231}
13232
Martin v. Löwis11437992002-04-12 09:54:03 +000013233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013234if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013235 ac_cv_broken_nice=yes
13236else
Matthias Kloseb9621712010-04-24 17:59:49 +000013237 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013239rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13240 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013241fi
13242
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013243fi
13244
Matthias Kloseb9621712010-04-24 17:59:49 +000013245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13246$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013247if test "$ac_cv_broken_nice" = yes
13248then
Martin v. Löwis11437992002-04-12 09:54:03 +000013249
Matthias Kloseb9621712010-04-24 17:59:49 +000013250$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013251
13252fi
13253
Matthias Kloseb9621712010-04-24 17:59:49 +000013254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13255$as_echo_n "checking for broken poll()... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013256if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013257 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013258else
Matthias Kloseb9621712010-04-24 17:59:49 +000013259 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013260 ac_cv_broken_poll=no
13261else
Matthias Kloseb9621712010-04-24 17:59:49 +000013262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013263/* end confdefs.h. */
13264
13265#include <poll.h>
13266
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013267int main()
13268{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013269 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013270 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013271
13272 close (42);
13273
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013274 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013275 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013276 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013277 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013278 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013279 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013280 return 1;
13281}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013282
13283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013284if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013285 ac_cv_broken_poll=yes
13286else
Matthias Kloseb9621712010-04-24 17:59:49 +000013287 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013288fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013289rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13290 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013292
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013293fi
13294
Matthias Kloseb9621712010-04-24 17:59:49 +000013295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13296$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013297if test "$ac_cv_broken_poll" = yes
13298then
13299
Matthias Kloseb9621712010-04-24 17:59:49 +000013300$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013301
13302fi
13303
Brett Cannon43802422005-02-10 20:48:03 +000013304# 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 +000013305# (which is not required by ISO C or UNIX spec) and/or if we support
13306# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013307ac_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 +000013308#include <$ac_cv_struct_tm>
13309
Matthias Kloseb9621712010-04-24 17:59:49 +000013310"
Gregory P. Smith69140482012-01-16 02:05:55 -080013311if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013312
13313cat >>confdefs.h <<_ACEOF
13314#define HAVE_STRUCT_TM_TM_ZONE 1
13315_ACEOF
13316
13317
13318fi
13319
13320if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13321
Matthias Kloseb9621712010-04-24 17:59:49 +000013322$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013323
13324else
Matthias Kloseb9621712010-04-24 17:59:49 +000013325 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13326"
Gregory P. Smith69140482012-01-16 02:05:55 -080013327if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013328 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013329else
Matthias Kloseb9621712010-04-24 17:59:49 +000013330 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013331fi
13332
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013333cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013334#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013335_ACEOF
13336
Matthias Kloseb9621712010-04-24 17:59:49 +000013337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13338$as_echo_n "checking for tzname... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013339if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013340 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013341else
Matthias Kloseb9621712010-04-24 17:59:49 +000013342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013343/* end confdefs.h. */
13344#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013345#if !HAVE_DECL_TZNAME
13346extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013347#endif
13348
13349int
13350main ()
13351{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013352return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013353 ;
13354 return 0;
13355}
13356_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013357if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013358 ac_cv_var_tzname=yes
13359else
Matthias Kloseb9621712010-04-24 17:59:49 +000013360 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013361fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013362rm -f core conftest.err conftest.$ac_objext \
13363 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013364fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13366$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013367 if test $ac_cv_var_tzname = yes; then
13368
Matthias Kloseb9621712010-04-24 17:59:49 +000013369$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013370
13371 fi
13372fi
13373
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013374
Martin v. Löwis1d459062005-03-14 21:23:33 +000013375# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13377$as_echo_n "checking for working tzset()... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013378if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013379 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013380else
13381
Matthias Kloseb9621712010-04-24 17:59:49 +000013382if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013383 ac_cv_working_tzset=no
13384else
Matthias Kloseb9621712010-04-24 17:59:49 +000013385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013386/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013387
13388#include <stdlib.h>
13389#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013390#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013391
13392#if HAVE_TZNAME
13393extern char *tzname[];
13394#endif
13395
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013396int main()
13397{
Brett Cannon18367812003-09-19 00:59:16 +000013398 /* Note that we need to ensure that not only does tzset(3)
13399 do 'something' with localtime, but it works as documented
13400 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013401 This includes making sure that tzname is set properly if
13402 tm->tm_zone does not exist since it is the alternative way
13403 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013404
13405 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013406 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013407 */
13408
Martin v. Löwis1d459062005-03-14 21:23:33 +000013409 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013410 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13411
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013412 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013413 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013414 if (localtime(&groundhogday)->tm_hour != 0)
13415 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013416#if HAVE_TZNAME
13417 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13418 if (strcmp(tzname[0], "UTC") ||
13419 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13420 exit(1);
13421#endif
Brett Cannon18367812003-09-19 00:59:16 +000013422
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013423 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013424 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013425 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013426 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013427#if HAVE_TZNAME
13428 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13429 exit(1);
13430#endif
Brett Cannon18367812003-09-19 00:59:16 +000013431
13432 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13433 tzset();
13434 if (localtime(&groundhogday)->tm_hour != 11)
13435 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013436#if HAVE_TZNAME
13437 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13438 exit(1);
13439#endif
13440
13441#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013442 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13443 exit(1);
13444 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13445 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013446#endif
Brett Cannon18367812003-09-19 00:59:16 +000013447
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013448 exit(0);
13449}
13450
13451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013452if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013453 ac_cv_working_tzset=yes
13454else
Matthias Kloseb9621712010-04-24 17:59:49 +000013455 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013456fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013457rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13458 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013459fi
13460
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013461fi
13462
Matthias Kloseb9621712010-04-24 17:59:49 +000013463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13464$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013465if test "$ac_cv_working_tzset" = yes
13466then
13467
Matthias Kloseb9621712010-04-24 17:59:49 +000013468$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013469
13470fi
13471
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013472# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13474$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013475if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013476 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013477else
Matthias Kloseb9621712010-04-24 17:59:49 +000013478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013479/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013480#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013481int
13482main ()
13483{
13484
13485struct stat st;
13486st.st_mtim.tv_nsec = 1;
13487
13488 ;
13489 return 0;
13490}
13491_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013492if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013493 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013494else
Matthias Kloseb9621712010-04-24 17:59:49 +000013495 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013496fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13498fi
13499
Matthias Kloseb9621712010-04-24 17:59:49 +000013500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13501$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013502if test "$ac_cv_stat_tv_nsec" = yes
13503then
13504
Matthias Kloseb9621712010-04-24 17:59:49 +000013505$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013506
13507fi
13508
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013509# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13511$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013512if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013513 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013514else
Matthias Kloseb9621712010-04-24 17:59:49 +000013515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013516/* end confdefs.h. */
13517#include <sys/stat.h>
13518int
13519main ()
13520{
13521
13522struct stat st;
13523st.st_mtimespec.tv_nsec = 1;
13524
13525 ;
13526 return 0;
13527}
13528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013529if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013530 ac_cv_stat_tv_nsec2=yes
13531else
Matthias Kloseb9621712010-04-24 17:59:49 +000013532 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013533fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13535fi
13536
Matthias Kloseb9621712010-04-24 17:59:49 +000013537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13538$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013539if test "$ac_cv_stat_tv_nsec2" = yes
13540then
13541
Matthias Kloseb9621712010-04-24 17:59:49 +000013542$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013543
13544fi
13545
Jack Jansen666b1e72001-10-31 12:11:48 +000013546# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13548$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013549if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013550 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013551else
Matthias Kloseb9621712010-04-24 17:59:49 +000013552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013553/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013554#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013555int
13556main ()
13557{
Jack Jansen666b1e72001-10-31 12:11:48 +000013558
13559 int rtn;
13560 rtn = mvwdelch(0,0,0);
13561
Martin v. Löwis11437992002-04-12 09:54:03 +000013562 ;
13563 return 0;
13564}
13565_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013566if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013567 ac_cv_mvwdelch_is_expression=yes
13568else
Matthias Kloseb9621712010-04-24 17:59:49 +000013569 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013570fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13572fi
13573
Matthias Kloseb9621712010-04-24 17:59:49 +000013574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13575$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013576
13577if test "$ac_cv_mvwdelch_is_expression" = yes
13578then
Martin v. Löwis11437992002-04-12 09:54:03 +000013579
Matthias Kloseb9621712010-04-24 17:59:49 +000013580$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013581
13582fi
13583
Matthias Kloseb9621712010-04-24 17:59:49 +000013584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13585$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013586if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013587 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013588else
Matthias Kloseb9621712010-04-24 17:59:49 +000013589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013590/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013591#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013592int
13593main ()
13594{
Jack Jansen666b1e72001-10-31 12:11:48 +000013595
13596 WINDOW *w;
13597 w->_flags = 0;
13598
Martin v. Löwis11437992002-04-12 09:54:03 +000013599 ;
13600 return 0;
13601}
13602_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013603if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013604 ac_cv_window_has_flags=yes
13605else
Matthias Kloseb9621712010-04-24 17:59:49 +000013606 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13609fi
13610
Matthias Kloseb9621712010-04-24 17:59:49 +000013611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13612$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013613
Jack Jansen666b1e72001-10-31 12:11:48 +000013614
13615if test "$ac_cv_window_has_flags" = yes
13616then
Martin v. Löwis11437992002-04-12 09:54:03 +000013617
Matthias Kloseb9621712010-04-24 17:59:49 +000013618$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013619
13620fi
13621
Matthias Kloseb9621712010-04-24 17:59:49 +000013622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13623$as_echo_n "checking for is_term_resized... " >&6; }
13624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013625/* end confdefs.h. */
13626#include <curses.h>
13627int
13628main ()
13629{
13630void *x=is_term_resized
13631 ;
13632 return 0;
13633}
13634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013635if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013636
Matthias Kloseb9621712010-04-24 17:59:49 +000013637$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013638
Matthias Kloseb159a552010-04-25 21:00:44 +000013639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013640$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013641else
Matthias Kloseb9621712010-04-24 17:59:49 +000013642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13643$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013644
13645fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13647
Matthias Kloseb9621712010-04-24 17:59:49 +000013648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13649$as_echo_n "checking for resize_term... " >&6; }
13650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013651/* end confdefs.h. */
13652#include <curses.h>
13653int
13654main ()
13655{
13656void *x=resize_term
13657 ;
13658 return 0;
13659}
13660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013661if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013662
Matthias Kloseb9621712010-04-24 17:59:49 +000013663$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013664
Matthias Kloseb159a552010-04-25 21:00:44 +000013665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013666$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013667else
Matthias Kloseb9621712010-04-24 17:59:49 +000013668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13669$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013670
13671fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13673
Matthias Kloseb9621712010-04-24 17:59:49 +000013674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13675$as_echo_n "checking for resizeterm... " >&6; }
13676cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013677/* end confdefs.h. */
13678#include <curses.h>
13679int
13680main ()
13681{
13682void *x=resizeterm
13683 ;
13684 return 0;
13685}
13686_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013687if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013688
Matthias Kloseb9621712010-04-24 17:59:49 +000013689$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013690
Matthias Kloseb159a552010-04-25 21:00:44 +000013691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013692$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013693else
Matthias Kloseb9621712010-04-24 17:59:49 +000013694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13695$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013696
13697fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13699
Matthias Kloseb9621712010-04-24 17:59:49 +000013700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13701$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013702
13703if test -r /dev/ptmx
13704then
Matthias Kloseb9621712010-04-24 17:59:49 +000013705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13706$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013707
Matthias Kloseb9621712010-04-24 17:59:49 +000013708$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013709
Thomas Wouters89f507f2006-12-13 04:49:30 +000013710else
Matthias Kloseb9621712010-04-24 17:59:49 +000013711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13712$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013713fi
13714
Matthias Kloseb9621712010-04-24 17:59:49 +000013715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13716$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013717
13718if test -r /dev/ptc
13719then
Matthias Kloseb9621712010-04-24 17:59:49 +000013720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13721$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013722
Matthias Kloseb9621712010-04-24 17:59:49 +000013723$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013724
Thomas Wouters89f507f2006-12-13 04:49:30 +000013725else
Matthias Kloseb9621712010-04-24 17:59:49 +000013726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13727$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013728fi
13729
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013730if test "$have_long_long" = yes
13731then
Matthias Kloseb9621712010-04-24 17:59:49 +000013732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13733$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013734 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013735 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013736else
Matthias Kloseb9621712010-04-24 17:59:49 +000013737 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013738 ac_cv_have_long_long_format=no
13739else
Matthias Kloseb9621712010-04-24 17:59:49 +000013740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013741/* end confdefs.h. */
13742
13743 #include <stdio.h>
13744 #include <stddef.h>
13745 #include <string.h>
13746
13747 #ifdef HAVE_SYS_TYPES_H
13748 #include <sys/types.h>
13749 #endif
13750
13751 int main()
13752 {
13753 char buffer[256];
13754
13755 if (sprintf(buffer, "%lld", (long long)123) < 0)
13756 return 1;
13757 if (strcmp(buffer, "123"))
13758 return 1;
13759
13760 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13761 return 1;
13762 if (strcmp(buffer, "-123"))
13763 return 1;
13764
13765 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13766 return 1;
13767 if (strcmp(buffer, "123"))
13768 return 1;
13769
13770 return 0;
13771 }
13772
13773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013774if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013775 ac_cv_have_long_long_format=yes
13776else
Matthias Kloseb9621712010-04-24 17:59:49 +000013777 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013778fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013779rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13780 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013781fi
13782
13783
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013784fi
13785
Matthias Kloseb9621712010-04-24 17:59:49 +000013786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13787$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013788fi
13789
Mark Dickinson89d7d412009-12-31 20:50:59 +000013790if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013791then
13792
Matthias Kloseb9621712010-04-24 17:59:49 +000013793$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013794
13795fi
13796
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013797if test $ac_sys_system = Darwin
13798then
13799 LIBS="$LIBS -framework CoreFoundation"
13800fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013801
Matthias Kloseb9621712010-04-24 17:59:49 +000013802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13803$as_echo_n "checking for %zd printf() format support... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013804if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013805 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013806else
Matthias Kloseb9621712010-04-24 17:59:49 +000013807 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013808 ac_cv_have_size_t_format="cross -- assuming yes"
13809
Thomas Wouters477c8d52006-05-27 19:21:47 +000013810else
Matthias Kloseb9621712010-04-24 17:59:49 +000013811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013812/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013813
Thomas Wouters477c8d52006-05-27 19:21:47 +000013814#include <stdio.h>
13815#include <stddef.h>
13816#include <string.h>
13817
Christian Heimes2c181612007-12-17 20:04:13 +000013818#ifdef HAVE_SYS_TYPES_H
13819#include <sys/types.h>
13820#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013821
13822#ifdef HAVE_SSIZE_T
13823typedef ssize_t Py_ssize_t;
13824#elif SIZEOF_VOID_P == SIZEOF_LONG
13825typedef long Py_ssize_t;
13826#else
13827typedef int Py_ssize_t;
13828#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013829
Christian Heimes2c181612007-12-17 20:04:13 +000013830int main()
13831{
13832 char buffer[256];
13833
Thomas Wouters477c8d52006-05-27 19:21:47 +000013834 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13835 return 1;
13836
Thomas Wouters89f507f2006-12-13 04:49:30 +000013837 if (strcmp(buffer, "123"))
13838 return 1;
13839
13840 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13841 return 1;
13842
13843 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013844 return 1;
13845
13846 return 0;
13847}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013848
Thomas Wouters477c8d52006-05-27 19:21:47 +000013849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013850if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013851 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013852else
Matthias Kloseb9621712010-04-24 17:59:49 +000013853 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013854fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013855rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13856 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013857fi
13858
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013859fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13861$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013862if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013863
Matthias Kloseb9621712010-04-24 17:59:49 +000013864$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013865
13866fi
13867
Matthias Kloseb9621712010-04-24 17:59:49 +000013868ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013869#ifdef HAVE_SYS_TYPES_H
13870#include <sys/types.h>
13871#endif
13872#ifdef HAVE_SYS_SOCKET_H
13873#include <sys/socket.h>
13874#endif
13875
Matthias Kloseb9621712010-04-24 17:59:49 +000013876"
Gregory P. Smith69140482012-01-16 02:05:55 -080013877if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013878
Martin v. Löwis11437992002-04-12 09:54:03 +000013879else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013880
Matthias Kloseb9621712010-04-24 17:59:49 +000013881$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013882
13883fi
13884
Michael W. Hudson54241132001-12-07 15:38:26 +000013885
Matthias Kloseb9621712010-04-24 17:59:49 +000013886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13887$as_echo_n "checking for broken mbstowcs... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013888if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013889 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013890else
Matthias Kloseb9621712010-04-24 17:59:49 +000013891 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013892 ac_cv_broken_mbstowcs=no
13893else
Matthias Kloseb9621712010-04-24 17:59:49 +000013894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013895/* end confdefs.h. */
13896
13897#include<stdlib.h>
13898int main() {
13899 size_t len = -1;
13900 const char *str = "text";
13901 len = mbstowcs(NULL, str, 0);
13902 return (len != 4);
13903}
13904
13905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013906if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013907 ac_cv_broken_mbstowcs=no
13908else
Matthias Kloseb9621712010-04-24 17:59:49 +000013909 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013910fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013911rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13912 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013913fi
13914
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013915fi
13916
Matthias Kloseb9621712010-04-24 17:59:49 +000013917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13918$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013919if test "$ac_cv_broken_mbstowcs" = yes
13920then
13921
Matthias Kloseb9621712010-04-24 17:59:49 +000013922$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013923
13924fi
13925
Antoine Pitrou042b1282010-08-13 21:15:58 +000013926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13927$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013928if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013929 $as_echo_n "(cached) " >&6
13930else
13931 if test "$cross_compiling" = yes; then :
13932 ac_cv_computed_gotos=no
13933else
13934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13935/* end confdefs.h. */
13936
13937int main(int argc, char **argv)
13938{
13939 static void *targets[1] = { &&LABEL1 };
13940 goto LABEL2;
13941LABEL1:
13942 return 0;
13943LABEL2:
13944 goto *targets[0];
13945 return 1;
13946}
13947
13948_ACEOF
13949if ac_fn_c_try_run "$LINENO"; then :
13950 ac_cv_computed_gotos=yes
13951else
13952 ac_cv_computed_gotos=no
13953fi
13954rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13955 conftest.$ac_objext conftest.beam conftest.$ac_ext
13956fi
13957
13958fi
13959
13960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13961$as_echo "$ac_cv_computed_gotos" >&6; }
13962if test "$ac_cv_computed_gotos" = yes
13963then
13964
13965$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13966
13967fi
13968
Antoine Pitroub52ec782009-01-25 16:34:23 +000013969# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13971$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013972
13973# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013974if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013975 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013976if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013977then
13978
Matthias Kloseb9621712010-04-24 17:59:49 +000013979$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013980
Matthias Kloseb9621712010-04-24 17:59:49 +000013981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13982$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013983fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013984if test "$withval" = no
13985then
13986
13987$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13988
Matthias Kloseb9621712010-04-24 17:59:49 +000013989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13990$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013991fi
13992
Antoine Pitrou042b1282010-08-13 21:15:58 +000013993else
13994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13995$as_echo "no value specified" >&6; }
13996fi
13997
Antoine Pitroub52ec782009-01-25 16:34:23 +000013998
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013999case $ac_sys_system in
14000AIX*)
14001
14002$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14003 ;;
14004esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014005
Michael W. Hudson54241132001-12-07 15:38:26 +000014006
Jesus Cea6a792292010-05-03 21:18:48 +000014007case $ac_sys_system in
Gregory P. Smith69140482012-01-16 02:05:55 -080014008 OSF*) as_fn_error $? "OSF* systems are deprecated unless somebody volunteers. Check http://bugs.python.org/issue8606" "$LINENO" 5 ;;
Jesus Cea6a792292010-05-03 21:18:48 +000014009esac
14010
Gregory P. Smith138fa432010-12-13 08:00:52 +000014011ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
Gregory P. Smith69140482012-01-16 02:05:55 -080014012if test "x$ac_cv_func_pipe2" = xyes; then :
Gregory P. Smith138fa432010-12-13 08:00:52 +000014013
14014$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
14015
14016fi
Jesus Cea6a792292010-05-03 21:18:48 +000014017
14018
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014019
14020
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014021for h in `(cd $srcdir;echo Python/thread_*.h)`
14022do
14023 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14024done
14025
Michael W. Hudson54241132001-12-07 15:38:26 +000014026
Neal Norwitzd24499d2005-12-18 21:36:39 +000014027SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14029$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014030for dir in $SRCDIRS; do
14031 if test ! -d $dir; then
14032 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014033 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014034done
Matthias Kloseb9621712010-04-24 17:59:49 +000014035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14036$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014037
Guido van Rossum627b2d71993-12-24 10:39:16 +000014038# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000014039ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014040
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014041ac_config_files="$ac_config_files Modules/ld_so_aix"
14042
Martin v. Löwis11437992002-04-12 09:54:03 +000014043cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014044# This file is a shell script that caches the results of configure
14045# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014046# scripts and configure runs, see configure's option --config-cache.
14047# It is not useful on other systems. If it contains results you don't
14048# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014049#
Martin v. Löwis11437992002-04-12 09:54:03 +000014050# config.status only pays attention to the cache file if you give it
14051# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014052#
Skip Montanaro6dead952003-09-25 14:50:04 +000014053# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014054# loading this file, other *unset* `ac_cv_foo' will be assigned the
14055# following values.
14056
14057_ACEOF
14058
Guido van Rossumf78abae1997-01-21 22:02:36 +000014059# The following way of writing the cache mishandles newlines in values,
14060# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014061# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014062# Ultrix sh set writes to stderr and can't be redirected directly,
14063# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014064(
14065 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14066 eval ac_val=\$$ac_var
14067 case $ac_val in #(
14068 *${as_nl}*)
14069 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014070 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14071$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014072 esac
14073 case $ac_var in #(
14074 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014075 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14076 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014077 esac ;;
14078 esac
14079 done
14080
Martin v. Löwis11437992002-04-12 09:54:03 +000014081 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014082 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14083 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000014084 # `set' does not quote correctly, so add quotes: double-quote
14085 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014086 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014087 "s/'/'\\\\''/g;
14088 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014089 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014090 *)
14091 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014092 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014093 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014094 esac |
14095 sort
14096) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014097 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014098 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014099 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014100 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014101 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14102 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014103 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14104 :end' >>confcache
14105if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14106 if test -w "$cache_file"; then
Gregory P. Smith69140482012-01-16 02:05:55 -080014107 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014108 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14109$as_echo "$as_me: updating cache $cache_file" >&6;}
Gregory P. Smith69140482012-01-16 02:05:55 -080014110 if test ! -f "$cache_file" || test -h "$cache_file"; then
14111 cat confcache >"$cache_file"
14112 else
14113 case $cache_file in #(
14114 */* | ?:*)
14115 mv -f confcache "$cache_file"$$ &&
14116 mv -f "$cache_file"$$ "$cache_file" ;; #(
14117 *)
14118 mv -f confcache "$cache_file" ;;
14119 esac
14120 fi
14121 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014122 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014123 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14124$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014125 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014126fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014127rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014128
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014129test "x$prefix" = xNONE && prefix=$ac_default_prefix
14130# Let make expand exec_prefix.
14131test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014132
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014133DEFS=-DHAVE_CONFIG_H
14134
Skip Montanaro6dead952003-09-25 14:50:04 +000014135ac_libobjs=
14136ac_ltlibobjs=
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014137U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014138for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14139 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014140 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000014141 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014142 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14143 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000014144 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14145 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014146done
14147LIBOBJS=$ac_libobjs
14148
14149LTLIBOBJS=$ac_ltlibobjs
14150
14151
Martin v. Löwis11437992002-04-12 09:54:03 +000014152
Matthias Kloseb9621712010-04-24 17:59:49 +000014153
Gregory P. Smith69140482012-01-16 02:05:55 -080014154: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000014155ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014156ac_clean_files_save=$ac_clean_files
14157ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014158{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14159$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14160as_write_fail=0
14161cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014162#! $SHELL
14163# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014164# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014165# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014166# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014167
Martin v. Löwis11437992002-04-12 09:54:03 +000014168debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014169ac_cs_recheck=false
14170ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014171
Matthias Kloseb9621712010-04-24 17:59:49 +000014172SHELL=\${CONFIG_SHELL-$SHELL}
14173export SHELL
14174_ASEOF
14175cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14176## -------------------- ##
14177## M4sh Initialization. ##
14178## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014179
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014180# Be more Bourne compatible
14181DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014182if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014183 emulate sh
14184 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014185 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014186 # is contrary to our usage. Disable this feature.
14187 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014188 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014189else
Matthias Kloseb9621712010-04-24 17:59:49 +000014190 case `(set -o) 2>/dev/null` in #(
14191 *posix*) :
14192 set -o posix ;; #(
14193 *) :
14194 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014195esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014196fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014197
14198
Matthias Kloseb9621712010-04-24 17:59:49 +000014199as_nl='
14200'
14201export as_nl
14202# Printing a long string crashes Solaris 7 /usr/bin/printf.
14203as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14204as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14205as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14206# Prefer a ksh shell builtin over an external printf program on Solaris,
14207# but without wasting forks for bash or zsh.
14208if test -z "$BASH_VERSION$ZSH_VERSION" \
14209 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14210 as_echo='print -r --'
14211 as_echo_n='print -rn --'
14212elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14213 as_echo='printf %s\n'
14214 as_echo_n='printf %s'
14215else
14216 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14217 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14218 as_echo_n='/usr/ucb/echo -n'
14219 else
14220 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14221 as_echo_n_body='eval
14222 arg=$1;
14223 case $arg in #(
14224 *"$as_nl"*)
14225 expr "X$arg" : "X\\(.*\\)$as_nl";
14226 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14227 esac;
14228 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14229 '
14230 export as_echo_n_body
14231 as_echo_n='sh -c $as_echo_n_body as_echo'
14232 fi
14233 export as_echo_body
14234 as_echo='sh -c $as_echo_body as_echo'
14235fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014236
14237# The user is always right.
14238if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014239 PATH_SEPARATOR=:
14240 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14241 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14242 PATH_SEPARATOR=';'
14243 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014244fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014245
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014246
14247# IFS
14248# We need space, tab and new line, in precisely that order. Quoting is
14249# there to prevent editors from complaining about space-tab.
14250# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14251# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014252IFS=" "" $as_nl"
14253
14254# Find who we are. Look in the path if we contain no directory separator.
Gregory P. Smith69140482012-01-16 02:05:55 -080014255as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014256case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014257 *[\\/]* ) as_myself=$0 ;;
14258 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014259for as_dir in $PATH
14260do
14261 IFS=$as_save_IFS
14262 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014263 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14264 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014265IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014266
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014267 ;;
14268esac
14269# We did not find ourselves, most probably we were run as `sh COMMAND'
14270# in which case we are not to be found in the path.
14271if test "x$as_myself" = x; then
14272 as_myself=$0
14273fi
14274if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014275 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14276 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014277fi
14278
Matthias Kloseb9621712010-04-24 17:59:49 +000014279# Unset variables that we do not need and which cause bugs (e.g. in
14280# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14281# suppresses any "Segmentation fault" message there. '((' could
14282# trigger a bug in pdksh 5.2.14.
14283for as_var in BASH_ENV ENV MAIL MAILPATH
14284do eval test x\${$as_var+set} = xset \
14285 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014286done
14287PS1='$ '
14288PS2='> '
14289PS4='+ '
14290
14291# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014292LC_ALL=C
14293export LC_ALL
14294LANGUAGE=C
14295export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014296
Matthias Kloseb9621712010-04-24 17:59:49 +000014297# CDPATH.
14298(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14299
14300
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014301# as_fn_error STATUS ERROR [LINENO LOG_FD]
14302# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014303# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14304# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014305# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014306as_fn_error ()
14307{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014308 as_status=$1; test $as_status -eq 0 && as_status=1
14309 if test "$4"; then
14310 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14311 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014312 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014313 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014314 as_fn_exit $as_status
14315} # as_fn_error
14316
14317
14318# as_fn_set_status STATUS
14319# -----------------------
14320# Set $? to STATUS, without forking.
14321as_fn_set_status ()
14322{
14323 return $1
14324} # as_fn_set_status
14325
14326# as_fn_exit STATUS
14327# -----------------
14328# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14329as_fn_exit ()
14330{
14331 set +e
14332 as_fn_set_status $1
14333 exit $1
14334} # as_fn_exit
14335
14336# as_fn_unset VAR
14337# ---------------
14338# Portably unset VAR.
14339as_fn_unset ()
14340{
14341 { eval $1=; unset $1;}
14342}
14343as_unset=as_fn_unset
14344# as_fn_append VAR VALUE
14345# ----------------------
14346# Append the text in VALUE to the end of the definition contained in VAR. Take
14347# advantage of any shell optimizations that allow amortized linear growth over
14348# repeated appends, instead of the typical quadratic growth present in naive
14349# implementations.
14350if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14351 eval 'as_fn_append ()
14352 {
14353 eval $1+=\$2
14354 }'
14355else
14356 as_fn_append ()
14357 {
14358 eval $1=\$$1\$2
14359 }
14360fi # as_fn_append
14361
14362# as_fn_arith ARG...
14363# ------------------
14364# Perform arithmetic evaluation on the ARGs, and store the result in the
14365# global $as_val. Take advantage of shells that can avoid forks. The arguments
14366# must be portable across $(()) and expr.
14367if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14368 eval 'as_fn_arith ()
14369 {
14370 as_val=$(( $* ))
14371 }'
14372else
14373 as_fn_arith ()
14374 {
14375 as_val=`expr "$@" || test $? -eq 1`
14376 }
14377fi # as_fn_arith
14378
14379
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014380if expr a : '\(a\)' >/dev/null 2>&1 &&
14381 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14382 as_expr=expr
14383else
14384 as_expr=false
14385fi
14386
14387if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14388 as_basename=basename
14389else
14390 as_basename=false
14391fi
14392
Matthias Kloseb9621712010-04-24 17:59:49 +000014393if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14394 as_dirname=dirname
14395else
14396 as_dirname=false
14397fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014399as_me=`$as_basename -- "$0" ||
14400$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14401 X"$0" : 'X\(//\)$' \| \
14402 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014403$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014404 sed '/^.*\/\([^/][^/]*\)\/*$/{
14405 s//\1/
14406 q
14407 }
14408 /^X\/\(\/\/\)$/{
14409 s//\1/
14410 q
14411 }
14412 /^X\/\(\/\).*/{
14413 s//\1/
14414 q
14415 }
14416 s/.*/./; q'`
14417
Matthias Kloseb9621712010-04-24 17:59:49 +000014418# Avoid depending upon Character Ranges.
14419as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14420as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14421as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14422as_cr_digits='0123456789'
14423as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014424
14425ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014426case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014427-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014428 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014429 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014430 xy) ECHO_C='\c';;
14431 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14432 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014433 esac;;
14434*)
14435 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014436esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014437
Martin v. Löwis11437992002-04-12 09:54:03 +000014438rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014439if test -d conf$$.dir; then
14440 rm -f conf$$.dir/conf$$.file
14441else
14442 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014443 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014444fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014445if (echo >conf$$.file) 2>/dev/null; then
14446 if ln -s conf$$.file conf$$ 2>/dev/null; then
14447 as_ln_s='ln -s'
14448 # ... but there are two gotchas:
14449 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14450 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14451 # In both cases, we have to default to `cp -p'.
14452 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14453 as_ln_s='cp -p'
14454 elif ln conf$$.file conf$$ 2>/dev/null; then
14455 as_ln_s=ln
14456 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014457 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014458 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014459else
14460 as_ln_s='cp -p'
14461fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014462rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14463rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014464
Matthias Kloseb9621712010-04-24 17:59:49 +000014465
14466# as_fn_mkdir_p
14467# -------------
14468# Create "$as_dir" as a directory, including parents if necessary.
14469as_fn_mkdir_p ()
14470{
14471
14472 case $as_dir in #(
14473 -*) as_dir=./$as_dir;;
14474 esac
14475 test -d "$as_dir" || eval $as_mkdir_p || {
14476 as_dirs=
14477 while :; do
14478 case $as_dir in #(
14479 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14480 *) as_qdir=$as_dir;;
14481 esac
14482 as_dirs="'$as_qdir' $as_dirs"
14483 as_dir=`$as_dirname -- "$as_dir" ||
14484$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14485 X"$as_dir" : 'X\(//\)[^/]' \| \
14486 X"$as_dir" : 'X\(//\)$' \| \
14487 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14488$as_echo X"$as_dir" |
14489 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14490 s//\1/
14491 q
14492 }
14493 /^X\(\/\/\)[^/].*/{
14494 s//\1/
14495 q
14496 }
14497 /^X\(\/\/\)$/{
14498 s//\1/
14499 q
14500 }
14501 /^X\(\/\).*/{
14502 s//\1/
14503 q
14504 }
14505 s/.*/./; q'`
14506 test -d "$as_dir" && break
14507 done
14508 test -z "$as_dirs" || eval "mkdir $as_dirs"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014509 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014510
14511
14512} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014513if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014514 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014515else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014516 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014517 as_mkdir_p=false
14518fi
14519
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014520if test -x / >/dev/null 2>&1; then
14521 as_test_x='test -x'
14522else
14523 if ls -dL / >/dev/null 2>&1; then
14524 as_ls_L_option=L
14525 else
14526 as_ls_L_option=
14527 fi
14528 as_test_x='
14529 eval sh -c '\''
14530 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014531 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014532 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014533 case $1 in #(
14534 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014535 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014536 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014537 ???[sx]*):;;*)false;;esac;fi
14538 '\'' sh
14539 '
14540fi
14541as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014542
14543# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014544as_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 +000014545
14546# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014547as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014548
14549
Martin v. Löwis11437992002-04-12 09:54:03 +000014550exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014551## ----------------------------------- ##
14552## Main body of $CONFIG_STATUS script. ##
14553## ----------------------------------- ##
14554_ASEOF
14555test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014556
Matthias Kloseb9621712010-04-24 17:59:49 +000014557cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14558# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014559# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014560# values after options handling.
14561ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014562This file was extended by python $as_me 3.2, which was
Gregory P. Smith69140482012-01-16 02:05:55 -080014563generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014564
14565 CONFIG_FILES = $CONFIG_FILES
14566 CONFIG_HEADERS = $CONFIG_HEADERS
14567 CONFIG_LINKS = $CONFIG_LINKS
14568 CONFIG_COMMANDS = $CONFIG_COMMANDS
14569 $ $0 $@
14570
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014571on `(hostname || uname -n) 2>/dev/null | sed 1q`
14572"
14573
Martin v. Löwis11437992002-04-12 09:54:03 +000014574_ACEOF
14575
Matthias Kloseb9621712010-04-24 17:59:49 +000014576case $ac_config_files in *"
14577"*) set x $ac_config_files; shift; ac_config_files=$*;;
14578esac
14579
14580case $ac_config_headers in *"
14581"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14582esac
14583
14584
14585cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014586# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010014587config_files="$ac_config_files"
14588config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014589
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014590_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014591
Matthias Kloseb9621712010-04-24 17:59:49 +000014592cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014593ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014594\`$as_me' instantiates files and other configuration actions
14595from templates according to the current configuration. Unless the files
14596and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014597
Matthias Kloseb9621712010-04-24 17:59:49 +000014598Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014599
14600 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014601 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014602 --config print configuration, then exit
14603 -q, --quiet, --silent
14604 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014605 -d, --debug don't remove temporary files
14606 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014607 --file=FILE[:TEMPLATE]
14608 instantiate the configuration file FILE
14609 --header=FILE[:TEMPLATE]
14610 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014611
14612Configuration files:
14613$config_files
14614
14615Configuration headers:
14616$config_headers
14617
Matthias Kloseb9621712010-04-24 17:59:49 +000014618Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014619
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014621cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14622ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014623ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014624python config.status 3.2
Gregory P. Smith69140482012-01-16 02:05:55 -080014625configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000014626 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014627
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014628Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014629This config.status script is free software; the Free Software Foundation
14630gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014631
14632ac_pwd='$ac_pwd'
14633srcdir='$srcdir'
14634INSTALL='$INSTALL'
Trent Nelsona45afca2012-08-30 14:32:02 +000014635MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000014636test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014637_ACEOF
14638
Matthias Kloseb9621712010-04-24 17:59:49 +000014639cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14640# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014641ac_need_defaults=:
14642while test $# != 0
14643do
14644 case $1 in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014645 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014646 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14647 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014648 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014649 ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014650 --*=)
14651 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14652 ac_optarg=
14653 ac_shift=:
14654 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014655 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014656 ac_option=$1
14657 ac_optarg=$2
14658 ac_shift=shift
14659 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014660 esac
14661
Skip Montanaro6dead952003-09-25 14:50:04 +000014662 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014663 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014664 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14665 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014666 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014667 $as_echo "$ac_cs_version"; exit ;;
14668 --config | --confi | --conf | --con | --co | --c )
14669 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014670 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014671 debug=: ;;
14672 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014673 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014674 case $ac_optarg in
14675 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014676 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014677 esac
14678 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014679 ac_need_defaults=false;;
14680 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014681 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014682 case $ac_optarg in
14683 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14684 esac
14685 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014686 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014687 --he | --h)
14688 # Conflict between --help and --header
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014689 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014690Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014691 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014692 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014693 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14694 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14695 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014696
14697 # This is an error.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014698 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014699Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014700
Matthias Kloseb9621712010-04-24 17:59:49 +000014701 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014702 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014703
14704 esac
14705 shift
14706done
14707
Skip Montanaro6dead952003-09-25 14:50:04 +000014708ac_configure_extra_args=
14709
14710if $ac_cs_silent; then
14711 exec 6>/dev/null
14712 ac_configure_extra_args="$ac_configure_extra_args --silent"
14713fi
14714
14715_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014716cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014717if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014718 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14719 shift
14720 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14721 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014722 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014723 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014724fi
14725
Martin v. Löwis11437992002-04-12 09:54:03 +000014726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014727cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014728exec 5>>config.log
14729{
14730 echo
14731 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14732## Running $as_me. ##
14733_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014734 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014735} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014736
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014737_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014738cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014739_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014740
Matthias Kloseb9621712010-04-24 17:59:49 +000014741cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014742
14743# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014744for ac_config_target in $ac_config_targets
14745do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014746 case $ac_config_target in
14747 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14748 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14749 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014750 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14751 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014752 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14753 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014754 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014755 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014756
Gregory P. Smith69140482012-01-16 02:05:55 -080014757 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014758 esac
14759done
14760
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014761
Martin v. Löwis11437992002-04-12 09:54:03 +000014762# If the user did not use the arguments to specify the items to instantiate,
14763# then the envvar interface is used. Set only those that are not.
14764# We use the long form for the default assignment because of an extremely
14765# bizarre bug on SunOS 4.1.3.
14766if $ac_need_defaults; then
14767 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14768 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14769fi
14770
Skip Montanaro6dead952003-09-25 14:50:04 +000014771# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014772# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014773# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014774# Hook for its removal unless debugging.
14775# Note that there is a small window in which the directory will not be cleaned:
14776# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014777$debug ||
14778{
Gregory P. Smith69140482012-01-16 02:05:55 -080014779 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014780 trap 'exit_status=$?
Gregory P. Smith69140482012-01-16 02:05:55 -080014781 : "${ac_tmp:=$tmp}"
14782 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014783' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014784 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014785}
Martin v. Löwis11437992002-04-12 09:54:03 +000014786# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014787
Martin v. Löwis11437992002-04-12 09:54:03 +000014788{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014789 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Gregory P. Smith69140482012-01-16 02:05:55 -080014790 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014791} ||
14792{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014793 tmp=./conf$$-$RANDOM
14794 (umask 077 && mkdir "$tmp")
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014795} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Gregory P. Smith69140482012-01-16 02:05:55 -080014796ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014797
Matthias Kloseb9621712010-04-24 17:59:49 +000014798# Set up the scripts for CONFIG_FILES section.
14799# No need to generate them if there are no CONFIG_FILES.
14800# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014801if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014802
Matthias Kloseb9621712010-04-24 17:59:49 +000014803
14804ac_cr=`echo X | tr X '\015'`
14805# On cygwin, bash can eat \r inside `` if the user requested igncr.
14806# But we know of no other shell where ac_cr would be empty at this
14807# point, so we can use a bashism as a fallback.
14808if test "x$ac_cr" = x; then
14809 eval ac_cr=\$\'\\r\'
14810fi
14811ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14812if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014813 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014814else
14815 ac_cs_awk_cr=$ac_cr
14816fi
14817
Gregory P. Smith69140482012-01-16 02:05:55 -080014818echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014819_ACEOF
14820
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014821
Matthias Kloseb9621712010-04-24 17:59:49 +000014822{
14823 echo "cat >conf$$subs.awk <<_ACEOF" &&
14824 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14825 echo "_ACEOF"
14826} >conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014827 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14828ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014829ac_delim='%!_!# '
14830for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014831 . ./conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014832 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014833
Matthias Kloseb9621712010-04-24 17:59:49 +000014834 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14835 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014836 break
14837 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014838 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014839 else
14840 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014841 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014842done
Matthias Kloseb9621712010-04-24 17:59:49 +000014843rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014844
Matthias Kloseb9621712010-04-24 17:59:49 +000014845cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Gregory P. Smith69140482012-01-16 02:05:55 -080014846cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014848sed -n '
14849h
14850s/^/S["/; s/!.*/"]=/
14851p
14852g
14853s/^[^!]*!//
14854:repl
14855t repl
14856s/'"$ac_delim"'$//
14857t delim
14858:nl
14859h
14860s/\(.\{148\}\)..*/\1/
14861t more1
14862s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14863p
14864n
14865b repl
14866:more1
14867s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14868p
14869g
14870s/.\{148\}//
14871t nl
14872:delim
14873h
14874s/\(.\{148\}\)..*/\1/
14875t more2
14876s/["\\]/\\&/g; s/^/"/; s/$/"/
14877p
14878b
14879:more2
14880s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14881p
14882g
14883s/.\{148\}//
14884t delim
14885' <conf$$subs.awk | sed '
14886/^[^""]/{
14887 N
14888 s/\n//
14889}
14890' >>$CONFIG_STATUS || ac_write_fail=1
14891rm -f conf$$subs.awk
14892cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14893_ACAWK
Gregory P. Smith69140482012-01-16 02:05:55 -080014894cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014895 for (key in S) S_is_set[key] = 1
14896 FS = ""
14897
14898}
14899{
14900 line = $ 0
14901 nfields = split(line, field, "@")
14902 substed = 0
14903 len = length(field[1])
14904 for (i = 2; i < nfields; i++) {
14905 key = field[i]
14906 keylen = length(key)
14907 if (S_is_set[key]) {
14908 value = S[key]
14909 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14910 len += length(value) + length(field[++i])
14911 substed = 1
14912 } else
14913 len += 1 + keylen
14914 }
14915
14916 print line
14917}
14918
14919_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014921cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14922if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14923 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14924else
14925 cat
Gregory P. Smith69140482012-01-16 02:05:55 -080014926fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014927 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014928_ACEOF
14929
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014930# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14931# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014932# trailing colons and then remove the whole line if VPATH becomes empty
14933# (actually we leave an empty line to preserve line numbers).
14934if test "x$srcdir" = x.; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014935 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14936h
14937s///
14938s/^/:/
14939s/[ ]*$/:/
14940s/:\$(srcdir):/:/g
14941s/:\${srcdir}:/:/g
14942s/:@srcdir@:/:/g
14943s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014944s/:*$//
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014945x
14946s/\(=[ ]*\).*/\1/
14947G
14948s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014949s/^[^=]*=[ ]*$//
14950}'
14951fi
14952
Matthias Kloseb9621712010-04-24 17:59:49 +000014953cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014954fi # test -n "$CONFIG_FILES"
14955
Matthias Kloseb9621712010-04-24 17:59:49 +000014956# Set up the scripts for CONFIG_HEADERS section.
14957# No need to generate them if there are no CONFIG_HEADERS.
14958# This happens for instance with `./config.status Makefile'.
14959if test -n "$CONFIG_HEADERS"; then
Gregory P. Smith69140482012-01-16 02:05:55 -080014960cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014961BEGIN {
14962_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014963
Matthias Kloseb9621712010-04-24 17:59:49 +000014964# Transform confdefs.h into an awk script `defines.awk', embedded as
14965# here-document in config.status, that substitutes the proper values into
14966# config.h.in to produce config.h.
14967
14968# Create a delimiter string that does not exist in confdefs.h, to ease
14969# handling of long lines.
14970ac_delim='%!_!# '
14971for ac_last_try in false false :; do
Gregory P. Smith69140482012-01-16 02:05:55 -080014972 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14973 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014974 break
14975 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014976 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014977 else
14978 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14979 fi
14980done
14981
14982# For the awk script, D is an array of macro values keyed by name,
14983# likewise P contains macro parameters if any. Preserve backslash
14984# newline sequences.
14985
14986ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14987sed -n '
14988s/.\{148\}/&'"$ac_delim"'/g
14989t rset
14990:rset
14991s/^[ ]*#[ ]*define[ ][ ]*/ /
14992t def
14993d
14994:def
14995s/\\$//
14996t bsnl
14997s/["\\]/\\&/g
14998s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14999D["\1"]=" \3"/p
15000s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15001d
15002:bsnl
15003s/["\\]/\\&/g
15004s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15005D["\1"]=" \3\\\\\\n"\\/p
15006t cont
15007s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15008t cont
15009d
15010:cont
15011n
15012s/.\{148\}/&'"$ac_delim"'/g
15013t clear
15014:clear
15015s/\\$//
15016t bsnlc
15017s/["\\]/\\&/g; s/^/"/; s/$/"/p
15018d
15019:bsnlc
15020s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15021b cont
15022' <confdefs.h | sed '
15023s/'"$ac_delim"'/"\\\
15024"/g' >>$CONFIG_STATUS || ac_write_fail=1
15025
15026cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15027 for (key in D) D_is_set[key] = 1
15028 FS = ""
15029}
15030/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15031 line = \$ 0
15032 split(line, arg, " ")
15033 if (arg[1] == "#") {
15034 defundef = arg[2]
15035 mac1 = arg[3]
15036 } else {
15037 defundef = substr(arg[1], 2)
15038 mac1 = arg[2]
15039 }
15040 split(mac1, mac2, "(") #)
15041 macro = mac2[1]
15042 prefix = substr(line, 1, index(line, defundef) - 1)
15043 if (D_is_set[macro]) {
15044 # Preserve the white space surrounding the "#".
15045 print prefix "define", macro P[macro] D[macro]
15046 next
15047 } else {
15048 # Replace #undef with comments. This is necessary, for example,
15049 # in the case of _POSIX_SOURCE, which is predefined and required
15050 # on some systems where configure will not decide to define it.
15051 if (defundef == "undef") {
15052 print "/*", prefix defundef, macro, "*/"
15053 next
15054 }
15055 }
15056}
15057{ print }
15058_ACAWK
15059_ACEOF
15060cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015061 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015062fi # test -n "$CONFIG_HEADERS"
15063
15064
15065eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15066shift
15067for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015068do
15069 case $ac_tag in
15070 :[FHLC]) ac_mode=$ac_tag; continue;;
15071 esac
15072 case $ac_mode$ac_tag in
15073 :[FHL]*:*);;
Gregory P. Smith69140482012-01-16 02:05:55 -080015074 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015075 :[FH]-) ac_tag=-:-;;
15076 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15077 esac
15078 ac_save_IFS=$IFS
15079 IFS=:
15080 set x $ac_tag
15081 IFS=$ac_save_IFS
15082 shift
15083 ac_file=$1
15084 shift
15085
15086 case $ac_mode in
15087 :L) ac_source=$1;;
15088 :[FH])
15089 ac_file_inputs=
15090 for ac_f
15091 do
15092 case $ac_f in
Gregory P. Smith69140482012-01-16 02:05:55 -080015093 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015094 *) # Look for the file first in the build tree, then in the source tree
15095 # (if the path is not absolute). The absolute path cannot be DOS-style,
15096 # because $ac_f cannot contain `:'.
15097 test -f "$ac_f" ||
15098 case $ac_f in
15099 [\\/$]*) false;;
15100 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15101 esac ||
Gregory P. Smith69140482012-01-16 02:05:55 -080015102 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015103 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000015104 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15105 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015106 done
15107
15108 # Let's still pretend it is `configure' which instantiates (i.e., don't
15109 # use $as_me), people would be surprised to read:
15110 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015111 configure_input='Generated from '`
15112 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15113 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015114 if test x"$ac_file" != x-; then
15115 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000015116 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15117$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015118 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015119 # Neutralize special characters interpreted by sed in replacement strings.
15120 case $configure_input in #(
15121 *\&* | *\|* | *\\* )
15122 ac_sed_conf_input=`$as_echo "$configure_input" |
15123 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15124 *) ac_sed_conf_input=$configure_input;;
15125 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015126
15127 case $ac_tag in
Gregory P. Smith69140482012-01-16 02:05:55 -080015128 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15129 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015130 esac
15131 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015132 esac
15133
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015134 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015135$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015136 X"$ac_file" : 'X\(//\)[^/]' \| \
15137 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015138 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015139$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015140 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15141 s//\1/
15142 q
15143 }
15144 /^X\(\/\/\)[^/].*/{
15145 s//\1/
15146 q
15147 }
15148 /^X\(\/\/\)$/{
15149 s//\1/
15150 q
15151 }
15152 /^X\(\/\).*/{
15153 s//\1/
15154 q
15155 }
15156 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000015157 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015158 ac_builddir=.
15159
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015160case "$ac_dir" in
15161.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15162*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015163 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015164 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015165 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015166 case $ac_top_builddir_sub in
15167 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15168 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15169 esac ;;
15170esac
15171ac_abs_top_builddir=$ac_pwd
15172ac_abs_builddir=$ac_pwd$ac_dir_suffix
15173# for backward compatibility:
15174ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015175
15176case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015177 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015178 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015179 ac_top_srcdir=$ac_top_builddir_sub
15180 ac_abs_top_srcdir=$ac_pwd ;;
15181 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015182 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015183 ac_top_srcdir=$srcdir
15184 ac_abs_top_srcdir=$srcdir ;;
15185 *) # Relative name.
15186 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15187 ac_top_srcdir=$ac_top_build_prefix$srcdir
15188 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015189esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015190ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015191
Martin v. Löwis11437992002-04-12 09:54:03 +000015192
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015193 case $ac_mode in
15194 :F)
15195 #
15196 # CONFIG_FILE
15197 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015198
15199 case $INSTALL in
15200 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015201 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015202 esac
Trent Nelsona45afca2012-08-30 14:32:02 +000015203 ac_MKDIR_P=$MKDIR_P
15204 case $MKDIR_P in
15205 [\\/$]* | ?:[\\/]* ) ;;
15206 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15207 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015208_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015209
Matthias Kloseb9621712010-04-24 17:59:49 +000015210cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015211# If the template does not know about datarootdir, expand it.
15212# FIXME: This hack should be removed a few years after 2.60.
15213ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015214ac_sed_dataroot='
15215/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015216 p
15217 q
15218}
15219/@datadir@/p
15220/@docdir@/p
15221/@infodir@/p
15222/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015223/@mandir@/p'
15224case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015225*datarootdir*) ac_datarootdir_seen=yes;;
15226*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015227 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15228$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015230cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015231 ac_datarootdir_hack='
15232 s&@datadir@&$datadir&g
15233 s&@docdir@&$docdir&g
15234 s&@infodir@&$infodir&g
15235 s&@localedir@&$localedir&g
15236 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015237 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015238esac
15239_ACEOF
15240
15241# Neutralize VPATH when `$srcdir' = `.'.
15242# Shell code in configure.ac might set extrasub.
15243# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015244cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15245ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015246$extrasub
15247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015248cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015249:t
15250/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015251s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015252s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015253s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015254s&@srcdir@&$ac_srcdir&;t t
15255s&@abs_srcdir@&$ac_abs_srcdir&;t t
15256s&@top_srcdir@&$ac_top_srcdir&;t t
15257s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15258s&@builddir@&$ac_builddir&;t t
15259s&@abs_builddir@&$ac_abs_builddir&;t t
15260s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15261s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsona45afca2012-08-30 14:32:02 +000015262s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015263$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015264"
Gregory P. Smith69140482012-01-16 02:05:55 -080015265eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15266 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015267
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015268test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Gregory P. Smith69140482012-01-16 02:05:55 -080015269 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15270 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15271 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015272 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015273which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015274$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015275which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015276
Gregory P. Smith69140482012-01-16 02:05:55 -080015277 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015278 case $ac_file in
Gregory P. Smith69140482012-01-16 02:05:55 -080015279 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15280 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015281 esac \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015282 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015283 ;;
15284 :H)
15285 #
15286 # CONFIG_HEADER
15287 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015288 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015289 {
15290 $as_echo "/* $configure_input */" \
Gregory P. Smith69140482012-01-16 02:05:55 -080015291 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15292 } >"$ac_tmp/config.h" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015293 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Gregory P. Smith69140482012-01-16 02:05:55 -080015294 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015295 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15296$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015297 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015298 rm -f "$ac_file"
Gregory P. Smith69140482012-01-16 02:05:55 -080015299 mv "$ac_tmp/config.h" "$ac_file" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015300 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015301 fi
15302 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015303 $as_echo "/* $configure_input */" \
Gregory P. Smith69140482012-01-16 02:05:55 -080015304 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015305 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015306 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015307 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015308
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015309
15310 esac
15311
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015312
15313 case $ac_file$ac_mode in
15314 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15315
15316 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015317done # for ac_tag
15318
Guido van Rossum627b2d71993-12-24 10:39:16 +000015319
Matthias Kloseb9621712010-04-24 17:59:49 +000015320as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015321_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015322ac_clean_files=$ac_clean_files_save
15323
Matthias Kloseb9621712010-04-24 17:59:49 +000015324test $ac_write_fail = 0 ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015325 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015326
Martin v. Löwis11437992002-04-12 09:54:03 +000015327
15328# configure is writing to config.log, and then calls config.status.
15329# config.status does its own redirection, appending to config.log.
15330# Unfortunately, on DOS this fails, as config.log is still kept open
15331# by configure, so config.status won't be able to write to it; its
15332# output is simply discarded. So we exec the FD to /dev/null,
15333# effectively closing config.log, so it can be properly (re)opened and
15334# appended to by config.status. When coming back to configure, we
15335# need to make the FD available again.
15336if test "$no_create" != yes; then
15337 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015338 ac_config_status_args=
15339 test "$silent" = yes &&
15340 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015341 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015342 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015343 exec 5>>config.log
15344 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15345 # would make configure fail if this is the last instruction.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015346 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015347fi
15348if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15349 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15350$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015351fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015352
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015353
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015354echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015355if test ! -f Modules/Setup
15356then
15357 cp $srcdir/Modules/Setup.dist Modules/Setup
15358fi
15359
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015360echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015361if test ! -f Modules/Setup.local
15362then
15363 echo "# Edit this file for local setup changes" >Modules/Setup.local
15364fi
15365
15366echo "creating Makefile"
15367$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15368 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015369 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015370mv config.c Modules